diff --git a/.azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml b/.azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml index 6c8dc4e3b0..1f3fbf4c4a 100644 --- a/.azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml +++ b/.azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml @@ -5,6 +5,7 @@ parameters: # Logic-related parameters modulePath: '$(modulePath)' + psRuleFilterRegex: '(defaults|waf-aligned)' ##---------------------------------------------## ## TEMPLATE LOGIC ## @@ -19,32 +20,58 @@ jobs: name: ${{ parameters.poolName }} steps: - task: PowerShell@2 - displayName: 'Get parameter files' + displayName: 'Get module test file paths' name: getModuleTestFilesTask inputs: targetType: inline pwsh: true script: | + ## ======= ## + ## All ## + ## ======= ## + # Get the list of parameter file paths $moduleFolderPath = Join-Path '$(System.DefaultWorkingDirectory)' '${{ parameters.modulePath }}' - $testFilePaths = (Get-ChildItem -Path $moduleFolderPath -Recurse -Filter 'main.test.bicep').FullName | Sort-Object - $deploymentTestPaths = $testFilePaths | ForEach-Object { + $testFilePaths = (Get-ChildItem -Path $moduleFolderPath -Recurse -Filter 'main.test.bicep').FullName | Sort-Object + $testFilePaths = $testFilePaths | ForEach-Object { $_.Replace($moduleFolderPath, '').Trim('\').Trim('/') } - Write-Verbose 'Found module test files' -Verbose - $deploymentTestPaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose } + Write-Verbose 'Found all module test files' -Verbose + $testFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose } $testTable = @{} - foreach ($deploymentTestPath in $deploymentTestPaths) { - $deploymentTestFileName = Split-Path (Split-Path $deploymentTestPath -Parent) -Leaf - $testTable[$deploymentTestFileName] += @{ - moduleTestFilePath = $deploymentTestPath - } - } + $testFilePaths | ForEach-Object { + $testFileName = Split-Path (Split-Path $_) -Leaf + $testTable[$testFileName] = @{ + moduleTestFilePath = $_ + moduleTestFileName = $testFileName + } + } | ConvertTo-Json -Compress + $deployCompressedOutput = $testTable | ConvertTo-Json -Compress + + Write-Verbose "Publishing output: $deployCompressedOutput" -Verbose + Write-Host ('##vso[task.setVariable variable=moduleTestFilePaths;isOutput=true]{0}' -f $deployCompressedOutput) - $deploymentTestPathsOutput = $testTable | ConvertTo-Json -Compress + ## =========== ## + ## PS-Rule ## + ## =========== ## + + $psRuleTestFilePaths = $testFilePaths | Where-Object { $_ -match '${{ parameters.psRuleFilterRegex }}' } + + Write-Verbose 'Found PSRule module test files' -Verbose + $psRuleTestFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose } + + $psRuleTestTable = @{} + $psRuleTestFilePaths | ForEach-Object { + $testFileName = Split-Path (Split-Path $_) -Leaf + $psRuleTestTable[$testFileName] = @{ + moduleTestFilePath = $_ + moduleTestFileName = $testFileName + } + } + $psRuleCompressedOutput = $psRuleTestTable | ConvertTo-Json -Compress - Write-Host ('##vso[task.setVariable variable=moduleTests;isOutput=true]{0}' -f ($testTable | ConvertTo-Json -Compress)) - Write-Verbose "Module test files: $deploymentTestPathsOutput" -Verbose + Write-Host ('##vso[task.setVariable variable=psRuleModuleTestFilePaths;isOutput=true]{0}' -f $psRuleCompressedOutput) + Write-Verbose "PS Rule publishing output: $psRuleCompressedOutput" -Verbose diff --git a/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml b/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml index ff34098171..c8e06dba1b 100644 --- a/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml +++ b/.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml @@ -29,7 +29,6 @@ ## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on. | 'ubuntu20.04' | ## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline. | 120 | ## | removeDeployment | 'true' | Set to [true] to flag resources for removal. If not provided, defaults to true. | 'true' | -## | templateFilePath | '' | Path to the template file to deploy. | 'modules/analysis-services/servers/main.bicep' | ## | customTokens | '' | Additional token pairs in json format. | '{"tokenName":"tokenValue"}' | ## | jobDisplayName | '' | The display name of the job. | 'Deploy module' | ## | modulePath | '$(modulePath)' | The path to the module to deploy. | 'c:/KeyVault' | @@ -50,7 +49,6 @@ parameters: defaultJobTimeoutInMinutes: 120 # Logic-related parameters removeDeployment: false - templateFilePath: '' customTokens: '' modulePath: '$(modulePath)' location: '$(location)' @@ -76,7 +74,7 @@ jobs: dependsOn: - getModuleTestFiles strategy: - matrix: $[ dependencies.getModuleTestFiles.outputs['getModuleTestFilesTask.moduleTests'] ] + matrix: $[ dependencies.getModuleTestFiles.outputs['getModuleTestFilesTask.moduleTestFilePaths'] ] ##---------------------------------------------## ## TEMPLATE LOGIC ## ##---------------------------------------------## @@ -117,20 +115,16 @@ jobs: # [Agent] Replace tokens #----------------------- - - task: AzurePowerShell@5 - displayName: 'Replace tokens in template file via connection [${{ parameters.serviceConnection }}]' + - task: PowerShell@2 + displayName: 'Replace tokens in template files' inputs: - azureSubscription: ${{ parameters.serviceConnection }} - azurePowerShellVersion: 'latestVersion' - preferredAzurePowerShellVersion: '' - ScriptType: InlineScript + targetType: inline pwsh: true - inline: | + script: | # Load used functions . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'tokensReplacement' 'Convert-TokensInFileList.ps1') . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Get-LocallyReferencedFileList.ps1') - # Get target files $moduleTestFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulePath)' '$(moduleTestFilePath)' diff --git a/.azuredevops/pipelineTemplates/jobs.validateModulePSRule.yml b/.azuredevops/pipelineTemplates/jobs.validateModulePSRule.yml new file mode 100644 index 0000000000..9edac100e4 --- /dev/null +++ b/.azuredevops/pipelineTemplates/jobs.validateModulePSRule.yml @@ -0,0 +1,144 @@ +######################################################### +## 'Validate module with Pester' Pipeline Template ## +######################################################### +## +## This pipeline template contains the logic to validate a module using a set of Pester tests +## +## Enabled levels of validation +## - Resource-Group-Level +## - Subscription-Level +## - Management-Group-Level +## - Tenant-Level +## +######################################################### +## +##---------------------------------------------## +## TEMPLATE PARAMETERS ## +##---------------------------------------------## +## +## By default it uses the variables specified in the below [parameters] section. However, you can overwrite these variables in the +## referencing pipeline by providing the parameter explicitly. +## +## NOTE: If you don't need to overwrite a shared value, you can IGNORE this section +## +## |==============================================================================================================================================================================================================================================| +## | Parameter | Default Value | Description | Example | +## |----------------------------|-----------------------------------------------|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------| +## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | +## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | +## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | +## | modulePath | '$(modulePath)' | The path to the module to deploy. | 'c:/KeyVault' | +## | psrulePath | 'utilities/pipelines/staticValidation/psrule' | The path to the PS-Rule configuration | 'utilities/pipelines/staticValidation/module.tests.ps1' | +## | location | '$(location)' | The location to validate with | 'France Central' | +## | subscriptionId | '$(ARM_SUBSCRIPTION_ID)' | The id of the subscription to validate with when using a Management group service connection | 'aed7c000-6387-412e-bed0-24dfddf4bbc6' | +## | managementGroupId | '$(ARM_MGMTGROUP_ID)' | The id of the management group to validate with. Required only for Management-Group-Level validations | '477c9620-cb01-454f-9ebc-fc6b1df48c14' | +## |==============================================================================================================================================================================================================================================| +## +##---------------------------------------------## + +parameters: + # Pipeline-related parameters + poolName: '$(poolName)' + vmImage: '$(vmImage)' + defaultJobTimeoutInMinutes: 120 + # Logic-related parameters + modulePath: '$(modulePath)' + psrulePath: 'utilities/pipelines/staticValidation/psrule' + location: '$(location)' + subscriptionId: '$(ARM_SUBSCRIPTION_ID)' + managementGroupId: '$(ARM_MGMTGROUP_ID)' + +##---------------------------------------------## +## TEMPLATE LOGIC ## +##---------------------------------------------## +jobs: + - template: /.azuredevops/pipelineTemplates/jobs.getModuleTestFiles.yml + - job: + displayName: Run PSRule tests + timeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }} + pool: + ${{ if ne(parameters.vmImage, '') }}: + vmImage: ${{ parameters.vmImage }} + ${{ if ne(parameters.poolName, '') }}: + name: ${{ parameters.poolName }} + dependsOn: + - getModuleTestFiles + strategy: + matrix: $[ dependencies.getModuleTestFiles.outputs['getModuleTestFilesTask.psRuleModuleTestFilePaths'] ] + steps: + # [Agent] Replace tokens + #----------------------- + - task: PowerShell@2 + displayName: 'Replace tokens in template files' + inputs: + targetType: inline + pwsh: true + script: | + # Load used functions + . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'tokensReplacement' 'Convert-TokensInFileList.ps1') + . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'pipelines' 'sharedScripts' 'Get-LocallyReferencedFileList.ps1') + + # Get target files + $moduleTestFilePath = Join-Path '$(System.DefaultWorkingDirectory)' '$(modulePath)' '$(moduleTestFilePath)' + + # Get target files + $targetFileList = @( + $moduleTestFilePath + ) + + # Add all module template files as they may contain tokens + $targetFileList += (Get-LocallyReferencedFileList -FilePath $moduleTestFilePath) + $targetFileList = $targetFileList | Sort-Object -Unique + + # Construct Token Function Input + $ConvertTokensInputs = @{ + FilePathList = $targetFileList + Tokens = @{} + TokenPrefix = '$(tokenPrefix)' + TokenSuffix = '$(tokenSuffix)' + } + + # Add enforced tokens + $ConvertTokensInputs.Tokens += @{ + subscriptionId = '${{ parameters.subscriptionId }}' + managementGroupId = '${{ parameters.managementGroupId }}' + tenantId = '$(ARM_TENANT_ID)' + } + + # Add local (source control) tokens + $tokenMap = @{} + foreach ($token in (Get-ChildItem env: | Where-Object -Property Name -Like "localToken_*")) { + $tokenMap += @{ $token.Name.Replace('localToken_','','OrdinalIgnoreCase') = $token.value } + } + Write-Verbose ('Using local tokens [{0}]' -f ($tokenMap.Keys -join ', ')) -Verbose + $ConvertTokensInputs.Tokens += $tokenMap + + # Swap 'namePrefix' token if empty and provided as a Azure DevOps variable + if([String]::IsNullOrEmpty($ConvertTokensInputs.Tokens['namePrefix'])){ + Write-Verbose 'Using [namePrefix] token from Azure DevOps Variable Groups' -Verbose + $ConvertTokensInputs.Tokens['namePrefix'] = "$(TOKEN_NAMEPREFIX)" + } + + # Add custom tokens (passed in via the pipeline) + if(-not [String]::IsNullOrEmpty('${{ parameters.customTokens }}')) { + $customTokens = '${{ parameters.customTokens }}' | ConvertFrom-Json -AsHashTable + Write-Verbose ('Using custom parameter file tokens [{0}]' -f ($customTokens.Keys -join ', ')) -Verbose + $ConvertTokensInputs.Tokens += $customTokens + } + + Write-Verbose "Convert Tokens Input:`n $($ConvertTokensInputs | ConvertTo-Json -Depth 10)" -Verbose + + # Invoke Token Replacement Functionality [For Module] + $null = Convert-TokensInFileList @ConvertTokensInputs + + - task: ps-rule-assert@2 + displayName: Analyze Azure template files + inputs: + inputType: inputPath + modules: 'PSRule.Rules.Azure' + inputPath: '$(System.DefaultWorkingDirectory)/$(modulePath)/$(moduleTestFilePath)' + outputFormat: Csv + option: '${{ parameters.psrulePath}}/ps-rule.yaml' # Path to PSRule configuration options file + source: '${{ parameters.psrulePath}}/.ps-rule/' # Path to folder containing suppression rules to use for analysis. + outputPath: '$(System.DefaultWorkingDirectory)/$(modulePath)/$(moduleTestFilePath)-PSRule-output.csv' + continueOnError: true diff --git a/.azuredevops/pipelineTemplates/jobs.validateModulePester.yml b/.azuredevops/pipelineTemplates/jobs.validateModulePester.yml index 1839d3f59c..567a6b3c15 100644 --- a/.azuredevops/pipelineTemplates/jobs.validateModulePester.yml +++ b/.azuredevops/pipelineTemplates/jobs.validateModulePester.yml @@ -21,23 +21,23 @@ ## ## NOTE: If you don't need to overwrite a shared value, you can IGNORE this section ## -## |=====================================================================================================================================================================================================================================================| -## | Parameter | Default Value | Description | Example | -## |---------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------| -## | serviceConnection | '$(serviceConnection)' | The service connection that connects to Azure | 'demo-internal' | -## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | -## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | -## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | -## | modulePath | '$(modulePath)' | The path to the module to deploy. | 'c:/KeyVault' | -## | moduleTestFilePath | '$(moduleTestFilePath)' | The path to the module Pester tests. | 'utilities/pipelines/staticValidation/module.tests.ps1' | -## | location | '$(location)' | The location to validate with | 'France Central' | -## | subscriptionId | '$(ARM_SUBSCRIPTION_ID)' | The id of the subscription to validate with when using a Management group service connection | 'aed7c000-6387-412e-bed0-24dfddf4bbc6' | -## | managementGroupId | '$(ARM_MGMTGROUP_ID)' | The id of the management group to validate with. Required only for Management-Group-Level validations | '477c9620-cb01-454f-9ebc-fc6b1df48c14' | -## | parametersRepository | '$(Build.Repository.Name)' | The respository with the parameter files. Defaults to the triggering repository | 'Solutions' | -## | modulesRepository | '$(modulesRepository)' | The respository with the modules. | 'Components' | -## | azurePowerShellVersion | '$(azurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, one of the example values. | 'latestVersion' or 'OtherVersion' | -## | preferredAzurePowerShellVersion | '$(preferredAzurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, either an empty string or the specific version. | '4.4.0' | -## |=====================================================================================================================================================================================================================================================| +## |========================================================================================================================================================================================================================================================================| +## | Parameter | Default Value | Description | Example | +## |---------------------------------|---------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------| +## | serviceConnection | '$(serviceConnection)' | The service connection that connects to Azure | 'demo-internal' | +## | poolName | '$(poolName)' | You can provide either a [poolname] or [vmImage] to run the job on | 'Custom Deployment Pool' | +## | vmImage | '$(vmImage)' | You can provide either a [poolname] or [vmImage] to run the job on | 'ubuntu20.04' | +## | defaultJobTimeoutInMinutes | 120 | The timeout for the job in this pipeline | 120 | +## | modulePath | '$(modulePath)' | The path to the module to deploy. | 'c:/KeyVault' | +## | moduleTestFilePath | 'utilities/pipelines/staticValidation/module.tests.ps1' | The path to the module Pester tests. | 'utilities/pipelines/staticValidation/module.tests.ps1' | +## | location | '$(location)' | The location to validate with | 'France Central' | +## | subscriptionId | '$(ARM_SUBSCRIPTION_ID)' | The id of the subscription to validate with when using a Management group service connection | 'aed7c000-6387-412e-bed0-24dfddf4bbc6' | +## | managementGroupId | '$(ARM_MGMTGROUP_ID)' | The id of the management group to validate with. Required only for Management-Group-Level validations | '477c9620-cb01-454f-9ebc-fc6b1df48c14' | +## | parametersRepository | '$(Build.Repository.Name)' | The respository with the parameter files. Defaults to the triggering repository | 'Solutions' | +## | modulesRepository | '$(modulesRepository)' | The respository with the modules. | 'Components' | +## | azurePowerShellVersion | '$(azurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, one of the example values. | 'latestVersion' or 'OtherVersion' | +## | preferredAzurePowerShellVersion | '$(preferredAzurePowerShellVersion)' | Used for configuring the Azure PowerShellModules Version, either an empty string or the specific version. | '4.4.0' | +## |========================================================================================================================================================================================================================================================================| ## ##---------------------------------------------## @@ -48,7 +48,7 @@ parameters: defaultJobTimeoutInMinutes: 120 # Logic-related parameters modulePath: '$(modulePath)' - moduleTestFilePath: '$(moduleTestFilePath)' + moduleTestFilePath: 'utilities/pipelines/staticValidation/module.tests.ps1' parametersRepository: '$(Build.Repository.Name)' location: '$(location)' subscriptionId: '$(ARM_SUBSCRIPTION_ID)' diff --git a/.azuredevops/pipelineTemplates/stages.module.yml b/.azuredevops/pipelineTemplates/stages.module.yml index 9d6b8e3720..3367683709 100644 --- a/.azuredevops/pipelineTemplates/stages.module.yml +++ b/.azuredevops/pipelineTemplates/stages.module.yml @@ -12,6 +12,7 @@ stages: condition: eq('${{ parameters.staticValidation }}', 'True') jobs: - template: /.azuredevops/pipelineTemplates/jobs.validateModulePester.yml + - template: /.azuredevops/pipelineTemplates/jobs.validateModulePSRule.yml - stage: deployment displayName: Deployment validation @@ -21,7 +22,6 @@ stages: jobs: - template: /.azuredevops/pipelineTemplates/jobs.validateModuleDeployment.yml parameters: - templateFilePath: '$(modulePath)/main.bicep' removeDeployment: '${{ parameters.removeDeployment }}' defaultJobTimeoutInMinutes: ${{ parameters.defaultJobTimeoutInMinutes }} diff --git a/.github/actions/templates/getModuleTestFiles/action.yml b/.github/actions/templates/getModuleTestFiles/action.yml index 704f13bad5..7772e18fa1 100644 --- a/.github/actions/templates/getModuleTestFiles/action.yml +++ b/.github/actions/templates/getModuleTestFiles/action.yml @@ -1,42 +1,79 @@ -name: 'Get parameter files' -description: 'Retrieve the parameter file paths of a given module' +name: 'Get test files' +description: 'Retrieve the test file paths of a given module' inputs: modulePath: description: "The path to the module's folder" required: true + psRuleFilterRegex: + description: 'The regex used to filter PSRule compliant files' + required: true + default: '(defaults|waf-aligned)' outputs: moduleTestFilePaths: description: 'The module test files to use for template evaluation' value: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: + description: 'The module test files to use for PSRule evaluation' + value: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} runs: using: 'composite' steps: - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths shell: pwsh run: | # Grouping task logs - Write-Output '::group::Get parameter files' + Write-Output '::group::Get all test files' # Get the list of parameter file paths $moduleFolderPath = Join-Path $env:GITHUB_WORKSPACE '${{ inputs.modulePath }}' - $testFilePaths = (Get-ChildItem -Path $moduleFolderPath -Recurse -Filter 'main.test.bicep').FullName | Sort-Object + $testFilePaths = (Get-ChildItem -Path $moduleFolderPath -Recurse -Filter 'main.test.bicep').FullName | Sort-Object $testFilePaths = $testFilePaths | ForEach-Object { $_.Replace($moduleFolderPath, '').Trim('\').Trim('/') } - Write-Verbose 'Found module test files' -Verbose + Write-Verbose 'Found all module test files' -Verbose $testFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose } # Output values to be accessed by next jobs - $compressedOutput = $testFilePaths | ConvertTo-Json -Compress - if($compressedOutput -notmatch "\[.*\]") { - $compressedOutput = "[$compressedOutput]" + $deployCompressedOutput = $testFilePaths | ForEach-Object { + @{ + moduleTestFilePath = $_ + moduleTestFileName = Split-Path (Split-Path $_) -Leaf + } + } | ConvertTo-Json -Compress + + # Output values to be accessed by next jobs + if($deployCompressedOutput -notmatch "\[.*\]") { + $deployCompressedOutput = "[$deployCompressedOutput]" + } + Write-Verbose "Publishing output: $deployCompressedOutput" -Verbose + Write-Output ('{0}={1}' -f 'moduleTestFilePaths', $deployCompressedOutput) >> $env:GITHUB_OUTPUT + + Write-Output '::endgroup::' + + Write-Output '::group::Get PSRule test files' + $psRuleTestFilePaths = $testFilePaths | Where-Object { $_ -match '${{ inputs.psRuleFilterRegex }}' } + + Write-Verbose 'Found PSRule module test files' -Verbose + $psRuleTestFilePaths | ForEach-Object { Write-Verbose "- [$_]" -Verbose } + + # Output values to be accessed by next jobs + $psRuleCompressedOutput = $psRuleTestFilePaths | ForEach-Object { + @{ + moduleTestFilePath = $_ + moduleTestFileName = Split-Path (Split-Path $_) -Leaf + } + } | ConvertTo-Json -Compress + + if($psRuleCompressedOutput -notmatch "\[.*\]") { + $psRuleCompressedOutput = "[$psRuleCompressedOutput]" } - Write-Verbose "Publishing output: $compressedOutput" -Verbose - Write-Output ('{0}={1}' -f 'moduleTestFilePaths', $compressedOutput) >> $env:GITHUB_OUTPUT + Write-Verbose "Publishing output: $psRuleCompressedOutput" -Verbose + Write-Output ('{0}={1}' -f 'psRuleModuleTestFilePaths', $psRuleCompressedOutput) >> $env:GITHUB_OUTPUT + Write-Output '::endgroup::' diff --git a/.github/actions/templates/validateModulePSRule/action.yml b/.github/actions/templates/validateModulePSRule/action.yml index 2f052b6e6c..db5ac2cfbb 100644 --- a/.github/actions/templates/validateModulePSRule/action.yml +++ b/.github/actions/templates/validateModulePSRule/action.yml @@ -10,13 +10,14 @@ ## ACTION PARAMETERS ## ##-------------------------------------------## ## -## |=================================================================================================================================================================| -## | Parameter | Required | Default | Description | Example | -## |--------------------------|----------|---------|--------------------------------------|--------------------------------------------------------------------------| -## | templateFilePath | true | '' | The path to the module PSRule tests. | 'modules/api-management/service/.test/common/main.test.bicep' | -## | subscriptionId | false | '' | The subscriptionId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | -## | managementGroupId | false | '' | The managementGroupId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | -## |=================================================================================================================================================================| +## |=============================================================================================================================================================================================| +## | Parameter | Required | Default | Description | Example | +## |--------------------------|----------|-----------------------------------------------|---------------------------------------|---------------------------------------------------------------| +## | templateFilePath | true | '' | The path to the template to test. | 'modules/api-management/service/.test/common/main.test.bicep' | +## | subscriptionId | false | '' | The subscriptionId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | +## | managementGroupId | false | '' | The managementGroupId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | +## | psrulePath | false | 'utilities/pipelines/staticValidation/psrule' | The path to the PS-Rule configuration | 'utilities/pipelines/staticValidation/psrule' | +## |=============================================================================================================================================================================================| ## ##---------------------------------------------## @@ -34,6 +35,10 @@ inputs: managementGroupId: description: 'The management group ID to deploy to' required: false + psrulePath: + description: 'The path to PSRule configurations' + required: false + default: 'utilities/pipelines/staticValidation/psrule' runs: using: 'composite' @@ -89,15 +94,19 @@ runs: Write-Output '::endgroup::' - # Run analysis by using the PSRule GitHub action. + # [PSRule validation] task(s) + #----------------------------- - name: Run PSRule analysis - uses: microsoft/ps-rule@v2.4.0 + uses: microsoft/ps-rule@v2.9.0 continue-on-error: true # Setting this whilst PSRule gets bedded in, in this project with: modules: 'PSRule.Rules.Azure' inputPath: '${{ inputs.templateFilePath}}' outputFormat: Csv outputPath: '${{ inputs.templateFilePath}}-PSRule-output.csv' + option: '${{ github.workspace }}/${{ inputs.psrulePath}}/ps-rule.yaml' # Path to PSRule configuration options file + source: '${{ inputs.psrulePath}}/.ps-rule/' # Path to folder containing suppression rules to use for analysis. + summary: false # Disabling as taken care in customized task - name: 'Parse CSV content' if: always() @@ -109,7 +118,7 @@ runs: Write-Output '::group::Parse CSV content' # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'PSRuleValidation' 'Set-PSRuleGitHubOutput.ps1') + . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'pipelines' 'staticValidation' 'psrule' 'Set-PSRuleGitHubOutput.ps1') # Populate parameter input $ParameterInput = @{ diff --git a/.github/actions/templates/validateModulePester/action.yml b/.github/actions/templates/validateModulePester/action.yml index 93e10958ac..2735629954 100644 --- a/.github/actions/templates/validateModulePester/action.yml +++ b/.github/actions/templates/validateModulePester/action.yml @@ -10,12 +10,12 @@ ## ACTION PARAMETERS ## ##-------------------------------------------## ## -## |==================================================================================================================================================| -## | Parameter | Required | Default | Description | Example | -## |--------------------------|----------|---------|--------------------------------------|-----------------------------------------------------------| -## | modulePath | true | '' | The path to the module's folder | 'modules/api-management/service' | -## | moduleTestFilePath | true | '' | The path to the module Pester tests. | 'utilities/pipelines/staticValidation/module.tests.ps1' | -## |==================================================================================================================================================| +## |==================================================================================================================================================================================================| +## | Parameter | Required | Default | Description | Example | +## |--------------------------|----------|---------------------------------------------------------|--------------------------------------|-----------------------------------------------------------| +## | modulePath | true | '' | The path to the module's folder | 'modules/api-management/service' | +## | moduleTestFilePath | true | 'utilities/pipelines/staticValidation/module.tests.ps1' | The path to the module Pester tests. | 'utilities/pipelines/staticValidation/module.tests.ps1' | +## |==================================================================================================================================================================================================| ## ##---------------------------------------------## @@ -29,8 +29,8 @@ inputs: default: '' moduleTestFilePath: description: 'The path to the test file' - required: true - default: '' + required: false + default: 'utilities/pipelines/staticValidation/module.tests.ps1' runs: using: 'composite' diff --git a/.github/workflows/ms.aad.domainservices.yml b/.github/workflows/ms.aad.domainservices.yml index a0c6994f44..3838d75f8d 100644 --- a/.github/workflows/ms.aad.domainservices.yml +++ b/.github/workflows/ms.aad.domainservices.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.analysisservices.servers.yml b/.github/workflows/ms.analysisservices.servers.yml index 1b6112c79a..81e7e512f0 100644 --- a/.github/workflows/ms.analysisservices.servers.yml +++ b/.github/workflows/ms.analysisservices.servers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.apimanagement.service.yml b/.github/workflows/ms.apimanagement.service.yml index 7f2e468384..e8bcb69cf7 100644 --- a/.github/workflows/ms.apimanagement.service.yml +++ b/.github/workflows/ms.apimanagement.service.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.app.containerapps.yml b/.github/workflows/ms.app.containerapps.yml index eef3ba994d..e63895a4e9 100644 --- a/.github/workflows/ms.app.containerapps.yml +++ b/.github/workflows/ms.app.containerapps.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.app.jobs.yml b/.github/workflows/ms.app.jobs.yml index bde1eff318..fea840af78 100644 --- a/.github/workflows/ms.app.jobs.yml +++ b/.github/workflows/ms.app.jobs.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.app.managedenvironments.yml b/.github/workflows/ms.app.managedenvironments.yml index 8d4b40c46f..690271d658 100644 --- a/.github/workflows/ms.app.managedenvironments.yml +++ b/.github/workflows/ms.app.managedenvironments.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.appconfiguration.configurationstores.yml b/.github/workflows/ms.appconfiguration.configurationstores.yml index 482c2c8701..5039b5f7f4 100644 --- a/.github/workflows/ms.appconfiguration.configurationstores.yml +++ b/.github/workflows/ms.appconfiguration.configurationstores.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.locks.yml b/.github/workflows/ms.authorization.locks.yml index c61e151638..1219a3e0af 100644 --- a/.github/workflows/ms.authorization.locks.yml +++ b/.github/workflows/ms.authorization.locks.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.policyassignments.yml b/.github/workflows/ms.authorization.policyassignments.yml index e72e96b7e4..1c2fa4d67e 100644 --- a/.github/workflows/ms.authorization.policyassignments.yml +++ b/.github/workflows/ms.authorization.policyassignments.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.policydefinitions.yml b/.github/workflows/ms.authorization.policydefinitions.yml index c0373b819c..149e2b1d98 100644 --- a/.github/workflows/ms.authorization.policydefinitions.yml +++ b/.github/workflows/ms.authorization.policydefinitions.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.policyexemptions.yml b/.github/workflows/ms.authorization.policyexemptions.yml index e71c5179fb..6830dd3553 100644 --- a/.github/workflows/ms.authorization.policyexemptions.yml +++ b/.github/workflows/ms.authorization.policyexemptions.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.policysetdefinitions.yml b/.github/workflows/ms.authorization.policysetdefinitions.yml index 71867097ec..a4d66671c5 100644 --- a/.github/workflows/ms.authorization.policysetdefinitions.yml +++ b/.github/workflows/ms.authorization.policysetdefinitions.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.roleassignments.yml b/.github/workflows/ms.authorization.roleassignments.yml index 5bce87ae6e..f187d2a64a 100644 --- a/.github/workflows/ms.authorization.roleassignments.yml +++ b/.github/workflows/ms.authorization.roleassignments.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.authorization.roledefinitions.yml b/.github/workflows/ms.authorization.roledefinitions.yml index b0b2d0a719..8801b43d5a 100644 --- a/.github/workflows/ms.authorization.roledefinitions.yml +++ b/.github/workflows/ms.authorization.roledefinitions.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.automation.automationaccounts.yml b/.github/workflows/ms.automation.automationaccounts.yml index b7dd50b978..be9a382e53 100644 --- a/.github/workflows/ms.automation.automationaccounts.yml +++ b/.github/workflows/ms.automation.automationaccounts.yml @@ -51,7 +51,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -63,7 +63,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -71,18 +71,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.batch.batchaccounts.yml b/.github/workflows/ms.batch.batchaccounts.yml index 03e1407a97..88eaa28850 100644 --- a/.github/workflows/ms.batch.batchaccounts.yml +++ b/.github/workflows/ms.batch.batchaccounts.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.cache.redis.yml b/.github/workflows/ms.cache.redis.yml index 9007689102..a9062fe3db 100644 --- a/.github/workflows/ms.cache.redis.yml +++ b/.github/workflows/ms.cache.redis.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.cache.redisenterprise.yml b/.github/workflows/ms.cache.redisenterprise.yml index f61822f658..b5eb3bd6d9 100644 --- a/.github/workflows/ms.cache.redisenterprise.yml +++ b/.github/workflows/ms.cache.redisenterprise.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.cdn.profiles.yml b/.github/workflows/ms.cdn.profiles.yml index 7d7b947dec..1ddb081db2 100644 --- a/.github/workflows/ms.cdn.profiles.yml +++ b/.github/workflows/ms.cdn.profiles.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.cognitiveservices.accounts.yml b/.github/workflows/ms.cognitiveservices.accounts.yml index 1c701ea118..ae20ac429d 100644 --- a/.github/workflows/ms.cognitiveservices.accounts.yml +++ b/.github/workflows/ms.cognitiveservices.accounts.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.availabilitysets.yml b/.github/workflows/ms.compute.availabilitysets.yml index 46bd78d9b5..4460c6e8f6 100644 --- a/.github/workflows/ms.compute.availabilitysets.yml +++ b/.github/workflows/ms.compute.availabilitysets.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.diskencryptionsets.yml b/.github/workflows/ms.compute.diskencryptionsets.yml index 61b107ac57..c4d7e35753 100644 --- a/.github/workflows/ms.compute.diskencryptionsets.yml +++ b/.github/workflows/ms.compute.diskencryptionsets.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.disks.yml b/.github/workflows/ms.compute.disks.yml index c32d9b8e25..efde02e463 100644 --- a/.github/workflows/ms.compute.disks.yml +++ b/.github/workflows/ms.compute.disks.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.galleries.yml b/.github/workflows/ms.compute.galleries.yml index 1666408461..f9d53a2988 100644 --- a/.github/workflows/ms.compute.galleries.yml +++ b/.github/workflows/ms.compute.galleries.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.images.yml b/.github/workflows/ms.compute.images.yml index b38045cea3..54b80a01e9 100644 --- a/.github/workflows/ms.compute.images.yml +++ b/.github/workflows/ms.compute.images.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.proximityplacementgroups.yml b/.github/workflows/ms.compute.proximityplacementgroups.yml index f948bdf889..3a74eab881 100644 --- a/.github/workflows/ms.compute.proximityplacementgroups.yml +++ b/.github/workflows/ms.compute.proximityplacementgroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.sshpublickeys.yml b/.github/workflows/ms.compute.sshpublickeys.yml index 3e063e68c5..3687e73949 100644 --- a/.github/workflows/ms.compute.sshpublickeys.yml +++ b/.github/workflows/ms.compute.sshpublickeys.yml @@ -46,7 +46,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -58,7 +58,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -66,18 +66,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.virtualmachines.yml b/.github/workflows/ms.compute.virtualmachines.yml index f6e7889233..fce9e7f804 100644 --- a/.github/workflows/ms.compute.virtualmachines.yml +++ b/.github/workflows/ms.compute.virtualmachines.yml @@ -50,7 +50,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -62,7 +62,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -70,18 +70,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.compute.virtualmachinescalesets.yml b/.github/workflows/ms.compute.virtualmachinescalesets.yml index 1914a4b01a..b615e9641b 100644 --- a/.github/workflows/ms.compute.virtualmachinescalesets.yml +++ b/.github/workflows/ms.compute.virtualmachinescalesets.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.consumption.budgets.yml b/.github/workflows/ms.consumption.budgets.yml index b8c4032d49..b731b3289b 100644 --- a/.github/workflows/ms.consumption.budgets.yml +++ b/.github/workflows/ms.consumption.budgets.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.containerinstance.containergroups.yml b/.github/workflows/ms.containerinstance.containergroups.yml index 4728696318..db8a34b286 100644 --- a/.github/workflows/ms.containerinstance.containergroups.yml +++ b/.github/workflows/ms.containerinstance.containergroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.containerregistry.registries.yml b/.github/workflows/ms.containerregistry.registries.yml index 191829635a..c7deeaf57a 100644 --- a/.github/workflows/ms.containerregistry.registries.yml +++ b/.github/workflows/ms.containerregistry.registries.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.containerservice.managedclusters.yml b/.github/workflows/ms.containerservice.managedclusters.yml index 7ab99433dd..9ee2da4a99 100644 --- a/.github/workflows/ms.containerservice.managedclusters.yml +++ b/.github/workflows/ms.containerservice.managedclusters.yml @@ -49,7 +49,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -61,7 +61,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -69,18 +69,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.databricks.accessconnectors.yml b/.github/workflows/ms.databricks.accessconnectors.yml index 8a6c4d076d..846ec3422e 100644 --- a/.github/workflows/ms.databricks.accessconnectors.yml +++ b/.github/workflows/ms.databricks.accessconnectors.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.databricks.workspaces.yml b/.github/workflows/ms.databricks.workspaces.yml index 90e7614604..c2650a4471 100644 --- a/.github/workflows/ms.databricks.workspaces.yml +++ b/.github/workflows/ms.databricks.workspaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.datafactory.factories.yml b/.github/workflows/ms.datafactory.factories.yml index 9d59489afe..8c9eb2adaa 100644 --- a/.github/workflows/ms.datafactory.factories.yml +++ b/.github/workflows/ms.datafactory.factories.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.dataprotection.backupvaults.yml b/.github/workflows/ms.dataprotection.backupvaults.yml index 8697537f1f..d3aa2b25f2 100644 --- a/.github/workflows/ms.dataprotection.backupvaults.yml +++ b/.github/workflows/ms.dataprotection.backupvaults.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.dbformysql.flexibleservers.yml b/.github/workflows/ms.dbformysql.flexibleservers.yml index 84a408e9c2..045a8ca5e8 100644 --- a/.github/workflows/ms.dbformysql.flexibleservers.yml +++ b/.github/workflows/ms.dbformysql.flexibleservers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.dbforpostgresql.flexibleservers.yml b/.github/workflows/ms.dbforpostgresql.flexibleservers.yml index e3ee92834d..f7f8a84354 100644 --- a/.github/workflows/ms.dbforpostgresql.flexibleservers.yml +++ b/.github/workflows/ms.dbforpostgresql.flexibleservers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml index 1545aef23d..f802a18cca 100644 --- a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml +++ b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.desktopvirtualization.hostpools.yml b/.github/workflows/ms.desktopvirtualization.hostpools.yml index d14ec4b8d5..a9648518b6 100644 --- a/.github/workflows/ms.desktopvirtualization.hostpools.yml +++ b/.github/workflows/ms.desktopvirtualization.hostpools.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.desktopvirtualization.scalingplans.yml b/.github/workflows/ms.desktopvirtualization.scalingplans.yml index 890280846f..cb931c5015 100644 --- a/.github/workflows/ms.desktopvirtualization.scalingplans.yml +++ b/.github/workflows/ms.desktopvirtualization.scalingplans.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.desktopvirtualization.workspaces.yml b/.github/workflows/ms.desktopvirtualization.workspaces.yml index 786990b0a3..1158d55d64 100644 --- a/.github/workflows/ms.desktopvirtualization.workspaces.yml +++ b/.github/workflows/ms.desktopvirtualization.workspaces.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.devtestlab.labs.yml b/.github/workflows/ms.devtestlab.labs.yml index 9f84e4bdeb..67b2cc142c 100644 --- a/.github/workflows/ms.devtestlab.labs.yml +++ b/.github/workflows/ms.devtestlab.labs.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.digitaltwins.digitaltwinsinstances.yml b/.github/workflows/ms.digitaltwins.digitaltwinsinstances.yml index d92c0c803f..31e9a45f37 100644 --- a/.github/workflows/ms.digitaltwins.digitaltwinsinstances.yml +++ b/.github/workflows/ms.digitaltwins.digitaltwinsinstances.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.documentdb.databaseaccounts.yml b/.github/workflows/ms.documentdb.databaseaccounts.yml index f97a702ba8..f17979e77c 100644 --- a/.github/workflows/ms.documentdb.databaseaccounts.yml +++ b/.github/workflows/ms.documentdb.databaseaccounts.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.eventgrid.domains.yml b/.github/workflows/ms.eventgrid.domains.yml index 069b9ad36c..0994d2adb0 100644 --- a/.github/workflows/ms.eventgrid.domains.yml +++ b/.github/workflows/ms.eventgrid.domains.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.eventgrid.systemtopics.yml b/.github/workflows/ms.eventgrid.systemtopics.yml index 7bb4cffd6a..5e9d467ee5 100644 --- a/.github/workflows/ms.eventgrid.systemtopics.yml +++ b/.github/workflows/ms.eventgrid.systemtopics.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.eventgrid.topics.yml b/.github/workflows/ms.eventgrid.topics.yml index 1abd156fdb..74dac0bd1a 100644 --- a/.github/workflows/ms.eventgrid.topics.yml +++ b/.github/workflows/ms.eventgrid.topics.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.eventhub.namespaces.yml b/.github/workflows/ms.eventhub.namespaces.yml index 38e74b51e9..54943f5b25 100644 --- a/.github/workflows/ms.eventhub.namespaces.yml +++ b/.github/workflows/ms.eventhub.namespaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.healthbot.healthbots.yml b/.github/workflows/ms.healthbot.healthbots.yml index 85f6e0cdaf..51a6791c2f 100644 --- a/.github/workflows/ms.healthbot.healthbots.yml +++ b/.github/workflows/ms.healthbot.healthbots.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.healthcareapis.workspaces.yml b/.github/workflows/ms.healthcareapis.workspaces.yml index 718ece3502..90e66d6fba 100644 --- a/.github/workflows/ms.healthcareapis.workspaces.yml +++ b/.github/workflows/ms.healthcareapis.workspaces.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.actiongroups.yml b/.github/workflows/ms.insights.actiongroups.yml index 7cecc95f02..7c17fd6518 100644 --- a/.github/workflows/ms.insights.actiongroups.yml +++ b/.github/workflows/ms.insights.actiongroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.activitylogalerts.yml b/.github/workflows/ms.insights.activitylogalerts.yml index 51a1ce2318..7152f01c15 100644 --- a/.github/workflows/ms.insights.activitylogalerts.yml +++ b/.github/workflows/ms.insights.activitylogalerts.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.components.yml b/.github/workflows/ms.insights.components.yml index 3e9506f5f2..04dcb2bb39 100644 --- a/.github/workflows/ms.insights.components.yml +++ b/.github/workflows/ms.insights.components.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.datacollectionendpoints.yml b/.github/workflows/ms.insights.datacollectionendpoints.yml index f8ff6db09e..aa7f89ae1a 100644 --- a/.github/workflows/ms.insights.datacollectionendpoints.yml +++ b/.github/workflows/ms.insights.datacollectionendpoints.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.datacollectionrules.yml b/.github/workflows/ms.insights.datacollectionrules.yml index 150833c295..bb0e39cf6c 100644 --- a/.github/workflows/ms.insights.datacollectionrules.yml +++ b/.github/workflows/ms.insights.datacollectionrules.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.diagnosticsettings.yml b/.github/workflows/ms.insights.diagnosticsettings.yml index 219bc552fd..39bfa87af2 100644 --- a/.github/workflows/ms.insights.diagnosticsettings.yml +++ b/.github/workflows/ms.insights.diagnosticsettings.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.metricalerts.yml b/.github/workflows/ms.insights.metricalerts.yml index 304d04e326..9571677572 100644 --- a/.github/workflows/ms.insights.metricalerts.yml +++ b/.github/workflows/ms.insights.metricalerts.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.privatelinkscopes.yml b/.github/workflows/ms.insights.privatelinkscopes.yml index 5600269a78..a0589ccd31 100644 --- a/.github/workflows/ms.insights.privatelinkscopes.yml +++ b/.github/workflows/ms.insights.privatelinkscopes.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.scheduledqueryrules.yml b/.github/workflows/ms.insights.scheduledqueryrules.yml index f06533563c..b532a6d62e 100644 --- a/.github/workflows/ms.insights.scheduledqueryrules.yml +++ b/.github/workflows/ms.insights.scheduledqueryrules.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.insights.webtests.yml b/.github/workflows/ms.insights.webtests.yml index f0badf64c6..a6da3e3e71 100644 --- a/.github/workflows/ms.insights.webtests.yml +++ b/.github/workflows/ms.insights.webtests.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.keyvault.vaults.yml b/.github/workflows/ms.keyvault.vaults.yml index d34edcf8af..203f45c2ef 100644 --- a/.github/workflows/ms.keyvault.vaults.yml +++ b/.github/workflows/ms.keyvault.vaults.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.kubernetesconfiguration.extensions.yml b/.github/workflows/ms.kubernetesconfiguration.extensions.yml index 96d2b238ef..38b005fe1c 100644 --- a/.github/workflows/ms.kubernetesconfiguration.extensions.yml +++ b/.github/workflows/ms.kubernetesconfiguration.extensions.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml b/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml index e538204821..7474b1ee95 100644 --- a/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml +++ b/.github/workflows/ms.kubernetesconfiguration.fluxconfigurations.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.logic.workflows.yml b/.github/workflows/ms.logic.workflows.yml index d09183ab1a..8256c00c52 100644 --- a/.github/workflows/ms.logic.workflows.yml +++ b/.github/workflows/ms.logic.workflows.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.machinelearningservices.workspaces.yml b/.github/workflows/ms.machinelearningservices.workspaces.yml index 982e62084f..ff44758b40 100644 --- a/.github/workflows/ms.machinelearningservices.workspaces.yml +++ b/.github/workflows/ms.machinelearningservices.workspaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.maintenance.maintenanceconfigurations.yml b/.github/workflows/ms.maintenance.maintenanceconfigurations.yml index bcb865efd9..be1a339161 100644 --- a/.github/workflows/ms.maintenance.maintenanceconfigurations.yml +++ b/.github/workflows/ms.maintenance.maintenanceconfigurations.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.managedidentity.userassignedidentities.yml b/.github/workflows/ms.managedidentity.userassignedidentities.yml index f20ba0edf8..2e2a67f9d4 100644 --- a/.github/workflows/ms.managedidentity.userassignedidentities.yml +++ b/.github/workflows/ms.managedidentity.userassignedidentities.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.managedservices.registrationdefinitions.yml b/.github/workflows/ms.managedservices.registrationdefinitions.yml index b63f35ec89..6abd0d22c1 100644 --- a/.github/workflows/ms.managedservices.registrationdefinitions.yml +++ b/.github/workflows/ms.managedservices.registrationdefinitions.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.management.managementgroups.yml b/.github/workflows/ms.management.managementgroups.yml index 59b78ab4b6..6839f970f7 100644 --- a/.github/workflows/ms.management.managementgroups.yml +++ b/.github/workflows/ms.management.managementgroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.netapp.netappaccounts.yml b/.github/workflows/ms.netapp.netappaccounts.yml index 0ce0114907..b762db6484 100644 --- a/.github/workflows/ms.netapp.netappaccounts.yml +++ b/.github/workflows/ms.netapp.netappaccounts.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.applicationgateways.yml b/.github/workflows/ms.network.applicationgateways.yml index 5ebffcbfa2..351e2769fb 100644 --- a/.github/workflows/ms.network.applicationgateways.yml +++ b/.github/workflows/ms.network.applicationgateways.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml b/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml index d81b6967d0..506a2d30c8 100644 --- a/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml +++ b/.github/workflows/ms.network.applicationgatewaywebapplicationfirewallpolicies.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.applicationsecuritygroups.yml b/.github/workflows/ms.network.applicationsecuritygroups.yml index b660216ac5..6cd9906acc 100644 --- a/.github/workflows/ms.network.applicationsecuritygroups.yml +++ b/.github/workflows/ms.network.applicationsecuritygroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.azurefirewalls.yml b/.github/workflows/ms.network.azurefirewalls.yml index d4d9dc0794..72c0059342 100644 --- a/.github/workflows/ms.network.azurefirewalls.yml +++ b/.github/workflows/ms.network.azurefirewalls.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.bastionhosts.yml b/.github/workflows/ms.network.bastionhosts.yml index 583f7f716d..26182061c2 100644 --- a/.github/workflows/ms.network.bastionhosts.yml +++ b/.github/workflows/ms.network.bastionhosts.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.connections.yml b/.github/workflows/ms.network.connections.yml index 18a2b5a92c..0c688725e3 100644 --- a/.github/workflows/ms.network.connections.yml +++ b/.github/workflows/ms.network.connections.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.ddosprotectionplans.yml b/.github/workflows/ms.network.ddosprotectionplans.yml index 8ac944f013..6769bcc407 100644 --- a/.github/workflows/ms.network.ddosprotectionplans.yml +++ b/.github/workflows/ms.network.ddosprotectionplans.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.dnsforwardingrulesets.yml b/.github/workflows/ms.network.dnsforwardingrulesets.yml index 7811c594bd..75e8800cd2 100644 --- a/.github/workflows/ms.network.dnsforwardingrulesets.yml +++ b/.github/workflows/ms.network.dnsforwardingrulesets.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.dnsresolvers.yml b/.github/workflows/ms.network.dnsresolvers.yml index 94a01588cb..6073602274 100644 --- a/.github/workflows/ms.network.dnsresolvers.yml +++ b/.github/workflows/ms.network.dnsresolvers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.dnszones.yml b/.github/workflows/ms.network.dnszones.yml index 673a4c5008..0f86a57d08 100644 --- a/.github/workflows/ms.network.dnszones.yml +++ b/.github/workflows/ms.network.dnszones.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.expressroutecircuits.yml b/.github/workflows/ms.network.expressroutecircuits.yml index b28e5385ec..6245494b18 100644 --- a/.github/workflows/ms.network.expressroutecircuits.yml +++ b/.github/workflows/ms.network.expressroutecircuits.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.expressroutegateways.yml b/.github/workflows/ms.network.expressroutegateways.yml index 81e5604306..5e79b638ad 100644 --- a/.github/workflows/ms.network.expressroutegateways.yml +++ b/.github/workflows/ms.network.expressroutegateways.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.firewallpolicies.yml b/.github/workflows/ms.network.firewallpolicies.yml index 7b64a673ad..c9f4e2e263 100644 --- a/.github/workflows/ms.network.firewallpolicies.yml +++ b/.github/workflows/ms.network.firewallpolicies.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.frontdoors.yml b/.github/workflows/ms.network.frontdoors.yml index 00501d5814..e64e37e7b8 100644 --- a/.github/workflows/ms.network.frontdoors.yml +++ b/.github/workflows/ms.network.frontdoors.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.frontdoorwebapplicationfirewallpolicies.yml b/.github/workflows/ms.network.frontdoorwebapplicationfirewallpolicies.yml index effaa6dfcb..fd5f20d2ac 100644 --- a/.github/workflows/ms.network.frontdoorwebapplicationfirewallpolicies.yml +++ b/.github/workflows/ms.network.frontdoorwebapplicationfirewallpolicies.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.ipgroups.yml b/.github/workflows/ms.network.ipgroups.yml index b80c01dfee..101c93931d 100644 --- a/.github/workflows/ms.network.ipgroups.yml +++ b/.github/workflows/ms.network.ipgroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.loadbalancers.yml b/.github/workflows/ms.network.loadbalancers.yml index 8b43df88d7..7a79054167 100644 --- a/.github/workflows/ms.network.loadbalancers.yml +++ b/.github/workflows/ms.network.loadbalancers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.localnetworkgateways.yml b/.github/workflows/ms.network.localnetworkgateways.yml index 0d5a48da8b..7dfb0429ec 100644 --- a/.github/workflows/ms.network.localnetworkgateways.yml +++ b/.github/workflows/ms.network.localnetworkgateways.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.natgateways.yml b/.github/workflows/ms.network.natgateways.yml index 7cbb0c2281..8921747ba0 100644 --- a/.github/workflows/ms.network.natgateways.yml +++ b/.github/workflows/ms.network.natgateways.yml @@ -49,7 +49,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -61,7 +61,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -69,18 +69,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.networkinterfaces.yml b/.github/workflows/ms.network.networkinterfaces.yml index e8b4bba214..7caa2f2b79 100644 --- a/.github/workflows/ms.network.networkinterfaces.yml +++ b/.github/workflows/ms.network.networkinterfaces.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.networkmanagers.yml b/.github/workflows/ms.network.networkmanagers.yml index 3ca4f93377..73b9a6a0dc 100644 --- a/.github/workflows/ms.network.networkmanagers.yml +++ b/.github/workflows/ms.network.networkmanagers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.networksecuritygroups.yml b/.github/workflows/ms.network.networksecuritygroups.yml index 4eb4c1c09a..13a4ea488b 100644 --- a/.github/workflows/ms.network.networksecuritygroups.yml +++ b/.github/workflows/ms.network.networksecuritygroups.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.networkwatchers.yml b/.github/workflows/ms.network.networkwatchers.yml index 4f2d015c5e..cbccdcc377 100644 --- a/.github/workflows/ms.network.networkwatchers.yml +++ b/.github/workflows/ms.network.networkwatchers.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.privatednszones.yml b/.github/workflows/ms.network.privatednszones.yml index 67da06f595..ed46652e16 100644 --- a/.github/workflows/ms.network.privatednszones.yml +++ b/.github/workflows/ms.network.privatednszones.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.privateendpoints.yml b/.github/workflows/ms.network.privateendpoints.yml index 9b02a26023..81e7dbe824 100644 --- a/.github/workflows/ms.network.privateendpoints.yml +++ b/.github/workflows/ms.network.privateendpoints.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.privatelinkservices.yml b/.github/workflows/ms.network.privatelinkservices.yml index e622625946..449665bed2 100644 --- a/.github/workflows/ms.network.privatelinkservices.yml +++ b/.github/workflows/ms.network.privatelinkservices.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.publicipaddresses.yml b/.github/workflows/ms.network.publicipaddresses.yml index ebcb21bf2c..36bb06dc09 100644 --- a/.github/workflows/ms.network.publicipaddresses.yml +++ b/.github/workflows/ms.network.publicipaddresses.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.publicipprefixes.yml b/.github/workflows/ms.network.publicipprefixes.yml index db391eaf7d..0b4bb80ab0 100644 --- a/.github/workflows/ms.network.publicipprefixes.yml +++ b/.github/workflows/ms.network.publicipprefixes.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.routetables.yml b/.github/workflows/ms.network.routetables.yml index 936accf277..d9a19de1b8 100644 --- a/.github/workflows/ms.network.routetables.yml +++ b/.github/workflows/ms.network.routetables.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.serviceendpointpolicies.yml b/.github/workflows/ms.network.serviceendpointpolicies.yml index 9afc417756..91b9d0b3e8 100644 --- a/.github/workflows/ms.network.serviceendpointpolicies.yml +++ b/.github/workflows/ms.network.serviceendpointpolicies.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.trafficmanagerprofiles.yml b/.github/workflows/ms.network.trafficmanagerprofiles.yml index ef71e4bdcb..f5a2828349 100644 --- a/.github/workflows/ms.network.trafficmanagerprofiles.yml +++ b/.github/workflows/ms.network.trafficmanagerprofiles.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.virtualhubs.yml b/.github/workflows/ms.network.virtualhubs.yml index aafa9a1915..1fde462f3e 100644 --- a/.github/workflows/ms.network.virtualhubs.yml +++ b/.github/workflows/ms.network.virtualhubs.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.virtualnetworkgateways.yml b/.github/workflows/ms.network.virtualnetworkgateways.yml index 0281596767..65b618972b 100644 --- a/.github/workflows/ms.network.virtualnetworkgateways.yml +++ b/.github/workflows/ms.network.virtualnetworkgateways.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.virtualnetworks.yml b/.github/workflows/ms.network.virtualnetworks.yml index 62613c6abd..d1496dd677 100644 --- a/.github/workflows/ms.network.virtualnetworks.yml +++ b/.github/workflows/ms.network.virtualnetworks.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.virtualwans.yml b/.github/workflows/ms.network.virtualwans.yml index f46af1f821..9063fa6729 100644 --- a/.github/workflows/ms.network.virtualwans.yml +++ b/.github/workflows/ms.network.virtualwans.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.vpngateways.yml b/.github/workflows/ms.network.vpngateways.yml index 1fbae28f09..8402965380 100644 --- a/.github/workflows/ms.network.vpngateways.yml +++ b/.github/workflows/ms.network.vpngateways.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.network.vpnsites.yml b/.github/workflows/ms.network.vpnsites.yml index 3f134e4ab3..0b52aeccd3 100644 --- a/.github/workflows/ms.network.vpnsites.yml +++ b/.github/workflows/ms.network.vpnsites.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.operationalinsights.workspaces.yml b/.github/workflows/ms.operationalinsights.workspaces.yml index 14f1dfce82..f712ce8fe4 100644 --- a/.github/workflows/ms.operationalinsights.workspaces.yml +++ b/.github/workflows/ms.operationalinsights.workspaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.operationsmanagement.solutions.yml b/.github/workflows/ms.operationsmanagement.solutions.yml index ad898a5b82..5d13141169 100644 --- a/.github/workflows/ms.operationsmanagement.solutions.yml +++ b/.github/workflows/ms.operationsmanagement.solutions.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.policyinsights.remediations.yml b/.github/workflows/ms.policyinsights.remediations.yml index 8ea4040e18..46e7b15273 100644 --- a/.github/workflows/ms.policyinsights.remediations.yml +++ b/.github/workflows/ms.policyinsights.remediations.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.powerbidedicated.capacities.yml b/.github/workflows/ms.powerbidedicated.capacities.yml index c381a5dd24..54a124bde0 100644 --- a/.github/workflows/ms.powerbidedicated.capacities.yml +++ b/.github/workflows/ms.powerbidedicated.capacities.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.purview.accounts.yml b/.github/workflows/ms.purview.accounts.yml index e70ad519bf..0b07bde874 100644 --- a/.github/workflows/ms.purview.accounts.yml +++ b/.github/workflows/ms.purview.accounts.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.recoveryservices.vaults.yml b/.github/workflows/ms.recoveryservices.vaults.yml index 40e1ff39b8..48153fea2e 100644 --- a/.github/workflows/ms.recoveryservices.vaults.yml +++ b/.github/workflows/ms.recoveryservices.vaults.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.relay.namespaces.yml b/.github/workflows/ms.relay.namespaces.yml index 34f3dd0720..18863f5ae1 100644 --- a/.github/workflows/ms.relay.namespaces.yml +++ b/.github/workflows/ms.relay.namespaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.resourcegraph.queries.yml b/.github/workflows/ms.resourcegraph.queries.yml index c875d7cbc7..0d0176530e 100644 --- a/.github/workflows/ms.resourcegraph.queries.yml +++ b/.github/workflows/ms.resourcegraph.queries.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.resources.deploymentscripts.yml b/.github/workflows/ms.resources.deploymentscripts.yml index 45ca2cf28c..b9341bcdaf 100644 --- a/.github/workflows/ms.resources.deploymentscripts.yml +++ b/.github/workflows/ms.resources.deploymentscripts.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.resources.resourcegroups.yml b/.github/workflows/ms.resources.resourcegroups.yml index 996fc00bb0..25717d6dfd 100644 --- a/.github/workflows/ms.resources.resourcegroups.yml +++ b/.github/workflows/ms.resources.resourcegroups.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.resources.tags.yml b/.github/workflows/ms.resources.tags.yml index e7c2361a64..61c1f9fe09 100644 --- a/.github/workflows/ms.resources.tags.yml +++ b/.github/workflows/ms.resources.tags.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.search.searchservices.yml b/.github/workflows/ms.search.searchservices.yml index ee7f27ea4a..f945dfa88a 100644 --- a/.github/workflows/ms.search.searchservices.yml +++ b/.github/workflows/ms.search.searchservices.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.security.azuresecuritycenter.yml b/.github/workflows/ms.security.azuresecuritycenter.yml index a4081ca227..b18ce4e5bd 100644 --- a/.github/workflows/ms.security.azuresecuritycenter.yml +++ b/.github/workflows/ms.security.azuresecuritycenter.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.servicebus.namespaces.yml b/.github/workflows/ms.servicebus.namespaces.yml index d861580ae1..8984b60a74 100644 --- a/.github/workflows/ms.servicebus.namespaces.yml +++ b/.github/workflows/ms.servicebus.namespaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.servicefabric.clusters.yml b/.github/workflows/ms.servicefabric.clusters.yml index 81e006a569..9f57a3327c 100644 --- a/.github/workflows/ms.servicefabric.clusters.yml +++ b/.github/workflows/ms.servicefabric.clusters.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.signalrservice.signalr.yml b/.github/workflows/ms.signalrservice.signalr.yml index a786e71548..6dfd823925 100644 --- a/.github/workflows/ms.signalrservice.signalr.yml +++ b/.github/workflows/ms.signalrservice.signalr.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.signalrservice.webpubsub.yml b/.github/workflows/ms.signalrservice.webpubsub.yml index be281f1791..460c1be832 100644 --- a/.github/workflows/ms.signalrservice.webpubsub.yml +++ b/.github/workflows/ms.signalrservice.webpubsub.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.sql.managedinstances.yml b/.github/workflows/ms.sql.managedinstances.yml index afc8baa49c..c4e5a6d327 100644 --- a/.github/workflows/ms.sql.managedinstances.yml +++ b/.github/workflows/ms.sql.managedinstances.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.sql.servers.yml b/.github/workflows/ms.sql.servers.yml index 92889a0fdd..b2a41e7018 100644 --- a/.github/workflows/ms.sql.servers.yml +++ b/.github/workflows/ms.sql.servers.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.storage.storageaccounts.yml b/.github/workflows/ms.storage.storageaccounts.yml index 11d2688358..5ef2db3c3d 100644 --- a/.github/workflows/ms.storage.storageaccounts.yml +++ b/.github/workflows/ms.storage.storageaccounts.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.synapse.privatelinkhubs.yml b/.github/workflows/ms.synapse.privatelinkhubs.yml index 3a960d63e2..db61860c53 100644 --- a/.github/workflows/ms.synapse.privatelinkhubs.yml +++ b/.github/workflows/ms.synapse.privatelinkhubs.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.synapse.workspaces.yml b/.github/workflows/ms.synapse.workspaces.yml index 1736e9d265..5321736606 100644 --- a/.github/workflows/ms.synapse.workspaces.yml +++ b/.github/workflows/ms.synapse.workspaces.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml index b06c1507a2..4bc1ba3d9e 100644 --- a/.github/workflows/ms.virtualmachineimages.imagetemplates.yml +++ b/.github/workflows/ms.virtualmachineimages.imagetemplates.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.web.connections.yml b/.github/workflows/ms.web.connections.yml index fd788f5ba0..57e841b8c4 100644 --- a/.github/workflows/ms.web.connections.yml +++ b/.github/workflows/ms.web.connections.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.web.hostingenvironments.yml b/.github/workflows/ms.web.hostingenvironments.yml index 70b5a977a2..ecb59cbbbe 100644 --- a/.github/workflows/ms.web.hostingenvironments.yml +++ b/.github/workflows/ms.web.hostingenvironments.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.web.serverfarms.yml b/.github/workflows/ms.web.serverfarms.yml index da09c51d9f..3be3fa3788 100644 --- a/.github/workflows/ms.web.serverfarms.yml +++ b/.github/workflows/ms.web.serverfarms.yml @@ -47,7 +47,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -59,7 +59,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -67,18 +67,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.web.sites.yml b/.github/workflows/ms.web.sites.yml index f27f832917..2c2a12108e 100644 --- a/.github/workflows/ms.web.sites.yml +++ b/.github/workflows/ms.web.sites.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/ms.web.staticsites.yml b/.github/workflows/ms.web.staticsites.yml index c67da50a3f..7a32cca5ab 100644 --- a/.github/workflows/ms.web.staticsites.yml +++ b/.github/workflows/ms.web.staticsites.yml @@ -48,7 +48,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -60,7 +60,7 @@ jobs: uses: ./.github/actions/templates/getWorkflowInput with: workflowPath: '${{ env.workflowPath}}' - - name: 'Get parameter file paths' + - name: 'Get module test file paths' id: get-module-test-file-paths uses: ./.github/actions/templates/getModuleTestFiles with: @@ -68,18 +68,20 @@ jobs: outputs: workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }} moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }} + psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }} modulePath: '${{ env.modulePath }}' ############################## # Call reusable workflow # ############################## call-workflow-passing-data: - name: 'Module' + name: 'Run' needs: - job_initialize_pipeline uses: ./.github/workflows/template.module.yml with: workflowInput: '${{ needs.job_initialize_pipeline.outputs.workflowInput }}' moduleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}' + psRuleModuleTestFilePaths: '${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}' modulePath: '${{ needs.job_initialize_pipeline.outputs.modulePath}}' secrets: inherit diff --git a/.github/workflows/platform.apiSpecs.yml b/.github/workflows/platform.apiSpecs.yml index 239525f3d4..2c36d8bf84 100644 --- a/.github/workflows/platform.apiSpecs.yml +++ b/.github/workflows/platform.apiSpecs.yml @@ -13,7 +13,7 @@ jobs: job_update_api_specs_file: name: "Update file" if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: "Checkout" uses: actions/checkout@v4 diff --git a/.github/workflows/platform.deployment.history.cleanup.yml b/.github/workflows/platform.deployment.history.cleanup.yml index be586fce60..dcd2c68030 100644 --- a/.github/workflows/platform.deployment.history.cleanup.yml +++ b/.github/workflows/platform.deployment.history.cleanup.yml @@ -30,7 +30,7 @@ jobs: # Initialize pipeline # ########################### job_initialize_pipeline: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Initialize pipeline' steps: - name: 'Checkout' @@ -49,7 +49,7 @@ jobs: # Removal # ############### job_cleanup_subscription_deployments: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Remove Subscription deployments' needs: - job_initialize_pipeline @@ -90,7 +90,7 @@ jobs: azPSVersion: 'latest' job_cleanup_managementGroup_deployments: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Remove Management Group deployments' needs: - job_initialize_pipeline diff --git a/.github/workflows/platform.librarycheck.psrule.yml b/.github/workflows/platform.librarycheck.psrule.yml index c9ef889801..2add1905b2 100644 --- a/.github/workflows/platform.librarycheck.psrule.yml +++ b/.github/workflows/platform.librarycheck.psrule.yml @@ -13,7 +13,7 @@ env: jobs: psrule: name: 'PSRule validation' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: # Analyze module library with PSRule - name: Checkout diff --git a/.github/workflows/platform.updateReadMe.yml b/.github/workflows/platform.updateReadMe.yml index a84c71697a..943e15c902 100644 --- a/.github/workflows/platform.updateReadMe.yml +++ b/.github/workflows/platform.updateReadMe.yml @@ -23,7 +23,7 @@ env: jobs: job_update_readme: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: 'Update status tables' steps: - name: 'Checkout' diff --git a/.github/workflows/platform.updateStaticTestDocs.yml b/.github/workflows/platform.updateStaticTestDocs.yml index 27ab6caaa5..82c0474c7b 100644 --- a/.github/workflows/platform.updateStaticTestDocs.yml +++ b/.github/workflows/platform.updateStaticTestDocs.yml @@ -18,7 +18,7 @@ jobs: job_update_static_test_docs: name: "Update file" if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: "Checkout" uses: actions/checkout@v4 diff --git a/.github/workflows/template.module.yml b/.github/workflows/template.module.yml index f3f5b116e8..92d4db2c5e 100644 --- a/.github/workflows/template.module.yml +++ b/.github/workflows/template.module.yml @@ -11,6 +11,10 @@ on: type: string description: 'List of relative path to the module test files in JSON format' required: true + psRuleModuleTestFilePaths: + type: string + description: "List of relative path to the PSRule module test files in JSON format" + required: true modulePath: type: string description: 'Relative path to the module folder' @@ -30,7 +34,7 @@ jobs: ######################### job_module_static_validation: # Note: Please don't change this job name. It is used by the setEnvironment action to define which PS modules to install on runners. name: 'Static validation' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: (fromJson(inputs.workflowInput)).staticValidation == 'true' steps: - name: 'Checkout' @@ -45,30 +49,31 @@ jobs: uses: ./.github/actions/templates/validateModulePester with: modulePath: '${{ inputs.modulePath }}' - moduleTestFilePath: '${{ env.moduleTestFilePath }}' ######################### # PSRule validation # ######################### job_psrule_test: # Note: Please don't change this job name. It is used by the setEnvironment action to define which PS modules to install on runners. - name: 'PSRule validation' - runs-on: ubuntu-20.04 + name: "PSRule [${{ matrix.testCases.moduleTestFileName }}]" + runs-on: ubuntu-latest if: (fromJson(inputs.workflowInput)).staticValidation == 'true' strategy: fail-fast: false matrix: - moduleTestFilePaths: ${{ fromJson(inputs.moduleTestFilePaths) }} + testCases: ${{ fromJson(inputs.psRuleModuleTestFilePaths) }} steps: - - name: Checkout + - name: 'Checkout' uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set environment uses: ./.github/actions/templates/setEnvironment with: variablesPath: ${{ env.variablesPath }} - - name: Set PSRule validation + - name: "Run PSRule validation with [${{ matrix.testCases.moduleTestFilePath }}]" uses: ./.github/actions/templates/validateModulePSRule with: - templateFilePath: '${{ inputs.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: "${{ inputs.modulePath }}/${{ matrix.testCases.moduleTestFilePath }}" subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' @@ -76,8 +81,8 @@ jobs: # Deployment validation # ############################# job_module_deploy_validation: # Note: Please don't change this job name. It is used by the setEnvironment action to define which PS modules to install on runners. - name: 'Deployment validation' - runs-on: ubuntu-20.04 + name: 'Deploy [${{ matrix.testCases.moduleTestFileName}}]' + runs-on: ubuntu-latest if: | !cancelled() && (fromJson(inputs.workflowInput)).deploymentValidation == 'true' && @@ -88,7 +93,7 @@ jobs: strategy: fail-fast: false matrix: - moduleTestFilePaths: ${{ fromJson(inputs.moduleTestFilePaths) }} + testCases: ${{ fromJson(inputs.moduleTestFilePaths) }} steps: - name: 'Checkout' uses: actions/checkout@v4 @@ -99,10 +104,10 @@ jobs: with: variablesPath: ${{ env.variablesPath }} removeDeployment: '${{ fromJson(inputs.workflowInput).removeDeployment }}' - - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' + - name: 'Run deployment validation with test file [${{ matrix.testCases.moduleTestFilePath }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ inputs.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ inputs.modulePath }}/${{ matrix.testCases.moduleTestFilePath }}' location: '${{ env.location }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}' @@ -113,7 +118,7 @@ jobs: ################## job_publish_module: # Note: Please don't change this job name. It is used by the setEnvironment action to define which PS modules to install on runners. name: 'Publishing' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || fromJson(inputs.workflowInput).prerelease == 'true' needs: - job_module_deploy_validation diff --git a/.ps-rule/min-suppress.Rule.yaml b/.ps-rule/min-suppress.Rule.yaml deleted file mode 100644 index 794cfae88d..0000000000 --- a/.ps-rule/min-suppress.Rule.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# Synopsis: Suppress Rules for min tests -apiVersion: github.com/microsoft/PSRule/v1 -kind: SuppressionGroup -metadata: - name: 'SuppressMin' -spec: - rule: - - Azure.Resource.UseTags - - Azure.KeyVault.Logs - - Azure.KeyVault.Firewall - - Azure.Policy.ExemptionDescriptors - - Azure.Policy.Descriptors - - Azure.Policy.AssignmentDescriptors - - Azure.PublicIP.AvailabilityZone - if: - name: '.' - contains: - - 'min' diff --git a/README.md b/README.md index 44acccd038..7393ae6421 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,23 @@ -
configuration-store | [![AppConfiguration - ConfigurationStores](https://github.com/Azure/ResourceModules/workflows/AppConfiguration%20-%20ConfigurationStores/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.appconfiguration.configurationstores.yml) | | | | | | | [L1:2, L2:1, L3:5] | 322 | | 5 | app
container-app | [![App - ContainerApps](https://github.com/Azure/ResourceModules/workflows/App%20-%20ContainerApps/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.app.containerapps.yml) | | | | | | | [L1:1, L2:1, L3:3] | 211 | | 6 | app
job | [![App - Jobs](https://github.com/Azure/ResourceModules/workflows/App%20-%20Jobs/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.app.jobs.yml) | | | :white_check_mark: | | | | [L1:1, L2:1, L3:3] | 162 | -| 7 | app
managed-environment | [![App - Managed Environments](https://github.com/Azure/ResourceModules/workflows/App%20-%20Managed%20Environments/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.app.managedenvironments.yml) | | | | | | | [L1:1, L2:1, L3:3] | 163 | +| 7 | app
managed-environment | [![App - Managed Environments](https://github.com/Azure/ResourceModules/workflows/App%20-%20Managed%20Environments/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.app.managedenvironments.yml) | | | | | | | [L1:1, L2:1, L3:3] | 159 | | 8 | authorization
lock | [![Authorization - Locks](https://github.com/Azure/ResourceModules/workflows/Authorization%20-%20Locks/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.authorization.locks.yml) | | | | | | | [L1:3, L2:1, L3:2] | 62 | | 9 | authorization
policy-assignment | [![Authorization - PolicyAssignments](https://github.com/Azure/ResourceModules/workflows/Authorization%20-%20PolicyAssignments/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.authorization.policyassignments.yml) | | | | | | | [L1:4, L2:1, L3:6] | 143 | | 10 | authorization
policy-definition | [![Authorization - PolicyDefinitions](https://github.com/Azure/ResourceModules/workflows/Authorization%20-%20PolicyDefinitions/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.authorization.policydefinitions.yml) | | | | | | | [L1:3, L2:1, L3:4] | 86 | @@ -45,7 +45,7 @@ This section provides an overview of the library's feature set. | 30 | consumption
budget | [![Consumption - Budgets](https://github.com/Azure/ResourceModules/workflows/Consumption%20-%20Budgets/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.consumption.budgets.yml) | | | | | | | [L1:1, L2:1, L3:3] | 92 | | 31 | container-instance
container-group | [![ContainerInstance - ContainerGroups](https://github.com/Azure/ResourceModules/workflows/ContainerInstance%20-%20ContainerGroups/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.containerinstance.containergroups.yml) | | | | | | | [L1:1, L2:1, L3:5] | 175 | | 32 | container-registry
registry | [![ContainerRegistry - Registries](https://github.com/Azure/ResourceModules/workflows/ContainerRegistry%20-%20Registries/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.containerregistry.registries.yml) | | | | | | | [L1:4, L2:1, L3:5] | 447 | -| 33 | container-service
managed-cluster | [![ContainerService - ManagedClusters](https://github.com/Azure/ResourceModules/workflows/ContainerService%20-%20ManagedClusters/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.containerservice.managedclusters.yml) | | | | | | | [L1:2, L2:1, L3:4] | 693 | +| 33 | container-service
managed-cluster | [![ContainerService - ManagedClusters](https://github.com/Azure/ResourceModules/workflows/ContainerService%20-%20ManagedClusters/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.containerservice.managedclusters.yml) | | | | | | | [L1:2, L2:1, L3:4] | 712 | | 34 | data-factory
factory | [![DataFactory - Factories](https://github.com/Azure/ResourceModules/workflows/DataFactory%20-%20Factories/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.datafactory.factories.yml) | | | | | | | [L1:3, L2:2, L3:3] | 342 | | 35 | data-protection
backup-vault | [![DataProtection - BackupVaults](https://github.com/Azure/ResourceModules/workflows/DataProtection%20-%20BackupVaults/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.dataprotection.backupvaults.yml) | | | | | | | [L1:2, L2:1, L3:3] | 159 | | 36 | databricks
access-connector | [![Databricks - Access Connectors](https://github.com/Azure/ResourceModules/workflows/Databricks%20-%20Access%20Connectors/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.databricks.accessconnectors.yml) | | | | | | | [L1:1, L2:1, L3:3] | 110 | @@ -72,7 +72,7 @@ This section provides an overview of the library's feature set. | 57 | insights
data-collection-rule | [![Insights - DataCollectionRules](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20DataCollectionRules/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.datacollectionrules.yml) | | | | | | | [L1:1, L2:1, L3:6] | 129 | | 58 | insights
diagnostic-setting | [![Insights - DiagnosticSettings](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20DiagnosticSettings/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.diagnosticsettings.yml) | | | | | | | [L1:1, L2:1, L3:2] | 91 | | 59 | insights
metric-alert | [![Insights - MetricAlerts](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20MetricAlerts/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.metricalerts.yml) | | | | | | | [L1:1, L2:1, L3:2] | 152 | -| 60 | insights
private-link-scope | [![Insights - PrivateLinkScopes](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20PrivateLinkScopes/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.privatelinkscopes.yml) | | | | | | | [L1:2, L2:1, L3:3] | 181 | +| 60 | insights
private-link-scope | [![Insights - PrivateLinkScopes](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20PrivateLinkScopes/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.privatelinkscopes.yml) | | | | | | | [L1:2, L2:1, L3:3] | 211 | | 61 | insights
scheduled-query-rule | [![Insights - ScheduledQueryRules](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20ScheduledQueryRules/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.scheduledqueryrules.yml) | | | | | | | [L1:1, L2:1, L3:2] | 136 | | 62 | insights
webtest | [![Insights - Web Tests](https://github.com/Azure/ResourceModules/workflows/Insights%20-%20Web%20Tests/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.insights.webtests.yml) | | | | | | | [L1:1, L2:1, L3:3] | 152 | | 63 | key-vault
vault | [![KeyVault - Vaults](https://github.com/Azure/ResourceModules/workflows/KeyVault%20-%20Vaults/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.keyvault.vaults.yml) | | | | | | | [L1:4, L2:1, L3:5] | 356 | @@ -141,7 +141,7 @@ This section provides an overview of the library's feature set. | 126 | signal-r-service
web-pub-sub | [![SignalRService - WebPubSub](https://github.com/Azure/ResourceModules/workflows/SignalRService%20-%20WebPubSub/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.signalrservice.webpubsub.yml) | | | | | | | [L1:1, L2:1, L3:4] | 253 | | 127 | sql
managed-instance | [![Sql - ManagedInstances](https://github.com/Azure/ResourceModules/workflows/Sql%20-%20ManagedInstances/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.sql.managedinstances.yml) | | | | | | | [L1:7, L2:4, L3:4] | 373 | | 128 | sql
server | [![Sql - Servers](https://github.com/Azure/ResourceModules/workflows/Sql%20-%20Servers/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.sql.servers.yml) | | | | | | | [L1:9, L2:4, L3:6] | 389 | -| 129 | storage
storage-account | [![Storage - StorageAccounts](https://github.com/Azure/ResourceModules/workflows/Storage%20-%20StorageAccounts/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.storage.storageaccounts.yml) | | | | | | | [L1:7, L2:5, L3:7] | 524 | +| 129 | storage
storage-account | [![Storage - StorageAccounts](https://github.com/Azure/ResourceModules/workflows/Storage%20-%20StorageAccounts/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.storage.storageaccounts.yml) | | | | | | | [L1:7, L2:5, L3:8] | 524 | | 130 | synapse
private-link-hub | [![Synapse - PrivateLinkHubs](https://github.com/Azure/ResourceModules/workflows/Synapse%20-%20PrivateLinkHubs/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.synapse.privatelinkhubs.yml) | | | | | | | [L1:1, L2:1, L3:3] | 171 | | 131 | synapse
workspace | [![Synapse - Workspaces](https://github.com/Azure/ResourceModules/workflows/Synapse%20-%20Workspaces/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.synapse.workspaces.yml) | | | | | | | [L1:4, L2:1, L3:6] | 377 | | 132 | virtual-machine-images
image-template | [![VirtualMachineImages - ImageTemplates](https://github.com/Azure/ResourceModules/workflows/VirtualMachineImages%20-%20ImageTemplates/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.virtualmachineimages.imagetemplates.yml) | | | | | | | [L1:1, L2:1, L3:3] | 216 | @@ -150,7 +150,7 @@ This section provides an overview of the library's feature set. | 135 | web
serverfarm | [![Web - Serverfarms](https://github.com/Azure/ResourceModules/workflows/Web%20-%20Serverfarms/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.web.serverfarms.yml) | | | | | | | [L1:1, L2:1, L3:2] | 184 | | 136 | web
site | [![Web - Sites](https://github.com/Azure/ResourceModules/workflows/Web%20-%20Sites/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.web.sites.yml) | | | | | | | [L1:6, L2:6, L3:5] | 455 | | 137 | web
static-site | [![Web - StaticSites](https://github.com/Azure/ResourceModules/workflows/Web%20-%20StaticSites/badge.svg)](https://github.com/Azure/ResourceModules/actions/workflows/ms.web.staticsites.yml) | | | | | | | [L1:4, L2:1, L3:3] | 284 | -| Sum | | | 0 | 0 | 1 | 0 | 0 | 2 | 981 | 29894 | +| Sum | | | 0 | 0 | 1 | 0 | 0 | 2 | 982 | 29939 | ## Legend diff --git a/modules/aad/domain-service/README.md b/modules/aad/domain-service/README.md index fa2a33f667..39675955c8 100644 --- a/modules/aad/domain-service/README.md +++ b/modules/aad/domain-service/README.md @@ -1,846 +1,7 @@ -# Azure Active Directory Domain Services `[Microsoft.AAD/domainServices]` +
-
-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
- "domainName": {
- "value": "onmicrosoft.com"
- },
- // Non-required parameters
- "additionalRecipients": {
- "value": [
- "@noreply.github.com"
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module domainService 'br:bicep/modules/aad.domain-service:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-aaddswaf'
- params: {
- // Required parameters
- domainName: 'onmicrosoft.com'
- // Non-required parameters
- additionalRecipients: [
- '@noreply.github.com'
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '
-
-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
- "domainName": {
- "value": "onmicrosoft.com"
- },
- // Non-required parameters
- "additionalRecipients": {
- "value": [
- "@noreply.github.com"
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`domainName`](#parameter-domainname) | string | The domain name specific to the Azure ADDS service. | - -**Conditional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`pfxCertificate`](#parameter-pfxcertificate) | securestring | The certificate required to configure Secure LDAP. Should be a base64encoded representation of the certificate PFX file. Required if secure LDAP is enabled and must be valid more than 30 days. | -| [`pfxCertificatePassword`](#parameter-pfxcertificatepassword) | securestring | The password to decrypt the provided Secure LDAP certificate PFX file. Required if secure LDAP is enabled. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`additionalRecipients`](#parameter-additionalrecipients) | array | The email recipient value to receive alerts. | -| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. | -| [`domainConfigurationType`](#parameter-domainconfigurationtype) | string | The value is to provide domain configuration type. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`externalAccess`](#parameter-externalaccess) | string | The value is to enable the Secure LDAP for external services of Azure ADDS Services. | -| [`filteredSync`](#parameter-filteredsync) | string | The value is to synchronize scoped users and groups. | -| [`kerberosArmoring`](#parameter-kerberosarmoring) | string | The value is to enable to provide a protected channel between the Kerberos client and the KDC. | -| [`kerberosRc4Encryption`](#parameter-kerberosrc4encryption) | string | The value is to enable Kerberos requests that use RC4 encryption. | -| [`ldaps`](#parameter-ldaps) | string | A flag to determine whether or not Secure LDAP is enabled or disabled. | -| [`location`](#parameter-location) | string | The location to deploy the Azure ADDS Services. | -| [`lock`](#parameter-lock) | object | The lock settings of the service. | -| [`name`](#parameter-name) | string | The name of the AADDS resource. Defaults to the domain name specific to the Azure ADDS service. | -| [`notifyDcAdmins`](#parameter-notifydcadmins) | string | The value is to notify the DC Admins. | -| [`notifyGlobalAdmins`](#parameter-notifyglobaladmins) | string | The value is to notify the Global Admins. | -| [`ntlmV1`](#parameter-ntlmv1) | string | The value is to enable clients making request using NTLM v1. | -| [`replicaSets`](#parameter-replicasets) | array | Additional replica set for the managed domain. | -| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | -| [`sku`](#parameter-sku) | string | The name of the SKU specific to Azure ADDS Services. | -| [`syncNtlmPasswords`](#parameter-syncntlmpasswords) | string | The value is to enable synchronized users to use NTLM authentication. | -| [`syncOnPremPasswords`](#parameter-synconprempasswords) | string | The value is to enable on-premises users to authenticate against managed domain. | -| [`tags`](#parameter-tags) | object | Tags of the resource. | -| [`tlsV1`](#parameter-tlsv1) | string | The value is to enable clients making request using TLSv1. | - -### Parameter: `domainName` - -The domain name specific to the Azure ADDS service. - -- Required: Yes -- Type: string - -### Parameter: `pfxCertificate` - -The certificate required to configure Secure LDAP. Should be a base64encoded representation of the certificate PFX file. Required if secure LDAP is enabled and must be valid more than 30 days. - -- Required: No -- Type: securestring -- Default: `''` - -### Parameter: `pfxCertificatePassword` - -The password to decrypt the provided Secure LDAP certificate PFX file. Required if secure LDAP is enabled. - -- Required: No -- Type: securestring -- Default: `''` - -### Parameter: `additionalRecipients` - -The email recipient value to receive alerts. - -- Required: No -- Type: array -- Default: `[]` - -### Parameter: `diagnosticSettings` - -The diagnostic settings of the service. - -- Required: No -- Type: array - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. | -| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. | -| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. | -| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. | -| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. | -| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. | -| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. | -| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. | - -### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId` - -Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.eventHubName` - -Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.logAnalyticsDestinationType` - -A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'AzureDiagnostics' - 'Dedicated' - ] - ``` - -### Parameter: `diagnosticSettings.logCategoriesAndGroups` - -The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. - -- Required: No -- Type: array - -### Parameter: `diagnosticSettings.marketplacePartnerResourceId` - -The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.name` - -The name of diagnostic setting. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.storageAccountResourceId` - -Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.workspaceResourceId` - -Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. - -- Required: No -- Type: string - -### Parameter: `domainConfigurationType` - -The value is to provide domain configuration type. - -- Required: No -- Type: string -- Default: `'FullySynced'` -- Allowed: - ```Bicep - [ - 'FullySynced' - 'ResourceTrusting' - ] - ``` - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `externalAccess` - -The value is to enable the Secure LDAP for external services of Azure ADDS Services. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `filteredSync` - -The value is to synchronize scoped users and groups. - -- Required: No -- Type: string -- Default: `'Enabled'` - -### Parameter: `kerberosArmoring` - -The value is to enable to provide a protected channel between the Kerberos client and the KDC. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `kerberosRc4Encryption` - -The value is to enable Kerberos requests that use RC4 encryption. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `ldaps` - -A flag to determine whether or not Secure LDAP is enabled or disabled. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `location` - -The location to deploy the Azure ADDS Services. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `lock` - -The lock settings of the service. - -- Required: No -- Type: object - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`kind`](#parameter-lockkind) | string | Specify the type of lock. | -| [`name`](#parameter-lockname) | string | Specify the name of lock. | - -### Parameter: `lock.kind` - -Specify the type of lock. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'CanNotDelete' - 'None' - 'ReadOnly' - ] - ``` - -### Parameter: `lock.name` - -Specify the name of lock. - -- Required: No -- Type: string - -### Parameter: `name` - -The name of the AADDS resource. Defaults to the domain name specific to the Azure ADDS service. - -- Required: No -- Type: string -- Default: `[parameters('domainName')]` - -### Parameter: `notifyDcAdmins` - -The value is to notify the DC Admins. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `notifyGlobalAdmins` - -The value is to notify the Global Admins. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `ntlmV1` - -The value is to enable clients making request using NTLM v1. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `replicaSets` - -Additional replica set for the managed domain. - -- Required: No -- Type: array -- Default: `[]` - -### Parameter: `roleAssignments` - -Array of role assignments to create. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `sku` - -The name of the SKU specific to Azure ADDS Services. - -- Required: No -- Type: string -- Default: `'Standard'` -- Allowed: - ```Bicep - [ - 'Enterprise' - 'Premium' - 'Standard' - ] - ``` - -### Parameter: `syncNtlmPasswords` - -The value is to enable synchronized users to use NTLM authentication. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `syncOnPremPasswords` - -The value is to enable on-premises users to authenticate against managed domain. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `tags` - -Tags of the resource. - -- Required: No -- Type: object - -### Parameter: `tlsV1` - -The value is to enable clients making request using TLSv1. - -- Required: No -- Type: string -- Default: `'Enabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The domain name of the Azure Active Directory Domain Services(Azure ADDS). | -| `resourceGroupName` | string | The name of the resource group the Azure Active Directory Domain Services(Azure ADDS) was created in. | -| `resourceId` | string | The resource ID of the Azure Active Directory Domain Services(Azure ADDS). | - -## Cross-referenced modules - -_None_ - -## Notes - -### Network Security Group (NSG) requirements for AADDS - -- A network security group has to be created and assigned to the designated AADDS subnet before deploying this module - - The following inbound rules should be allowed on the network security group - | Name | Protocol | Source Port Range | Source Address Prefix | Destination Port Range | Destination Address Prefix | - | - | - | - | - | - | - | - | AllowSyncWithAzureAD | TCP | `*` | `AzureActiveDirectoryDomainServices` | `443` | `*` | - | AllowPSRemoting | TCP | `*` | `AzureActiveDirectoryDomainServices` | `5986` | `*` | -- Associating a route table to the AADDS subnet is not recommended -- The network used for AADDS must have its DNS Servers [configured](https://learn.microsoft.com/en-us/azure/active-directory-domain-services/tutorial-configure-networking#configure-dns-servers-in-the-peered-virtual-network) (e.g. with IPs `10.0.1.4` & `10.0.1.5`) -- Your Azure Active Directory must have the 'Domain Controller Services' service principal registered. If that's not the case, you can register it by executing the command `New-AzADServicePrincipal -ApplicationId '2565bd9d-da50-47d4-8b85-4c97f669dc36'` with an eligible user. - -### Create self-signed certificate for secure LDAP -Follow the below PowerShell commands to get base64 encoded string of a self-signed certificate (with a `pfxCertificatePassword`) - -```PowerShell -$pfxCertificatePassword = ConvertTo-SecureString '[[YourPfxCertificatePassword]]' -AsPlainText -Force -$certInputObject = @{ - Subject = 'CN=*.[[YourDomainName]]' - DnsName = '*.[[YourDomainName]]' - CertStoreLocation = 'cert:\LocalMachine\My' - KeyExportPolicy = 'Exportable' - Provider = 'Microsoft Enhanced RSA and AES Cryptographic Provider' - NotAfter = (Get-Date).AddMonths(3) - HashAlgorithm = 'SHA256' -} -$rawCert = New-SelfSignedCertificate @certInputObject -Export-PfxCertificate -Cert ('Cert:\localmachine\my\' + $rawCert.Thumbprint) -FilePath "$home/aadds.pfx" -Password $pfxCertificatePassword -Force -$rawCertByteStream = Get-Content "$home/aadds.pfx" -AsByteStream -$pfxCertificate = [System.Convert]::ToBase64String($rawCertByteStream) -``` +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/aad/domain-service/main.bicep b/modules/aad/domain-service/main.bicep deleted file mode 100644 index 5fd0a7a9fb..0000000000 --- a/modules/aad/domain-service/main.bicep +++ /dev/null @@ -1,304 +0,0 @@ -metadata name = 'Azure Active Directory Domain Services' -metadata description = 'This module deploys an Azure Active Directory Domain Services (AADDS).' -metadata owner = 'Azure/module-maintainers' - -@description('Optional. The name of the AADDS resource. Defaults to the domain name specific to the Azure ADDS service.') -param name string = domainName - -@description('Required. The domain name specific to the Azure ADDS service.') -param domainName string - -@description('Optional. The name of the SKU specific to Azure ADDS Services.') -@allowed([ - 'Standard' - 'Enterprise' - 'Premium' -]) -param sku string = 'Standard' - -@description('Optional. The location to deploy the Azure ADDS Services.') -param location string = resourceGroup().location - -@description('Optional. Additional replica set for the managed domain.') -param replicaSets array = [] - -@description('Conditional. The certificate required to configure Secure LDAP. Should be a base64encoded representation of the certificate PFX file. Required if secure LDAP is enabled and must be valid more than 30 days.') -@secure() -param pfxCertificate string = '' - -@description('Conditional. The password to decrypt the provided Secure LDAP certificate PFX file. Required if secure LDAP is enabled.') -@secure() -param pfxCertificatePassword string = '' - -@description('Optional. The email recipient value to receive alerts.') -param additionalRecipients array = [] - -@description('Optional. The value is to provide domain configuration type.') -@allowed([ - 'FullySynced' - 'ResourceTrusting' -]) -param domainConfigurationType string = 'FullySynced' - -@description('Optional. The value is to synchronize scoped users and groups.') -param filteredSync string = 'Enabled' - -@description('Optional. The value is to enable clients making request using TLSv1.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param tlsV1 string = 'Enabled' - -@description('Optional. The value is to enable clients making request using NTLM v1.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param ntlmV1 string = 'Enabled' - -@description('Optional. The value is to enable synchronized users to use NTLM authentication.') -@allowed([ - 'Enabled' - 'Disabled' -]) -#disable-next-line secure-secrets-in-params // Not a secret -param syncNtlmPasswords string = 'Enabled' - -@description('Optional. The value is to enable on-premises users to authenticate against managed domain.') -@allowed([ - 'Enabled' - 'Disabled' -]) -#disable-next-line secure-secrets-in-params // Not a secret -param syncOnPremPasswords string = 'Enabled' - -@description('Optional. The value is to enable Kerberos requests that use RC4 encryption.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param kerberosRc4Encryption string = 'Enabled' - -@description('Optional. The value is to enable to provide a protected channel between the Kerberos client and the KDC.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param kerberosArmoring string = 'Enabled' - -@description('Optional. The value is to notify the DC Admins.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param notifyDcAdmins string = 'Enabled' - -@description('Optional. The value is to notify the Global Admins.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param notifyGlobalAdmins string = 'Enabled' - -@description('Optional. The value is to enable the Secure LDAP for external services of Azure ADDS Services.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param externalAccess string = 'Enabled' - -@description('Optional. A flag to determine whether or not Secure LDAP is enabled or disabled.') -@allowed([ - 'Enabled' - 'Disabled' -]) -param ldaps string = 'Enabled' - -@description('Optional. The diagnostic settings of the service.') -param diagnosticSettings diagnosticSettingType - -@description('Optional. Tags of the resource.') -param tags object? - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. The lock settings of the service.') -param lock lockType - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource domainService 'Microsoft.AAD/DomainServices@2021-05-01' = { - name: name - location: location - tags: tags - properties: { - domainName: domainName - domainConfigurationType: domainConfigurationType - filteredSync: filteredSync - notificationSettings: { - additionalRecipients: additionalRecipients - notifyDcAdmins: notifyDcAdmins - notifyGlobalAdmins: notifyGlobalAdmins - } - ldapsSettings: { - externalAccess: externalAccess - ldaps: ldaps - pfxCertificate: !empty(pfxCertificate) ? pfxCertificate : null - pfxCertificatePassword: !empty(pfxCertificatePassword) ? pfxCertificatePassword : null - } - replicaSets: replicaSets - domainSecuritySettings: { - tlsV1: tlsV1 - ntlmV1: ntlmV1 - syncNtlmPasswords: syncNtlmPasswords - syncOnPremPasswords: syncOnPremPasswords - kerberosRc4Encryption: kerberosRc4Encryption - kerberosArmoring: kerberosArmoring - } - sku: sku - } -} - -resource domainService_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): { - name: diagnosticSetting.?name ?? '${name}-diagnosticSettings' - properties: { - storageAccountId: diagnosticSetting.?storageAccountResourceId - workspaceId: diagnosticSetting.?workspaceResourceId - eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId - eventHubName: diagnosticSetting.?eventHubName - logs: diagnosticSetting.?logCategoriesAndGroups ?? [ - { - categoryGroup: 'AllLogs' - enabled: true - } - ] - marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId - logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType - } - scope: domainService -}] - -resource domainService_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: domainService -} - -resource domainService_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(domainService.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: domainService -}] - -@description('The domain name of the Azure Active Directory Domain Services(Azure ADDS).') -output name string = domainService.name - -@description('The name of the resource group the Azure Active Directory Domain Services(Azure ADDS) was created in.') -output resourceGroupName string = resourceGroup().name - -@description('The resource ID of the Azure Active Directory Domain Services(Azure ADDS).') -output resourceId string = domainService.id - -@description('The location the resource was deployed into.') -output location string = domainService.location - -// =============== // -// Definitions // -// =============== // - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? - -type diagnosticSettingType = { - @description('Optional. The name of diagnostic setting.') - name: string? - - @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.') - logCategoriesAndGroups: { - @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.') - category: string? - - @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.') - categoryGroup: string? - }[]? - - @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.') - logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')? - - @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - workspaceResourceId: string? - - @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - storageAccountResourceId: string? - - @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.') - eventHubAuthorizationRuleResourceId: string? - - @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - eventHubName: string? - - @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.') - marketplacePartnerResourceId: string? -}[]? diff --git a/modules/aad/domain-service/main.json b/modules/aad/domain-service/main.json deleted file mode 100644 index d0510c3e8a..0000000000 --- a/modules/aad/domain-service/main.json +++ /dev/null @@ -1,564 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "1250805842529058137" - }, - "name": "Azure Active Directory Domain Services", - "description": "This module deploys an Azure Active Directory Domain Services (AADDS).", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - }, - "diagnosticSettingType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The name of diagnostic setting." - } - }, - "logCategoriesAndGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here." - } - }, - "categoryGroup": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs." - } - } - } - }, - "nullable": true, - "metadata": { - "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection." - } - }, - "logAnalyticsDestinationType": { - "type": "string", - "allowedValues": [ - "AzureDiagnostics", - "Dedicated" - ], - "nullable": true, - "metadata": { - "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type." - } - }, - "workspaceResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "storageAccountResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "eventHubAuthorizationRuleResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to." - } - }, - "eventHubName": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "marketplacePartnerResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "defaultValue": "[parameters('domainName')]", - "metadata": { - "description": "Optional. The name of the AADDS resource. Defaults to the domain name specific to the Azure ADDS service." - } - }, - "domainName": { - "type": "string", - "metadata": { - "description": "Required. The domain name specific to the Azure ADDS service." - } - }, - "sku": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Enterprise", - "Premium" - ], - "metadata": { - "description": "Optional. The name of the SKU specific to Azure ADDS Services." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. The location to deploy the Azure ADDS Services." - } - }, - "replicaSets": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Additional replica set for the managed domain." - } - }, - "pfxCertificate": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Conditional. The certificate required to configure Secure LDAP. Should be a base64encoded representation of the certificate PFX file. Required if secure LDAP is enabled and must be valid more than 30 days." - } - }, - "pfxCertificatePassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Conditional. The password to decrypt the provided Secure LDAP certificate PFX file. Required if secure LDAP is enabled." - } - }, - "additionalRecipients": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. The email recipient value to receive alerts." - } - }, - "domainConfigurationType": { - "type": "string", - "defaultValue": "FullySynced", - "allowedValues": [ - "FullySynced", - "ResourceTrusting" - ], - "metadata": { - "description": "Optional. The value is to provide domain configuration type." - } - }, - "filteredSync": { - "type": "string", - "defaultValue": "Enabled", - "metadata": { - "description": "Optional. The value is to synchronize scoped users and groups." - } - }, - "tlsV1": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable clients making request using TLSv1." - } - }, - "ntlmV1": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable clients making request using NTLM v1." - } - }, - "syncNtlmPasswords": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable synchronized users to use NTLM authentication." - } - }, - "syncOnPremPasswords": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable on-premises users to authenticate against managed domain." - } - }, - "kerberosRc4Encryption": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable Kerberos requests that use RC4 encryption." - } - }, - "kerberosArmoring": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable to provide a protected channel between the Kerberos client and the KDC." - } - }, - "notifyDcAdmins": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to notify the DC Admins." - } - }, - "notifyGlobalAdmins": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to notify the Global Admins." - } - }, - "externalAccess": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. The value is to enable the Secure LDAP for external services of Azure ADDS Services." - } - }, - "ldaps": { - "type": "string", - "defaultValue": "Enabled", - "allowedValues": [ - "Enabled", - "Disabled" - ], - "metadata": { - "description": "Optional. A flag to determine whether or not Secure LDAP is enabled or disabled." - } - }, - "diagnosticSettings": { - "$ref": "#/definitions/diagnosticSettingType", - "metadata": { - "description": "Optional. The diagnostic settings of the service." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the resource." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - } - }, - "variables": { - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "domainService": { - "type": "Microsoft.AAD/domainServices", - "apiVersion": "2021-05-01", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "domainName": "[parameters('domainName')]", - "domainConfigurationType": "[parameters('domainConfigurationType')]", - "filteredSync": "[parameters('filteredSync')]", - "notificationSettings": { - "additionalRecipients": "[parameters('additionalRecipients')]", - "notifyDcAdmins": "[parameters('notifyDcAdmins')]", - "notifyGlobalAdmins": "[parameters('notifyGlobalAdmins')]" - }, - "ldapsSettings": { - "externalAccess": "[parameters('externalAccess')]", - "ldaps": "[parameters('ldaps')]", - "pfxCertificate": "[if(not(empty(parameters('pfxCertificate'))), parameters('pfxCertificate'), null())]", - "pfxCertificatePassword": "[if(not(empty(parameters('pfxCertificatePassword'))), parameters('pfxCertificatePassword'), null())]" - }, - "replicaSets": "[parameters('replicaSets')]", - "domainSecuritySettings": { - "tlsV1": "[parameters('tlsV1')]", - "ntlmV1": "[parameters('ntlmV1')]", - "syncNtlmPasswords": "[parameters('syncNtlmPasswords')]", - "syncOnPremPasswords": "[parameters('syncOnPremPasswords')]", - "kerberosRc4Encryption": "[parameters('kerberosRc4Encryption')]", - "kerberosArmoring": "[parameters('kerberosArmoring')]" - }, - "sku": "[parameters('sku')]" - } - }, - "domainService_diagnosticSettings": { - "copy": { - "name": "domainService_diagnosticSettings", - "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]" - }, - "type": "Microsoft.Insights/diagnosticSettings", - "apiVersion": "2021-05-01-preview", - "scope": "[format('Microsoft.AAD/domainServices/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]", - "properties": { - "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]", - "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]", - "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]", - "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]", - "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]", - "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]", - "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]" - }, - "dependsOn": [ - "domainService" - ] - }, - "domainService_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.AAD/domainServices/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "domainService" - ] - }, - "domainService_roleAssignments": { - "copy": { - "name": "domainService_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.AAD/domainServices/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.AAD/domainServices', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "domainService" - ] - } - }, - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The domain name of the Azure Active Directory Domain Services(Azure ADDS)." - }, - "value": "[parameters('name')]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the resource group the Azure Active Directory Domain Services(Azure ADDS) was created in." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the Azure Active Directory Domain Services(Azure ADDS)." - }, - "value": "[resourceId('Microsoft.AAD/domainServices', parameters('name'))]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('domainService', '2021-05-01', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/aad/domain-service/tests/e2e/max/dependencies.bicep b/modules/aad/domain-service/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 0767cf436a..0000000000 --- a/modules/aad/domain-service/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,104 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Deployment Script to create for the Certificate generation.') -param certDeploymentScriptName string - -var certPWSecretName = 'pfxCertificatePassword' -var certSecretName = 'pfxBase64Certificate' -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: null - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } -} - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid('msi-${managedIdentity.name}-KeyVault-Admin-RoleAssignment') - scope: keyVault - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483') // Key Vault Administrator - principalType: 'ServicePrincipal' - } -} - -resource certDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: certDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '3.0' - retentionInterval: 'P1D' - arguments: ' -KeyVaultName "${keyVault.name}" -ResourceGroupName "${resourceGroup().name}" -CertPWSecretName "${certPWSecretName}" -CertSecretName "${certSecretName}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Set-PfxCertificateInKeyVault.ps1') - } -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The name of the certification password secret.') -output certPWSecretName string = certPWSecretName - -@description('The name of the certification secret.') -output certSecretName string = certSecretName - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/aad/domain-service/tests/e2e/max/main.test.bicep b/modules/aad/domain-service/tests/e2e/max/main.test.bicep deleted file mode 100644 index 57a8a8aae6..0000000000 --- a/modules/aad/domain-service/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,109 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-aad.domainservices-${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 = 'aaddsmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - certDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = { - name: last(split(nestedDependencies.outputs.keyVaultResourceId, '/')) - scope: resourceGroup -} - -module testDeployment '../../../main.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - domainName: '${namePrefix}.onmicrosoft.com' - additionalRecipients: [ - '${namePrefix}@noreply.github.com' - ] - diagnosticSettings: [ - { - name: 'customSetting' - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - pfxCertificate: keyVault.getSecret(nestedDependencies.outputs.certSecretName) - pfxCertificatePassword: keyVault.getSecret(nestedDependencies.outputs.certPWSecretName) - replicaSets: [ - { - location: 'WestEurope' - subnetId: nestedDependencies.outputs.subnetResourceId - } - ] - sku: 'Standard' - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -} diff --git a/modules/aad/domain-service/tests/e2e/waf-aligned/dependencies.bicep b/modules/aad/domain-service/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index 0767cf436a..0000000000 --- a/modules/aad/domain-service/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,104 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Deployment Script to create for the Certificate generation.') -param certDeploymentScriptName string - -var certPWSecretName = 'pfxCertificatePassword' -var certSecretName = 'pfxBase64Certificate' -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: null - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } -} - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid('msi-${managedIdentity.name}-KeyVault-Admin-RoleAssignment') - scope: keyVault - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483') // Key Vault Administrator - principalType: 'ServicePrincipal' - } -} - -resource certDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: certDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '3.0' - retentionInterval: 'P1D' - arguments: ' -KeyVaultName "${keyVault.name}" -ResourceGroupName "${resourceGroup().name}" -CertPWSecretName "${certPWSecretName}" -CertSecretName "${certSecretName}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Set-PfxCertificateInKeyVault.ps1') - } -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The name of the certification password secret.') -output certPWSecretName string = certPWSecretName - -@description('The name of the certification secret.') -output certSecretName string = certSecretName - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/aad/domain-service/tests/e2e/waf-aligned/main.test.bicep b/modules/aad/domain-service/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index 605f339c95..0000000000 --- a/modules/aad/domain-service/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,109 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-aad.domainservices-${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 = 'aaddswaf' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - certDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = { - name: last(split(nestedDependencies.outputs.keyVaultResourceId, '/')) - scope: resourceGroup -} - -module testDeployment '../../../main.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - domainName: '${namePrefix}.onmicrosoft.com' - additionalRecipients: [ - '${namePrefix}@noreply.github.com' - ] - diagnosticSettings: [ - { - name: 'customSetting' - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - pfxCertificate: keyVault.getSecret(nestedDependencies.outputs.certSecretName) - pfxCertificatePassword: keyVault.getSecret(nestedDependencies.outputs.certPWSecretName) - replicaSets: [ - { - location: 'WestEurope' - subnetId: nestedDependencies.outputs.subnetResourceId - } - ] - sku: 'Standard' - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -} diff --git a/modules/aad/domain-service/version.json b/modules/aad/domain-service/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/aad/domain-service/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/analysis-services/server/README.md b/modules/analysis-services/server/README.md index e98e2db197..f7939b65f2 100644 --- a/modules/analysis-services/server/README.md +++ b/modules/analysis-services/server/README.md @@ -1,727 +1,7 @@ -# Analysis Services Servers `[Microsoft.AnalysisServices/servers]` +
-
-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": "assmin"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module server 'br:bicep/modules/analysis-services.server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-assmax'
- params: {
- // Required parameters
- name: 'assmax'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '
-
-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": "assmax"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module server 'br:bicep/modules/analysis-services.server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-asswaf'
- params: {
- // Required parameters
- name: 'asswaf'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '
-
-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": "asswaf"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`name`](#parameter-name) | string | The name of the Azure Analysis Services server to create. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`firewallSettings`](#parameter-firewallsettings) | object | The inbound firewall rules to define on the server. If not specified, firewall is disabled. | -| [`location`](#parameter-location) | string | Location for all Resources. | -| [`lock`](#parameter-lock) | object | The lock settings of the service. | -| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | -| [`skuCapacity`](#parameter-skucapacity) | int | The total number of query replica scale-out instances. | -| [`skuName`](#parameter-skuname) | string | The SKU name of the Azure Analysis Services server to create. | -| [`tags`](#parameter-tags) | object | Tags of the resource. | - -### Parameter: `name` - -The name of the Azure Analysis Services server to create. - -- Required: Yes -- Type: string - -### Parameter: `diagnosticSettings` - -The diagnostic settings of the service. - -- Required: No -- Type: array - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. | -| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. | -| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. | -| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. | -| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. | -| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. | -| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. | -| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. | -| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. | - -### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId` - -Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.eventHubName` - -Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.logAnalyticsDestinationType` - -A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'AzureDiagnostics' - 'Dedicated' - ] - ``` - -### Parameter: `diagnosticSettings.logCategoriesAndGroups` - -The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. - -- Required: No -- Type: array - -### Parameter: `diagnosticSettings.marketplacePartnerResourceId` - -The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.metricCategories` - -The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. - -- Required: No -- Type: array - -### Parameter: `diagnosticSettings.name` - -The name of diagnostic setting. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.storageAccountResourceId` - -Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. - -- Required: No -- Type: string - -### Parameter: `diagnosticSettings.workspaceResourceId` - -Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. - -- Required: No -- Type: string - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `firewallSettings` - -The inbound firewall rules to define on the server. If not specified, firewall is disabled. - -- Required: No -- Type: object -- Default: - ```Bicep - { - enablePowerBIService: true - firewallRules: [ - { - firewallRuleName: 'AllowFromAll' - rangeEnd: '255.255.255.255' - rangeStart: '0.0.0.0' - } - ] - } - ``` - -### Parameter: `location` - -Location for all Resources. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `lock` - -The lock settings of the service. - -- Required: No -- Type: object - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`kind`](#parameter-lockkind) | string | Specify the type of lock. | -| [`name`](#parameter-lockname) | string | Specify the name of lock. | - -### Parameter: `lock.kind` - -Specify the type of lock. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'CanNotDelete' - 'None' - 'ReadOnly' - ] - ``` - -### Parameter: `lock.name` - -Specify the name of lock. - -- Required: No -- Type: string - -### Parameter: `roleAssignments` - -Array of role assignments to create. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `skuCapacity` - -The total number of query replica scale-out instances. - -- Required: No -- Type: int -- Default: `1` - -### Parameter: `skuName` - -The SKU name of the Azure Analysis Services server to create. - -- Required: No -- Type: string -- Default: `'S0'` - -### Parameter: `tags` - -Tags of the resource. - -- Required: No -- Type: object - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the analysis service. | -| `resourceGroupName` | string | The resource group the analysis service was deployed into. | -| `resourceId` | string | The resource ID of the analysis service. | - -## Cross-referenced modules - -_None_ +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/analysis-services/server/main.bicep b/modules/analysis-services/server/main.bicep deleted file mode 100644 index 0d4d966a3b..0000000000 --- a/modules/analysis-services/server/main.bicep +++ /dev/null @@ -1,209 +0,0 @@ -metadata name = 'Analysis Services Servers' -metadata description = 'This module deploys an Analysis Services Server.' -metadata owner = 'Azure/module-maintainers' - -@description('Required. The name of the Azure Analysis Services server to create.') -param name string - -@description('Optional. The SKU name of the Azure Analysis Services server to create.') -param skuName string = 'S0' - -@description('Optional. The total number of query replica scale-out instances.') -param skuCapacity int = 1 - -@description('Optional. The inbound firewall rules to define on the server. If not specified, firewall is disabled.') -param firewallSettings object = { - firewallRules: [ - { - firewallRuleName: 'AllowFromAll' - rangeStart: '0.0.0.0' - rangeEnd: '255.255.255.255' - } - ] - enablePowerBIService: true -} - -@description('Optional. Location for all Resources.') -param location string = resourceGroup().location - -@description('Optional. The diagnostic settings of the service.') -param diagnosticSettings diagnosticSettingType - -@description('Optional. The lock settings of the service.') -param lock lockType - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -@description('Optional. Tags of the resource.') -param tags object? - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource server 'Microsoft.AnalysisServices/servers@2017-08-01' = { - name: name - location: location - tags: tags - sku: { - name: skuName - capacity: skuCapacity - } - properties: { - ipV4FirewallSettings: firewallSettings - } -} - -resource server_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: server -} - -resource server_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): { - name: diagnosticSetting.?name ?? '${name}-diagnosticSettings' - properties: { - storageAccountId: diagnosticSetting.?storageAccountResourceId - workspaceId: diagnosticSetting.?workspaceResourceId - eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId - eventHubName: diagnosticSetting.?eventHubName - metrics: diagnosticSetting.?metricCategories ?? [ - { - category: 'AllMetrics' - timeGrain: null - enabled: true - } - ] - logs: diagnosticSetting.?logCategoriesAndGroups ?? [ - { - categoryGroup: 'AllLogs' - enabled: true - } - ] - marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId - logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType - } - scope: server -}] - -resource server_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(server.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: server -}] - -@description('The name of the analysis service.') -output name string = server.name - -@description('The resource ID of the analysis service.') -output resourceId string = server.id - -@description('The resource group the analysis service was deployed into.') -output resourceGroupName string = resourceGroup().name - -@description('The location the resource was deployed into.') -output location string = server.location - -// =============== // -// Definitions // -// =============== // - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? - -type diagnosticSettingType = { - @description('Optional. The name of diagnostic setting.') - name: string? - - @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.') - logCategoriesAndGroups: { - @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.') - category: string? - - @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.') - categoryGroup: string? - }[]? - - @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.') - metricCategories: { - @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.') - category: string - }[]? - - @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.') - logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')? - - @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - workspaceResourceId: string? - - @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - storageAccountResourceId: string? - - @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.') - eventHubAuthorizationRuleResourceId: string? - - @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - eventHubName: string? - - @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.') - marketplacePartnerResourceId: string? -}[]? diff --git a/modules/analysis-services/server/main.json b/modules/analysis-services/server/main.json deleted file mode 100644 index b3e4158662..0000000000 --- a/modules/analysis-services/server/main.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "1605417065240868452" - }, - "name": "Analysis Services Servers", - "description": "This module deploys an Analysis Services Server.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - }, - "diagnosticSettingType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The name of diagnostic setting." - } - }, - "logCategoriesAndGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here." - } - }, - "categoryGroup": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs." - } - } - } - }, - "nullable": true, - "metadata": { - "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection." - } - }, - "metricCategories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "type": "string", - "metadata": { - "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics." - } - } - } - }, - "nullable": true, - "metadata": { - "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection." - } - }, - "logAnalyticsDestinationType": { - "type": "string", - "allowedValues": [ - "AzureDiagnostics", - "Dedicated" - ], - "nullable": true, - "metadata": { - "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type." - } - }, - "workspaceResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "storageAccountResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "eventHubAuthorizationRuleResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to." - } - }, - "eventHubName": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "marketplacePartnerResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the Azure Analysis Services server to create." - } - }, - "skuName": { - "type": "string", - "defaultValue": "S0", - "metadata": { - "description": "Optional. The SKU name of the Azure Analysis Services server to create." - } - }, - "skuCapacity": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "Optional. The total number of query replica scale-out instances." - } - }, - "firewallSettings": { - "type": "object", - "defaultValue": { - "firewallRules": [ - { - "firewallRuleName": "AllowFromAll", - "rangeStart": "0.0.0.0", - "rangeEnd": "255.255.255.255" - } - ], - "enablePowerBIService": true - }, - "metadata": { - "description": "Optional. The inbound firewall rules to define on the server. If not specified, firewall is disabled." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all Resources." - } - }, - "diagnosticSettings": { - "$ref": "#/definitions/diagnosticSettingType", - "metadata": { - "description": "Optional. The diagnostic settings of the service." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the resource." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "server": { - "type": "Microsoft.AnalysisServices/servers", - "apiVersion": "2017-08-01", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "sku": { - "name": "[parameters('skuName')]", - "capacity": "[parameters('skuCapacity')]" - }, - "properties": { - "ipV4FirewallSettings": "[parameters('firewallSettings')]" - } - }, - "server_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.AnalysisServices/servers/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "server" - ] - }, - "server_diagnosticSettings": { - "copy": { - "name": "server_diagnosticSettings", - "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]" - }, - "type": "Microsoft.Insights/diagnosticSettings", - "apiVersion": "2021-05-01-preview", - "scope": "[format('Microsoft.AnalysisServices/servers/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]", - "properties": { - "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]", - "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]", - "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]", - "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]", - "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]", - "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]", - "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]", - "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]" - }, - "dependsOn": [ - "server" - ] - }, - "server_roleAssignments": { - "copy": { - "name": "server_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.AnalysisServices/servers/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.AnalysisServices/servers', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "server" - ] - } - }, - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the analysis service." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the analysis service." - }, - "value": "[resourceId('Microsoft.AnalysisServices/servers', parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the analysis service was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('server', '2017-08-01', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/analysis-services/server/tests/e2e/defaults/main.test.bicep b/modules/analysis-services/server/tests/e2e/defaults/main.test.bicep deleted file mode 100644 index d068d9795e..0000000000 --- a/modules/analysis-services/server/tests/e2e/defaults/main.test.bicep +++ /dev/null @@ -1,49 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using only defaults' -metadata description = 'This instance deploys the module with the minimum set of required parameters.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${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 = 'assmin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}' - } -}] diff --git a/modules/analysis-services/server/tests/e2e/max/dependencies.bicep b/modules/analysis-services/server/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 29b9641692..0000000000 --- a/modules/analysis-services/server/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Required. The name of the managed identity to create.') -param managedIdentityName string - -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/analysis-services/server/tests/e2e/max/main.test.bicep b/modules/analysis-services/server/tests/e2e/max/main.test.bicep deleted file mode 100644 index 93bfb2efaa..0000000000 --- a/modules/analysis-services/server/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,131 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${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 = 'assmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}azsa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - skuName: 'S0' - skuCapacity: 1 - firewallSettings: { - firewallRules: [ - { - firewallRuleName: 'AllowFromAll' - rangeStart: '0.0.0.0' - rangeEnd: '255.255.255.255' - } - ] - enablePowerBIService: true - } - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - diagnosticSettings: [ - { - name: 'customSetting' - metricCategories: [ - { - category: 'AllMetrics' - } - ] - logCategoriesAndGroups: [ - { - category: 'Engine' - } - { - category: 'Service' - } - ] - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/analysis-services/server/tests/e2e/waf-aligned/dependencies.bicep b/modules/analysis-services/server/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index 29b9641692..0000000000 --- a/modules/analysis-services/server/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Required. The name of the managed identity to create.') -param managedIdentityName string - -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep b/modules/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index 705eaf124d..0000000000 --- a/modules/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,114 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${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 = 'asswaf' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}azsa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - skuName: 'S0' - skuCapacity: 1 - firewallSettings: { - firewallRules: [ - { - firewallRuleName: 'AllowFromAll' - rangeStart: '0.0.0.0' - rangeEnd: '255.255.255.255' - } - ] - enablePowerBIService: true - } - diagnosticSettings: [ - { - name: 'customSetting' - metricCategories: [ - { - category: 'AllMetrics' - } - ] - logCategoriesAndGroups: [ - { - category: 'Engine' - } - { - category: 'Service' - } - ] - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/analysis-services/server/version.json b/modules/analysis-services/server/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/analysis-services/server/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/api-management/service/README.md b/modules/api-management/service/README.md index 5e4a021247..572a98b448 100644 --- a/modules/api-management/service/README.md +++ b/modules/api-management/service/README.md @@ -1,1465 +1,7 @@ -# API Management Services `[Microsoft.ApiManagement/service]` +
-
-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": "apismin001"
- },
- "publisherEmail": {
- "value": "apimgmt-noreply@mail.windowsazure.com"
- },
- "publisherName": {
- "value": "az-amorg-x-001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module service 'br:bicep/modules/api-management.service:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-apismax'
- params: {
- // Required parameters
- name: 'apismax001'
- publisherEmail: 'apimgmt-noreply@mail.windowsazure.com'
- publisherName: 'az-amorg-x-001'
- // Non-required parameters
- apis: [
- {
- apiVersionSet: {
- name: 'echo-version-set'
- properties: {
- description: 'echo-version-set'
- displayName: 'echo-version-set'
- versioningScheme: 'Segment'
- }
- }
- displayName: 'Echo API'
- name: 'echo-api'
- path: 'echo'
- serviceUrl: 'http://echoapi.cloudapp.net/api'
- }
- ]
- authorizationServers: {
- secureList: [
- {
- authorizationEndpoint: '
-
-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": "apismax001"
- },
- "publisherEmail": {
- "value": "apimgmt-noreply@mail.windowsazure.com"
- },
- "publisherName": {
- "value": "az-amorg-x-001"
- },
- // Non-required parameters
- "apis": {
- "value": [
- {
- "apiVersionSet": {
- "name": "echo-version-set",
- "properties": {
- "description": "echo-version-set",
- "displayName": "echo-version-set",
- "versioningScheme": "Segment"
- }
- },
- "displayName": "Echo API",
- "name": "echo-api",
- "path": "echo",
- "serviceUrl": "http://echoapi.cloudapp.net/api"
- }
- ]
- },
- "authorizationServers": {
- "value": {
- "secureList": [
- {
- "authorizationEndpoint": "
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module service 'br:bicep/modules/api-management.service:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-apiswaf'
- params: {
- // Required parameters
- name: 'apiswaf001'
- publisherEmail: 'apimgmt-noreply@mail.windowsazure.com'
- publisherName: 'az-amorg-x-001'
- // Non-required parameters
- apis: [
- {
- apiVersionSet: {
- name: 'echo-version-set'
- properties: {
- description: 'echo-version-set'
- displayName: 'echo-version-set'
- versioningScheme: 'Segment'
- }
- }
- displayName: 'Echo API'
- name: 'echo-api'
- path: 'echo'
- serviceUrl: 'http://echoapi.cloudapp.net/api'
- }
- ]
- authorizationServers: {
- secureList: [
- {
- authorizationEndpoint: '
-
-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": "apiswaf001"
- },
- "publisherEmail": {
- "value": "apimgmt-noreply@mail.windowsazure.com"
- },
- "publisherName": {
- "value": "az-amorg-x-001"
- },
- // Non-required parameters
- "apis": {
- "value": [
- {
- "apiVersionSet": {
- "name": "echo-version-set",
- "properties": {
- "description": "echo-version-set",
- "displayName": "echo-version-set",
- "versioningScheme": "Segment"
- }
- },
- "displayName": "Echo API",
- "name": "echo-api",
- "path": "echo",
- "serviceUrl": "http://echoapi.cloudapp.net/api"
- }
- ]
- },
- "authorizationServers": {
- "value": {
- "secureList": [
- {
- "authorizationEndpoint": "
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the API Management service. |
-| [`publisherEmail`](#parameter-publisheremail) | string | The email address of the owner of the service. |
-| [`publisherName`](#parameter-publishername) | string | The name of the owner of the service. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`additionalLocations`](#parameter-additionallocations) | array | Additional datacenter locations of the API Management service. |
-| [`apis`](#parameter-apis) | array | APIs. |
-| [`apiVersionSets`](#parameter-apiversionsets) | array | API Version Sets. |
-| [`authorizationServers`](#parameter-authorizationservers) | secureObject | Authorization servers. |
-| [`backends`](#parameter-backends) | array | Backends. |
-| [`caches`](#parameter-caches) | array | Caches. |
-| [`certificates`](#parameter-certificates) | array | List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. |
-| [`customProperties`](#parameter-customproperties) | object | Custom properties of the API Management service. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableGateway`](#parameter-disablegateway) | bool | Property only valid for an API Management service deployed in multiple locations. This can be used to disable the gateway in master region. |
-| [`enableClientCertificate`](#parameter-enableclientcertificate) | bool | Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`hostnameConfigurations`](#parameter-hostnameconfigurations) | array | Custom hostname configuration of the API Management service. |
-| [`identityProviders`](#parameter-identityproviders) | array | Identity providers. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`minApiVersion`](#parameter-minapiversion) | string | Limit control plane API calls to API Management service with version equal to or newer than this value. |
-| [`namedValues`](#parameter-namedvalues) | array | Named values. |
-| [`newGuidValue`](#parameter-newguidvalue) | string | Necessary to create a new GUID. |
-| [`notificationSenderEmail`](#parameter-notificationsenderemail) | string | The notification sender email address for the service. |
-| [`policies`](#parameter-policies) | array | Policies. |
-| [`portalsettings`](#parameter-portalsettings) | array | Portal settings. |
-| [`products`](#parameter-products) | array | Products. |
-| [`restore`](#parameter-restore) | bool | Undelete API Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`sku`](#parameter-sku) | string | The pricing tier of this API Management service. |
-| [`skuCount`](#parameter-skucount) | int | The instance size of this API Management service. |
-| [`subnetResourceId`](#parameter-subnetresourceid) | string | The full resource ID of a subnet in a virtual network to deploy the API Management service in. |
-| [`subscriptions`](#parameter-subscriptions) | array | Subscriptions. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`virtualNetworkType`](#parameter-virtualnetworktype) | string | The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. |
-| [`zones`](#parameter-zones) | array | A list of availability zones denoting where the resource needs to come from. |
-
-### Parameter: `name`
-
-The name of the API Management service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `publisherEmail`
-
-The email address of the owner of the service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `publisherName`
-
-The name of the owner of the service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `additionalLocations`
-
-Additional datacenter locations of the API Management service.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `apis`
-
-APIs.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `apiVersionSets`
-
-API Version Sets.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `authorizationServers`
-
-Authorization servers.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `backends`
-
-Backends.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `caches`
-
-Caches.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `certificates`
-
-List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `customProperties`
-
-Custom properties of the API Management service.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableGateway`
-
-Property only valid for an API Management service deployed in multiple locations. This can be used to disable the gateway in master region.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableClientCertificate`
-
-Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `hostnameConfigurations`
-
-Custom hostname configuration of the API Management service.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `identityProviders`
-
-Identity providers.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `minApiVersion`
-
-Limit control plane API calls to API Management service with version equal to or newer than this value.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `namedValues`
-
-Named values.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `newGuidValue`
-
-Necessary to create a new GUID.
-
-- Required: No
-- Type: string
-- Default: `[newGuid()]`
-
-### Parameter: `notificationSenderEmail`
-
-The notification sender email address for the service.
-
-- Required: No
-- Type: string
-- Default: `'apimgmt-noreply@mail.windowsazure.com'`
-
-### Parameter: `policies`
-
-Policies.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `portalsettings`
-
-Portal settings.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `products`
-
-Products.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `restore`
-
-Undelete API Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `sku`
-
-The pricing tier of this API Management service.
-
-- Required: No
-- Type: string
-- Default: `'Developer'`
-- Allowed:
- ```Bicep
- [
- 'Basic'
- 'Consumption'
- 'Developer'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `skuCount`
-
-The instance size of this API Management service.
-
-- Required: No
-- Type: int
-- Default: `1`
-- Allowed:
- ```Bicep
- [
- 1
- 2
- ]
- ```
-
-### Parameter: `subnetResourceId`
-
-The full resource ID of a subnet in a virtual network to deploy the API Management service in.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subscriptions`
-
-Subscriptions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `virtualNetworkType`
-
-The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
-
-- Required: No
-- Type: string
-- Default: `'None'`
-- Allowed:
- ```Bicep
- [
- 'External'
- 'Internal'
- 'None'
- ]
- ```
-
-### Parameter: `zones`
-
-A list of availability zones denoting where the resource needs to come from.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the API management service. |
-| `resourceGroupName` | string | The resource group the API management service was deployed into. |
-| `resourceId` | string | The resource ID of the API management service. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `apiManagementServicePolicy`
-
-Parameter JSON format
-
-```json
-"apiManagementServicePolicy": {
- "value": {
- "value":"Bicep format
-
-```bicep
-apiManagementServicePolicy: {
- value:'
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/api-management/service/api-version-set/README.md b/modules/api-management/service/api-version-set/README.md
deleted file mode 100644
index 59367616e1..0000000000
--- a/modules/api-management/service/api-version-set/README.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# API Management Service API Version Sets `[Microsoft.ApiManagement/service/apiVersionSets]`
-
-This module deploys an API Management Service API Version Set.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/apiVersionSets` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/apiVersionSets) |
-
-## Parameters
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`name`](#parameter-name) | string | API Version set name. |
-| [`properties`](#parameter-properties) | object | API Version set properties. |
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `name`
-
-API Version set name.
-
-- Required: No
-- Type: string
-- Default: `'default'`
-
-### Parameter: `properties`
-
-API Version set properties.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the API Version set. |
-| `resourceGroupName` | string | The resource group the API Version set was deployed into. |
-| `resourceId` | string | The resource ID of the API Version set. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/api-version-set/main.bicep b/modules/api-management/service/api-version-set/main.bicep
deleted file mode 100644
index 25665f48b7..0000000000
--- a/modules/api-management/service/api-version-set/main.bicep
+++ /dev/null
@@ -1,46 +0,0 @@
-metadata name = 'API Management Service API Version Sets'
-metadata description = 'This module deploys an API Management Service API Version Set.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. API Version set name.')
-param name string = 'default'
-
-@description('Optional. API Version set properties.')
-param properties object = {}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource apiVersionSet 'Microsoft.ApiManagement/service/apiVersionSets@2021-08-01' = {
- name: name
- parent: service
- properties: properties
-}
-
-@description('The resource ID of the API Version set.')
-output resourceId string = apiVersionSet.id
-
-@description('The name of the API Version set.')
-output name string = apiVersionSet.name
-
-@description('The resource group the API Version set was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/api-version-set/main.json b/modules/api-management/service/api-version-set/main.json
deleted file mode 100644
index 1f27892ce2..0000000000
--- a/modules/api-management/service/api-version-set/main.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12233980723609740158"
- },
- "name": "API Management Service API Version Sets",
- "description": "This module deploys an API Management Service API Version Set.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. API Version set name."
- }
- },
- "properties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. API Version set properties."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/apiVersionSets",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": "[parameters('properties')]"
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API Version set."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/apiVersionSets', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API Version set."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API Version set was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/api-version-set/version.json b/modules/api-management/service/api-version-set/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/api-version-set/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/api/README.md b/modules/api-management/service/api/README.md
deleted file mode 100644
index 8f7687330e..0000000000
--- a/modules/api-management/service/api/README.md
+++ /dev/null
@@ -1,297 +0,0 @@
-# API Management Service APIs `[Microsoft.ApiManagement/service/apis]`
-
-This module deploys an API Management Service API.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/apis` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/apis) |
-| `Microsoft.ApiManagement/service/apis/policies` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/apis/policies) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`displayName`](#parameter-displayname) | string | API name. Must be 1 to 300 characters long. |
-| [`name`](#parameter-name) | string | API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. |
-| [`path`](#parameter-path) | string | Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiDescription`](#parameter-apidescription) | string | Description of the API. May include HTML formatting tags. |
-| [`apiRevision`](#parameter-apirevision) | string | Describes the Revision of the API. If no value is provided, default revision 1 is created. |
-| [`apiRevisionDescription`](#parameter-apirevisiondescription) | string | Description of the API Revision. |
-| [`apiType`](#parameter-apitype) | string | Type of API to create. * http creates a REST API * soap creates a SOAP pass-through API * websocket creates websocket API * graphql creates GraphQL API. |
-| [`apiVersion`](#parameter-apiversion) | string | Indicates the Version identifier of the API if the API is versioned. |
-| [`apiVersionDescription`](#parameter-apiversiondescription) | string | Description of the API Version. |
-| [`apiVersionSetId`](#parameter-apiversionsetid) | string | Indicates the Version identifier of the API version set. |
-| [`authenticationSettings`](#parameter-authenticationsettings) | object | Collection of authentication settings included into this API. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`format`](#parameter-format) | string | Format of the Content in which the API is getting imported. |
-| [`isCurrent`](#parameter-iscurrent) | bool | Indicates if API revision is current API revision. |
-| [`policies`](#parameter-policies) | array | Array of Policies to apply to the Service API. |
-| [`protocols`](#parameter-protocols) | array | Describes on which protocols the operations in this API can be invoked. - HTTP or HTTPS. |
-| [`serviceUrl`](#parameter-serviceurl) | string | Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. |
-| [`sourceApiId`](#parameter-sourceapiid) | string | API identifier of the source API. |
-| [`subscriptionKeyParameterNames`](#parameter-subscriptionkeyparameternames) | object | Protocols over which API is made available. |
-| [`subscriptionRequired`](#parameter-subscriptionrequired) | bool | Specifies whether an API or Product subscription is required for accessing the API. |
-| [`type`](#parameter-type) | string | Type of API. |
-| [`value`](#parameter-value) | string | Content value when Importing an API. |
-| [`wsdlSelector`](#parameter-wsdlselector) | object | Criteria to limit import of WSDL to a subset of the document. |
-
-### Parameter: `displayName`
-
-API name. Must be 1 to 300 characters long.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `path`
-
-Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiDescription`
-
-Description of the API. May include HTML formatting tags.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `apiRevision`
-
-Describes the Revision of the API. If no value is provided, default revision 1 is created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `apiRevisionDescription`
-
-Description of the API Revision.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `apiType`
-
-Type of API to create. * http creates a REST API * soap creates a SOAP pass-through API * websocket creates websocket API * graphql creates GraphQL API.
-
-- Required: No
-- Type: string
-- Default: `'http'`
-- Allowed:
- ```Bicep
- [
- 'graphql'
- 'http'
- 'soap'
- 'websocket'
- ]
- ```
-
-### Parameter: `apiVersion`
-
-Indicates the Version identifier of the API if the API is versioned.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `apiVersionDescription`
-
-Description of the API Version.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `apiVersionSetId`
-
-Indicates the Version identifier of the API version set.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `authenticationSettings`
-
-Collection of authentication settings included into this API.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `format`
-
-Format of the Content in which the API is getting imported.
-
-- Required: No
-- Type: string
-- Default: `'openapi'`
-- Allowed:
- ```Bicep
- [
- 'openapi'
- 'openapi-link'
- 'openapi+json'
- 'openapi+json-link'
- 'swagger-json'
- 'swagger-link-json'
- 'wadl-link-json'
- 'wadl-xml'
- 'wsdl'
- 'wsdl-link'
- ]
- ```
-
-### Parameter: `isCurrent`
-
-Indicates if API revision is current API revision.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `policies`
-
-Array of Policies to apply to the Service API.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `protocols`
-
-Describes on which protocols the operations in this API can be invoked. - HTTP or HTTPS.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- 'https'
- ]
- ```
-
-### Parameter: `serviceUrl`
-
-Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `sourceApiId`
-
-API identifier of the source API.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subscriptionKeyParameterNames`
-
-Protocols over which API is made available.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `subscriptionRequired`
-
-Specifies whether an API or Product subscription is required for accessing the API.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `type`
-
-Type of API.
-
-- Required: No
-- Type: string
-- Default: `'http'`
-- Allowed:
- ```Bicep
- [
- 'graphql'
- 'http'
- 'soap'
- 'websocket'
- ]
- ```
-
-### Parameter: `value`
-
-Content value when Importing an API.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `wsdlSelector`
-
-Criteria to limit import of WSDL to a subset of the document.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the API management service API. |
-| `resourceGroupName` | string | The resource group the API management service API was deployed to. |
-| `resourceId` | string | The resource ID of the API management service API. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/api/main.bicep b/modules/api-management/service/api/main.bicep
deleted file mode 100644
index f61e9bf0d5..0000000000
--- a/modules/api-management/service/api/main.bicep
+++ /dev/null
@@ -1,168 +0,0 @@
-metadata name = 'API Management Service APIs'
-metadata description = 'This module deploys an API Management Service API.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.')
-param name string
-
-@description('Optional. Array of Policies to apply to the Service API.')
-param policies array = []
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Optional. Describes the Revision of the API. If no value is provided, default revision 1 is created.')
-param apiRevision string = ''
-
-@description('Optional. Description of the API Revision.')
-param apiRevisionDescription string = ''
-
-@description('Optional. Type of API to create. * http creates a REST API * soap creates a SOAP pass-through API * websocket creates websocket API * graphql creates GraphQL API.')
-@allowed([
- 'graphql'
- 'http'
- 'soap'
- 'websocket'
-])
-param apiType string = 'http'
-
-@description('Optional. Indicates the Version identifier of the API if the API is versioned.')
-param apiVersion string = ''
-
-@description('Optional. Indicates the Version identifier of the API version set.')
-param apiVersionSetId string = ''
-
-@description('Optional. Description of the API Version.')
-param apiVersionDescription string = ''
-
-@description('Optional. Collection of authentication settings included into this API.')
-param authenticationSettings object = {}
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Description of the API. May include HTML formatting tags.')
-param apiDescription string = ''
-
-@description('Required. API name. Must be 1 to 300 characters long.')
-@maxLength(300)
-param displayName string
-
-@description('Optional. Format of the Content in which the API is getting imported.')
-@allowed([
- 'wadl-xml'
- 'wadl-link-json'
- 'swagger-json'
- 'swagger-link-json'
- 'wsdl'
- 'wsdl-link'
- 'openapi'
- 'openapi+json'
- 'openapi-link'
- 'openapi+json-link'
-])
-param format string = 'openapi'
-
-@description('Optional. Indicates if API revision is current API revision.')
-param isCurrent bool = true
-
-@description('Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.')
-param path string
-
-@description('Optional. Describes on which protocols the operations in this API can be invoked. - HTTP or HTTPS.')
-param protocols array = [
- 'https'
-]
-
-@description('Optional. Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.')
-@maxLength(2000)
-param serviceUrl string = ''
-
-@description('Optional. API identifier of the source API.')
-param sourceApiId string = ''
-
-@description('Optional. Protocols over which API is made available.')
-param subscriptionKeyParameterNames object = {}
-
-@description('Optional. Specifies whether an API or Product subscription is required for accessing the API.')
-param subscriptionRequired bool = false
-
-@description('Optional. Type of API.')
-@allowed([
- 'graphql'
- 'http'
- 'soap'
- 'websocket'
-])
-param type string = 'http'
-
-@description('Optional. Content value when Importing an API.')
-param value string = ''
-
-@description('Optional. Criteria to limit import of WSDL to a subset of the document.')
-param wsdlSelector object = {}
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource api 'Microsoft.ApiManagement/service/apis@2021-08-01' = {
- name: name
- parent: service
- properties: {
- apiRevision: !empty(apiRevision) ? apiRevision : null
- apiRevisionDescription: !empty(apiRevisionDescription) ? apiRevisionDescription : null
- apiType: !empty(apiType) ? apiType : null
- apiVersion: !empty(apiVersion) ? apiVersion : null
- apiVersionDescription: !empty(apiVersionDescription) ? apiVersionDescription : null
- apiVersionSetId: !empty(apiVersionSetId) ? apiVersionSetId : null
- authenticationSettings: authenticationSettings
- description: apiDescription
- displayName: displayName
- format: !empty(value) ? format : null
- isCurrent: isCurrent
- path: path
- protocols: protocols
- serviceUrl: !empty(serviceUrl) ? serviceUrl : null
- sourceApiId: !empty(sourceApiId) ? sourceApiId : null
- subscriptionKeyParameterNames: !empty(subscriptionKeyParameterNames) ? subscriptionKeyParameterNames : null
- subscriptionRequired: subscriptionRequired
- type: type
- value: !empty(value) ? value : null
- wsdlSelector: wsdlSelector
- }
-}
-
-module policy 'policy/main.bicep' = [for (policy, index) in policies: {
- name: '${deployment().name}-Policy-${index}'
- params: {
- apiManagementServiceName: apiManagementServiceName
- apiName: api.name
- format: contains(policy, 'format') ? policy.format : 'xml'
- value: policy.value
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the API management service API.')
-output name string = api.name
-
-@description('The resource ID of the API management service API.')
-output resourceId string = api.id
-
-@description('The resource group the API management service API was deployed to.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/api/main.json b/modules/api-management/service/api/main.json
deleted file mode 100644
index f150d2bcb8..0000000000
--- a/modules/api-management/service/api/main.json
+++ /dev/null
@@ -1,419 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17340528539230351720"
- },
- "name": "API Management Service APIs",
- "description": "This module deploys an API Management Service API.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number."
- }
- },
- "policies": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of Policies to apply to the Service API."
- }
- },
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "apiRevision": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Describes the Revision of the API. If no value is provided, default revision 1 is created."
- }
- },
- "apiRevisionDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the API Revision."
- }
- },
- "apiType": {
- "type": "string",
- "defaultValue": "http",
- "allowedValues": [
- "graphql",
- "http",
- "soap",
- "websocket"
- ],
- "metadata": {
- "description": "Optional. Type of API to create. * http creates a REST API * soap creates a SOAP pass-through API * websocket creates websocket API * graphql creates GraphQL API."
- }
- },
- "apiVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Indicates the Version identifier of the API if the API is versioned."
- }
- },
- "apiVersionSetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Indicates the Version identifier of the API version set."
- }
- },
- "apiVersionDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the API Version."
- }
- },
- "authenticationSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Collection of authentication settings included into this API."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "apiDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the API. May include HTML formatting tags."
- }
- },
- "displayName": {
- "type": "string",
- "maxLength": 300,
- "metadata": {
- "description": "Required. API name. Must be 1 to 300 characters long."
- }
- },
- "format": {
- "type": "string",
- "defaultValue": "openapi",
- "allowedValues": [
- "wadl-xml",
- "wadl-link-json",
- "swagger-json",
- "swagger-link-json",
- "wsdl",
- "wsdl-link",
- "openapi",
- "openapi+json",
- "openapi-link",
- "openapi+json-link"
- ],
- "metadata": {
- "description": "Optional. Format of the Content in which the API is getting imported."
- }
- },
- "isCurrent": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates if API revision is current API revision."
- }
- },
- "path": {
- "type": "string",
- "metadata": {
- "description": "Required. Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API."
- }
- },
- "protocols": {
- "type": "array",
- "defaultValue": [
- "https"
- ],
- "metadata": {
- "description": "Optional. Describes on which protocols the operations in this API can be invoked. - HTTP or HTTPS."
- }
- },
- "serviceUrl": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 2000,
- "metadata": {
- "description": "Optional. Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long."
- }
- },
- "sourceApiId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. API identifier of the source API."
- }
- },
- "subscriptionKeyParameterNames": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Protocols over which API is made available."
- }
- },
- "subscriptionRequired": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether an API or Product subscription is required for accessing the API."
- }
- },
- "type": {
- "type": "string",
- "defaultValue": "http",
- "allowedValues": [
- "graphql",
- "http",
- "soap",
- "websocket"
- ],
- "metadata": {
- "description": "Optional. Type of API."
- }
- },
- "value": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Content value when Importing an API."
- }
- },
- "wsdlSelector": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Criteria to limit import of WSDL to a subset of the document."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/apis",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": {
- "apiRevision": "[if(not(empty(parameters('apiRevision'))), parameters('apiRevision'), null())]",
- "apiRevisionDescription": "[if(not(empty(parameters('apiRevisionDescription'))), parameters('apiRevisionDescription'), null())]",
- "apiType": "[if(not(empty(parameters('apiType'))), parameters('apiType'), null())]",
- "apiVersion": "[if(not(empty(parameters('apiVersion'))), parameters('apiVersion'), null())]",
- "apiVersionDescription": "[if(not(empty(parameters('apiVersionDescription'))), parameters('apiVersionDescription'), null())]",
- "apiVersionSetId": "[if(not(empty(parameters('apiVersionSetId'))), parameters('apiVersionSetId'), null())]",
- "authenticationSettings": "[parameters('authenticationSettings')]",
- "description": "[parameters('apiDescription')]",
- "displayName": "[parameters('displayName')]",
- "format": "[if(not(empty(parameters('value'))), parameters('format'), null())]",
- "isCurrent": "[parameters('isCurrent')]",
- "path": "[parameters('path')]",
- "protocols": "[parameters('protocols')]",
- "serviceUrl": "[if(not(empty(parameters('serviceUrl'))), parameters('serviceUrl'), null())]",
- "sourceApiId": "[if(not(empty(parameters('sourceApiId'))), parameters('sourceApiId'), null())]",
- "subscriptionKeyParameterNames": "[if(not(empty(parameters('subscriptionKeyParameterNames'))), parameters('subscriptionKeyParameterNames'), null())]",
- "subscriptionRequired": "[parameters('subscriptionRequired')]",
- "type": "[parameters('type')]",
- "value": "[if(not(empty(parameters('value'))), parameters('value'), null())]",
- "wsdlSelector": "[parameters('wsdlSelector')]"
- }
- },
- {
- "copy": {
- "name": "policy",
- "count": "[length(parameters('policies'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Policy-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "apiManagementServiceName": {
- "value": "[parameters('apiManagementServiceName')]"
- },
- "apiName": {
- "value": "[parameters('name')]"
- },
- "format": "[if(contains(parameters('policies')[copyIndex()], 'format'), createObject('value', parameters('policies')[copyIndex()].format), createObject('value', 'xml'))]",
- "value": {
- "value": "[parameters('policies')[copyIndex()].value]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14571499926134179860"
- },
- "name": "API Management Service APIs Policies",
- "description": "This module deploys an API Management Service API Policy.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "apiName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "policy",
- "metadata": {
- "description": "Optional. The name of the policy."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "format": {
- "type": "string",
- "defaultValue": "xml",
- "allowedValues": [
- "rawxml",
- "rawxml-link",
- "xml",
- "xml-link"
- ],
- "metadata": {
- "description": "Optional. Format of the policyContent."
- }
- },
- "value": {
- "type": "string",
- "metadata": {
- "description": "Required. Contents of the Policy as defined by the format."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/apis/policies",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}/{2}', parameters('apiManagementServiceName'), parameters('apiName'), parameters('name'))]",
- "properties": {
- "format": "[parameters('format')]",
- "value": "[parameters('value')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API policy."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/apis/policies', parameters('apiManagementServiceName'), parameters('apiName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API policy."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API policy was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "[resourceId('Microsoft.ApiManagement/service/apis', parameters('apiManagementServiceName'), parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API management service API."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API management service API."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/apis', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API management service API was deployed to."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/api/policy/README.md b/modules/api-management/service/api/policy/README.md
deleted file mode 100644
index aa6e2a665e..0000000000
--- a/modules/api-management/service/api/policy/README.md
+++ /dev/null
@@ -1,106 +0,0 @@
-# API Management Service APIs Policies `[Microsoft.ApiManagement/service/apis/policies]`
-
-This module deploys an API Management Service API Policy.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/apis/policies` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/apis/policies) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`value`](#parameter-value) | string | Contents of the Policy as defined by the format. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-| [`apiName`](#parameter-apiname) | string | The name of the parent API. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`format`](#parameter-format) | string | Format of the policyContent. |
-| [`name`](#parameter-name) | string | The name of the policy. |
-
-### Parameter: `value`
-
-Contents of the Policy as defined by the format.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiName`
-
-The name of the parent API. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `format`
-
-Format of the policyContent.
-
-- Required: No
-- Type: string
-- Default: `'xml'`
-- Allowed:
- ```Bicep
- [
- 'rawxml'
- 'rawxml-link'
- 'xml'
- 'xml-link'
- ]
- ```
-
-### Parameter: `name`
-
-The name of the policy.
-
-- Required: No
-- Type: string
-- Default: `'policy'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the API policy. |
-| `resourceGroupName` | string | The resource group the API policy was deployed into. |
-| `resourceId` | string | The resource ID of the API policy. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/api/policy/main.bicep b/modules/api-management/service/api/policy/main.bicep
deleted file mode 100644
index f6ce3106b9..0000000000
--- a/modules/api-management/service/api/policy/main.bicep
+++ /dev/null
@@ -1,65 +0,0 @@
-metadata name = 'API Management Service APIs Policies'
-metadata description = 'This module deploys an API Management Service API Policy.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Conditional. The name of the parent API. Required if the template is used in a standalone deployment.')
-param apiName string
-
-@description('Optional. The name of the policy.')
-param name string = 'policy'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Format of the policyContent.')
-@allowed([
- 'rawxml'
- 'rawxml-link'
- 'xml'
- 'xml-link'
-])
-param format string = 'xml'
-
-@description('Required. Contents of the Policy as defined by the format.')
-param value string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-
- resource api 'apis@2021-08-01' existing = {
- name: apiName
- }
-}
-
-resource policy 'Microsoft.ApiManagement/service/apis/policies@2021-08-01' = {
- name: name
- parent: service::api
- properties: {
- format: format
- value: value
- }
-}
-
-@description('The resource ID of the API policy.')
-output resourceId string = policy.id
-
-@description('The name of the API policy.')
-output name string = policy.name
-
-@description('The resource group the API policy was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/api/policy/main.json b/modules/api-management/service/api/policy/main.json
deleted file mode 100644
index 02322fa340..0000000000
--- a/modules/api-management/service/api/policy/main.json
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14571499926134179860"
- },
- "name": "API Management Service APIs Policies",
- "description": "This module deploys an API Management Service API Policy.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "apiName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "policy",
- "metadata": {
- "description": "Optional. The name of the policy."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "format": {
- "type": "string",
- "defaultValue": "xml",
- "allowedValues": [
- "rawxml",
- "rawxml-link",
- "xml",
- "xml-link"
- ],
- "metadata": {
- "description": "Optional. Format of the policyContent."
- }
- },
- "value": {
- "type": "string",
- "metadata": {
- "description": "Required. Contents of the Policy as defined by the format."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/apis/policies",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}/{2}', parameters('apiManagementServiceName'), parameters('apiName'), parameters('name'))]",
- "properties": {
- "format": "[parameters('format')]",
- "value": "[parameters('value')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API policy."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/apis/policies', parameters('apiManagementServiceName'), parameters('apiName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API policy."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API policy was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/api/policy/version.json b/modules/api-management/service/api/policy/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/api/policy/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/api/version.json b/modules/api-management/service/api/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/api/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/authorization-server/README.md b/modules/api-management/service/authorization-server/README.md
deleted file mode 100644
index 9c72d842e4..0000000000
--- a/modules/api-management/service/authorization-server/README.md
+++ /dev/null
@@ -1,217 +0,0 @@
-# API Management Service Authorization Servers `[Microsoft.ApiManagement/service/authorizationServers]`
-
-This module deploys an API Management Service Authorization Server.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/authorizationServers` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/authorizationServers) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`authorizationEndpoint`](#parameter-authorizationendpoint) | string | OAuth authorization endpoint. See
-
-### Parameter Usage: `tls`
-
-
diff --git a/modules/api-management/service/backend/main.bicep b/modules/api-management/service/backend/main.bicep
deleted file mode 100644
index 28c5ec6ccd..0000000000
--- a/modules/api-management/service/backend/main.bicep
+++ /dev/null
@@ -1,85 +0,0 @@
-metadata name = 'API Management Service Backends'
-metadata description = 'This module deploys an API Management Service Backend.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@sys.description('Required. Backend Name.')
-param name string
-
-@sys.description('Optional. Backend Credentials Contract Properties.')
-param credentials object = {}
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. Backend Description.')
-param description string = ''
-
-@sys.description('Optional. Backend communication protocol. - http or soap.')
-param protocol string = 'http'
-
-@sys.description('Optional. Backend Proxy Contract Properties.')
-param proxy object = {}
-
-@sys.description('Optional. Management Uri of the Resource in External System. This URL can be the Arm Resource ID of Logic Apps, Function Apps or API Apps.')
-param resourceId string = ''
-
-@sys.description('Optional. Backend Service Fabric Cluster Properties.')
-param serviceFabricCluster object = {}
-
-@sys.description('Optional. Backend Title.')
-param title string = ''
-
-@sys.description('Optional. Backend TLS Properties.')
-param tls object = {
- validateCertificateChain: false
- validateCertificateName: false
-}
-
-@sys.description('Required. Runtime URL of the Backend.')
-param url string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource backend 'Microsoft.ApiManagement/service/backends@2021-08-01' = {
- name: name
- parent: service
- properties: {
- title: !empty(title) ? title : null
- description: !empty(description) ? description : null
- resourceId: !empty(resourceId) ? resourceId : null
- properties: {
- serviceFabricCluster: !empty(serviceFabricCluster) ? serviceFabricCluster : null
- }
- credentials: !empty(credentials) ? credentials : null
- proxy: !empty(proxy) ? proxy : null
- tls: !empty(tls) ? tls : null
- url: url
- protocol: protocol
- }
-}
-
-@sys.description('The resource ID of the API management service backend.')
-output resourceId string = backend.id
-
-@sys.description('The name of the API management service backend.')
-output name string = backend.name
-
-@sys.description('The resource group the API management service backend was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/backend/main.json b/modules/api-management/service/backend/main.json
deleted file mode 100644
index e10f1c81ee..0000000000
--- a/modules/api-management/service/backend/main.json
+++ /dev/null
@@ -1,157 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3713166604792624713"
- },
- "name": "API Management Service Backends",
- "description": "This module deploys an API Management Service Backend.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Backend Name."
- }
- },
- "credentials": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Backend Credentials Contract Properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Backend Description."
- }
- },
- "protocol": {
- "type": "string",
- "defaultValue": "http",
- "metadata": {
- "description": "Optional. Backend communication protocol. - http or soap."
- }
- },
- "proxy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Backend Proxy Contract Properties."
- }
- },
- "resourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Management Uri of the Resource in External System. This URL can be the Arm Resource ID of Logic Apps, Function Apps or API Apps."
- }
- },
- "serviceFabricCluster": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Backend Service Fabric Cluster Properties."
- }
- },
- "title": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Backend Title."
- }
- },
- "tls": {
- "type": "object",
- "defaultValue": {
- "validateCertificateChain": false,
- "validateCertificateName": false
- },
- "metadata": {
- "description": "Optional. Backend TLS Properties."
- }
- },
- "url": {
- "type": "string",
- "metadata": {
- "description": "Required. Runtime URL of the Backend."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/backends",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": {
- "title": "[if(not(empty(parameters('title'))), parameters('title'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "resourceId": "[if(not(empty(parameters('resourceId'))), parameters('resourceId'), null())]",
- "properties": {
- "serviceFabricCluster": "[if(not(empty(parameters('serviceFabricCluster'))), parameters('serviceFabricCluster'), null())]"
- },
- "credentials": "[if(not(empty(parameters('credentials'))), parameters('credentials'), null())]",
- "proxy": "[if(not(empty(parameters('proxy'))), parameters('proxy'), null())]",
- "tls": "[if(not(empty(parameters('tls'))), parameters('tls'), null())]",
- "url": "[parameters('url')]",
- "protocol": "[parameters('protocol')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API management service backend."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/backends', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API management service backend."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API management service backend was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/backend/version.json b/modules/api-management/service/backend/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/backend/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/cache/README.md b/modules/api-management/service/cache/README.md
deleted file mode 100644
index 31c4f02a3c..0000000000
--- a/modules/api-management/service/cache/README.md
+++ /dev/null
@@ -1,105 +0,0 @@
-# API Management Service Caches `[Microsoft.ApiManagement/service/caches]`
-
-This module deploys an API Management Service Cache.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/caches` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/caches) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`connectionString`](#parameter-connectionstring) | string | Runtime connection string to cache. Can be referenced by a named value like so, {{
diff --git a/modules/api-management/service/named-value/main.bicep b/modules/api-management/service/named-value/main.bicep
deleted file mode 100644
index 87e4c66e5c..0000000000
--- a/modules/api-management/service/named-value/main.bicep
+++ /dev/null
@@ -1,67 +0,0 @@
-metadata name = 'API Management Service Named Values'
-metadata description = 'This module deploys an API Management Service Named Value.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.')
-param displayName string
-
-@description('Optional. KeyVault location details of the namedValue.')
-param keyVault object = {}
-
-@description('Required. Named value Name.')
-param name string
-
-@description('Optional. Tags that when provided can be used to filter the NamedValue list. - string.')
-param tags array?
-
-@description('Optional. Determines whether the value is a secret and should be encrypted or not. Default value is false.')
-#disable-next-line secure-secrets-in-params // Not a secret
-param secret bool = false
-
-@description('Optional. Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on \'GET\' operations! Use \'/listSecrets\' POST request to get the value.')
-param value string = newGuid()
-
-var keyVaultEmpty = empty(keyVault)
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource namedValue 'Microsoft.ApiManagement/service/namedValues@2021-08-01' = {
- name: name
- parent: service
- properties: {
- tags: tags
- secret: secret
- displayName: displayName
- value: keyVaultEmpty ? value : null
- keyVault: !keyVaultEmpty ? keyVault : null
- }
-}
-
-@description('The resource ID of the named value.')
-output resourceId string = namedValue.id
-
-@description('The name of the named value.')
-output name string = namedValue.name
-
-@description('The resource group the named value was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/named-value/main.json b/modules/api-management/service/named-value/main.json
deleted file mode 100644
index 9d72a76220..0000000000
--- a/modules/api-management/service/named-value/main.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16893893897869493831"
- },
- "name": "API Management Service Named Values",
- "description": "This module deploys an API Management Service Named Value.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "displayName": {
- "type": "string",
- "metadata": {
- "description": "Required. Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters."
- }
- },
- "keyVault": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. KeyVault location details of the namedValue."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Named value Name."
- }
- },
- "tags": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags that when provided can be used to filter the NamedValue list. - string."
- }
- },
- "secret": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Determines whether the value is a secret and should be encrypted or not. Default value is false."
- }
- },
- "value": {
- "type": "string",
- "defaultValue": "[newGuid()]",
- "metadata": {
- "description": "Optional. Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value."
- }
- }
- },
- "variables": {
- "keyVaultEmpty": "[empty(parameters('keyVault'))]"
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "service": {
- "existing": true,
- "type": "Microsoft.ApiManagement/service",
- "apiVersion": "2021-08-01",
- "name": "[parameters('apiManagementServiceName')]"
- },
- "namedValue": {
- "type": "Microsoft.ApiManagement/service/namedValues",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": {
- "tags": "[parameters('tags')]",
- "secret": "[parameters('secret')]",
- "displayName": "[parameters('displayName')]",
- "value": "[if(variables('keyVaultEmpty'), parameters('value'), null())]",
- "keyVault": "[if(not(variables('keyVaultEmpty')), parameters('keyVault'), null())]"
- },
- "dependsOn": [
- "service"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the named value."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/namedValues', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the named value."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the named value was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/named-value/version.json b/modules/api-management/service/named-value/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/named-value/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/policy/README.md b/modules/api-management/service/policy/README.md
deleted file mode 100644
index 6b8af635b3..0000000000
--- a/modules/api-management/service/policy/README.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# API Management Service Policies `[Microsoft.ApiManagement/service/policies]`
-
-This module deploys an API Management Service Policy.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/policies` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/policies) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`value`](#parameter-value) | string | Contents of the Policy as defined by the format. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`format`](#parameter-format) | string | Format of the policyContent. |
-| [`name`](#parameter-name) | string | The name of the policy. |
-
-### Parameter: `value`
-
-Contents of the Policy as defined by the format.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `format`
-
-Format of the policyContent.
-
-- Required: No
-- Type: string
-- Default: `'xml'`
-- Allowed:
- ```Bicep
- [
- 'rawxml'
- 'rawxml-link'
- 'xml'
- 'xml-link'
- ]
- ```
-
-### Parameter: `name`
-
-The name of the policy.
-
-- Required: No
-- Type: string
-- Default: `'policy'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the API management service policy. |
-| `resourceGroupName` | string | The resource group the API management service policy was deployed into. |
-| `resourceId` | string | The resource ID of the API management service policy. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/policy/main.bicep b/modules/api-management/service/policy/main.bicep
deleted file mode 100644
index a4d6c778c9..0000000000
--- a/modules/api-management/service/policy/main.bicep
+++ /dev/null
@@ -1,58 +0,0 @@
-metadata name = 'API Management Service Policies'
-metadata description = 'This module deploys an API Management Service Policy.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Optional. The name of the policy.')
-param name string = 'policy'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Format of the policyContent.')
-@allowed([
- 'rawxml'
- 'rawxml-link'
- 'xml'
- 'xml-link'
-])
-param format string = 'xml'
-
-@description('Required. Contents of the Policy as defined by the format.')
-param value string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource policy 'Microsoft.ApiManagement/service/policies@2021-08-01' = {
- name: name
- parent: service
- properties: {
- format: format
- value: value
- }
-}
-
-@description('The resource ID of the API management service policy.')
-output resourceId string = policy.id
-
-@description('The name of the API management service policy.')
-output name string = policy.name
-
-@description('The resource group the API management service policy was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/policy/main.json b/modules/api-management/service/policy/main.json
deleted file mode 100644
index 32bd1ce4bc..0000000000
--- a/modules/api-management/service/policy/main.json
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3650757020022888901"
- },
- "name": "API Management Service Policies",
- "description": "This module deploys an API Management Service Policy.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "policy",
- "metadata": {
- "description": "Optional. The name of the policy."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "format": {
- "type": "string",
- "defaultValue": "xml",
- "allowedValues": [
- "rawxml",
- "rawxml-link",
- "xml",
- "xml-link"
- ],
- "metadata": {
- "description": "Optional. Format of the policyContent."
- }
- },
- "value": {
- "type": "string",
- "metadata": {
- "description": "Required. Contents of the Policy as defined by the format."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/policies",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": {
- "format": "[parameters('format')]",
- "value": "[parameters('value')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API management service policy."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/policies', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API management service policy."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API management service policy was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/policy/version.json b/modules/api-management/service/policy/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/policy/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/portalsetting/README.md b/modules/api-management/service/portalsetting/README.md
deleted file mode 100644
index 05641fe1d1..0000000000
--- a/modules/api-management/service/portalsetting/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# API Management Service Portal Settings `[Microsoft.ApiManagement/service/portalsettings]`
-
-This module deploys an API Management Service Portal Setting.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/portalsettings` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/service) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Portal setting name. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`properties`](#parameter-properties) | object | Portal setting properties. |
-
-### Parameter: `name`
-
-Portal setting name.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'delegation'
- 'signin'
- 'signup'
- ]
- ```
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `properties`
-
-Portal setting properties.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the API management service portal setting. |
-| `resourceGroupName` | string | The resource group the API management service portal setting was deployed into. |
-| `resourceId` | string | The resource ID of the API management service portal setting. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/portalsetting/main.bicep b/modules/api-management/service/portalsetting/main.bicep
deleted file mode 100644
index 8a2111b2d6..0000000000
--- a/modules/api-management/service/portalsetting/main.bicep
+++ /dev/null
@@ -1,51 +0,0 @@
-metadata name = 'API Management Service Portal Settings'
-metadata description = 'This module deploys an API Management Service Portal Setting.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. Portal setting name.')
-@allowed([
- 'delegation'
- 'signin'
- 'signup'
-])
-param name string
-
-@description('Optional. Portal setting properties.')
-param properties object = {}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource portalSetting 'Microsoft.ApiManagement/service/portalsettings@2021-08-01' = if (!empty(properties)) {
- name: any(name)
- parent: service
- properties: properties
-}
-
-@description('The resource ID of the API management service portal setting.')
-output resourceId string = portalSetting.id
-
-@description('The name of the API management service portal setting.')
-output name string = portalSetting.name
-
-@description('The resource group the API management service portal setting was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/portalsetting/main.json b/modules/api-management/service/portalsetting/main.json
deleted file mode 100644
index 01f872a8e5..0000000000
--- a/modules/api-management/service/portalsetting/main.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1124223085084988655"
- },
- "name": "API Management Service Portal Settings",
- "description": "This module deploys an API Management Service Portal Setting.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "allowedValues": [
- "delegation",
- "signin",
- "signup"
- ],
- "metadata": {
- "description": "Required. Portal setting name."
- }
- },
- "properties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Portal setting properties."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[not(empty(parameters('properties')))]",
- "type": "Microsoft.ApiManagement/service/portalsettings",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": "[parameters('properties')]"
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API management service portal setting."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/portalsettings', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API management service portal setting."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API management service portal setting was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/portalsetting/version.json b/modules/api-management/service/portalsetting/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/portalsetting/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/product/README.md b/modules/api-management/service/product/README.md
deleted file mode 100644
index faea3e798b..0000000000
--- a/modules/api-management/service/product/README.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# API Management Service Products `[Microsoft.ApiManagement/service/products]`
-
-This module deploys an API Management Service Product.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/products` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/products) |
-| `Microsoft.ApiManagement/service/products/apis` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/products/apis) |
-| `Microsoft.ApiManagement/service/products/groups` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/products/groups) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Product Name. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apis`](#parameter-apis) | array | Array of Product APIs. |
-| [`approvalRequired`](#parameter-approvalrequired) | bool | Whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the products APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the products APIs. Can be present only if subscriptionRequired property is present and has a value of false. |
-| [`description`](#parameter-description) | string | Product description. May include HTML formatting tags. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`groups`](#parameter-groups) | array | Array of Product Groups. |
-| [`state`](#parameter-state) | string | whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. - notPublished or published. |
-| [`subscriptionRequired`](#parameter-subscriptionrequired) | bool | Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. |
-| [`subscriptionsLimit`](#parameter-subscriptionslimit) | int | Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. |
-| [`terms`](#parameter-terms) | string | Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. |
-
-### Parameter: `name`
-
-Product Name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apis`
-
-Array of Product APIs.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `approvalRequired`
-
-Whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the products APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the products APIs. Can be present only if subscriptionRequired property is present and has a value of false.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `description`
-
-Product description. May include HTML formatting tags.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `groups`
-
-Array of Product Groups.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `state`
-
-whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. - notPublished or published.
-
-- Required: No
-- Type: string
-- Default: `'published'`
-
-### Parameter: `subscriptionRequired`
-
-Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `subscriptionsLimit`
-
-Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `terms`
-
-Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `apiResourceIds` | array | The Resources IDs of the API management service product APIs. |
-| `groupResourceIds` | array | The Resources IDs of the API management service product groups. |
-| `name` | string | The name of the API management service product. |
-| `resourceGroupName` | string | The resource group the API management service product was deployed into. |
-| `resourceId` | string | The resource ID of the API management service product. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/product/api/README.md b/modules/api-management/service/product/api/README.md
deleted file mode 100644
index 67e3cbc13c..0000000000
--- a/modules/api-management/service/product/api/README.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# API Management Service Products APIs `[Microsoft.ApiManagement/service/products/apis]`
-
-This module deploys an API Management Service Product API.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/products/apis` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/products/apis) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the product API. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-| [`productName`](#parameter-productname) | string | The name of the parent Product. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `name`
-
-Name of the product API.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `productName`
-
-The name of the parent Product. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the product API. |
-| `resourceGroupName` | string | The resource group the product API was deployed into. |
-| `resourceId` | string | The resource ID of the product API. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/product/api/main.bicep b/modules/api-management/service/product/api/main.bicep
deleted file mode 100644
index 0b3e018e5b..0000000000
--- a/modules/api-management/service/product/api/main.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-metadata name = 'API Management Service Products APIs'
-metadata description = 'This module deploys an API Management Service Product API.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Conditional. The name of the parent Product. Required if the template is used in a standalone deployment.')
-param productName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. Name of the product API.')
-param name string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-
- resource product 'products@2021-04-01-preview' existing = {
- name: productName
- }
-}
-
-resource api 'Microsoft.ApiManagement/service/products/apis@2021-08-01' = {
- name: name
- parent: service::product
-}
-
-@description('The resource ID of the product API.')
-output resourceId string = api.id
-
-@description('The name of the product API.')
-output name string = api.name
-
-@description('The resource group the product API was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/product/api/main.json b/modules/api-management/service/product/api/main.json
deleted file mode 100644
index 0ecf6ebe3a..0000000000
--- a/modules/api-management/service/product/api/main.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16488730655399972556"
- },
- "name": "API Management Service Products APIs",
- "description": "This module deploys an API Management Service Product API.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "productName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Product. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the product API."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/products/apis",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}/{2}', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the product API."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/products/apis', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the product API."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the product API was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/product/api/version.json b/modules/api-management/service/product/api/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/product/api/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/product/group/README.md b/modules/api-management/service/product/group/README.md
deleted file mode 100644
index b5d1cf7d8d..0000000000
--- a/modules/api-management/service/product/group/README.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# API Management Service Products Groups `[Microsoft.ApiManagement/service/products/groups]`
-
-This module deploys an API Management Service Product Group.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/products/groups` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/products/groups) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the product group. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-| [`productName`](#parameter-productname) | string | The name of the parent Product. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `name`
-
-Name of the product group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `productName`
-
-The name of the parent Product. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the product group. |
-| `resourceGroupName` | string | The resource group the product group was deployed into. |
-| `resourceId` | string | The resource ID of the product group. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/product/group/main.bicep b/modules/api-management/service/product/group/main.bicep
deleted file mode 100644
index 979884a78d..0000000000
--- a/modules/api-management/service/product/group/main.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-metadata name = 'API Management Service Products Groups'
-metadata description = 'This module deploys an API Management Service Product Group.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Conditional. The name of the parent Product. Required if the template is used in a standalone deployment.')
-param productName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. Name of the product group.')
-param name string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-
- resource product 'products@2021-04-01-preview' existing = {
- name: productName
- }
-}
-
-resource group 'Microsoft.ApiManagement/service/products/groups@2021-08-01' = {
- name: name
- parent: service::product
-}
-
-@description('The resource ID of the product group.')
-output resourceId string = group.id
-
-@description('The name of the product group.')
-output name string = group.name
-
-@description('The resource group the product group was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/product/group/main.json b/modules/api-management/service/product/group/main.json
deleted file mode 100644
index 209c9c33d6..0000000000
--- a/modules/api-management/service/product/group/main.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14085709622188800883"
- },
- "name": "API Management Service Products Groups",
- "description": "This module deploys an API Management Service Product Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "productName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Product. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the product group."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/products/groups",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}/{2}', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the product group."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/products/groups', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the product group."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the product group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/product/group/version.json b/modules/api-management/service/product/group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/product/group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/product/main.bicep b/modules/api-management/service/product/main.bicep
deleted file mode 100644
index 0a064939bc..0000000000
--- a/modules/api-management/service/product/main.bicep
+++ /dev/null
@@ -1,103 +0,0 @@
-metadata name = 'API Management Service Products'
-metadata description = 'This module deploys an API Management Service Product.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@sys.description('Optional. Whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the products APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the products APIs. Can be present only if subscriptionRequired property is present and has a value of false.')
-param approvalRequired bool = false
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. Product description. May include HTML formatting tags.')
-param description string = ''
-
-@sys.description('Optional. Array of Product APIs.')
-param apis array = []
-
-@sys.description('Optional. Array of Product Groups.')
-param groups array = []
-
-@sys.description('Required. Product Name.')
-param name string
-
-@sys.description('Optional. whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. - notPublished or published.')
-param state string = 'published'
-
-@sys.description('Optional. Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it\'s value is assumed to be true.')
-param subscriptionRequired bool = false
-
-@sys.description('Optional. Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.')
-param subscriptionsLimit int = 1
-
-@sys.description('Optional. Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.')
-param terms string = ''
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource product 'Microsoft.ApiManagement/service/products@2021-08-01' = {
- name: name
- parent: service
- properties: {
- description: description
- displayName: name
- terms: terms
- subscriptionRequired: subscriptionRequired
- approvalRequired: subscriptionRequired ? approvalRequired : null
- subscriptionsLimit: subscriptionRequired ? subscriptionsLimit : null
- state: state
- }
-}
-
-module product_apis 'api/main.bicep' = [for (api, index) in apis: {
- name: '${deployment().name}-Api-${index}'
- params: {
- apiManagementServiceName: apiManagementServiceName
- name: api.name
- productName: name
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module product_groups 'group/main.bicep' = [for (group, index) in groups: {
- name: '${deployment().name}-Group-${index}'
- params: {
- apiManagementServiceName: apiManagementServiceName
- name: group.name
- productName: name
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@sys.description('The resource ID of the API management service product.')
-output resourceId string = product.id
-
-@sys.description('The name of the API management service product.')
-output name string = product.name
-
-@sys.description('The resource group the API management service product was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The Resources IDs of the API management service product APIs.')
-output apiResourceIds array = [for index in range(0, length(apis)): product_apis[index].outputs.resourceId]
-
-@sys.description('The Resources IDs of the API management service product groups.')
-output groupResourceIds array = [for index in range(0, length(groups)): product_groups[index].outputs.resourceId]
diff --git a/modules/api-management/service/product/main.json b/modules/api-management/service/product/main.json
deleted file mode 100644
index 94a2143e2a..0000000000
--- a/modules/api-management/service/product/main.json
+++ /dev/null
@@ -1,395 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2758822676627115160"
- },
- "name": "API Management Service Products",
- "description": "This module deploys an API Management Service Product.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "approvalRequired": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the products APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the products APIs. Can be present only if subscriptionRequired property is present and has a value of false."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Product description. May include HTML formatting tags."
- }
- },
- "apis": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of Product APIs."
- }
- },
- "groups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of Product Groups."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Product Name."
- }
- },
- "state": {
- "type": "string",
- "defaultValue": "published",
- "metadata": {
- "description": "Optional. whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. - notPublished or published."
- }
- },
- "subscriptionRequired": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as \"protected\" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as \"open\" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true."
- }
- },
- "subscriptionsLimit": {
- "type": "int",
- "defaultValue": 1,
- "metadata": {
- "description": "Optional. Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false."
- }
- },
- "terms": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/products",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": {
- "description": "[parameters('description')]",
- "displayName": "[parameters('name')]",
- "terms": "[parameters('terms')]",
- "subscriptionRequired": "[parameters('subscriptionRequired')]",
- "approvalRequired": "[if(parameters('subscriptionRequired'), parameters('approvalRequired'), null())]",
- "subscriptionsLimit": "[if(parameters('subscriptionRequired'), parameters('subscriptionsLimit'), null())]",
- "state": "[parameters('state')]"
- }
- },
- {
- "copy": {
- "name": "product_apis",
- "count": "[length(parameters('apis'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Api-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "apiManagementServiceName": {
- "value": "[parameters('apiManagementServiceName')]"
- },
- "name": {
- "value": "[parameters('apis')[copyIndex()].name]"
- },
- "productName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16488730655399972556"
- },
- "name": "API Management Service Products APIs",
- "description": "This module deploys an API Management Service Product API.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "productName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Product. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the product API."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/products/apis",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}/{2}', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the product API."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/products/apis', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the product API."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the product API was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- },
- {
- "copy": {
- "name": "product_groups",
- "count": "[length(parameters('groups'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Group-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "apiManagementServiceName": {
- "value": "[parameters('apiManagementServiceName')]"
- },
- "name": {
- "value": "[parameters('groups')[copyIndex()].name]"
- },
- "productName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14085709622188800883"
- },
- "name": "API Management Service Products Groups",
- "description": "This module deploys an API Management Service Product Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "productName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Product. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the product group."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/products/groups",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}/{2}', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the product group."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/products/groups', parameters('apiManagementServiceName'), parameters('productName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the product group."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the product group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API management service product."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/products', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API management service product."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API management service product was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "apiResourceIds": {
- "type": "array",
- "metadata": {
- "description": "The Resources IDs of the API management service product APIs."
- },
- "copy": {
- "count": "[length(range(0, length(parameters('apis'))))]",
- "input": "[reference(resourceId('Microsoft.Resources/deployments', format('{0}-Api-{1}', deployment().name, range(0, length(parameters('apis')))[copyIndex()])), '2022-09-01').outputs.resourceId.value]"
- }
- },
- "groupResourceIds": {
- "type": "array",
- "metadata": {
- "description": "The Resources IDs of the API management service product groups."
- },
- "copy": {
- "count": "[length(range(0, length(parameters('groups'))))]",
- "input": "[reference(resourceId('Microsoft.Resources/deployments', format('{0}-Group-{1}', deployment().name, range(0, length(parameters('groups')))[copyIndex()])), '2022-09-01').outputs.resourceId.value]"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/product/version.json b/modules/api-management/service/product/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/product/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/subscription/README.md b/modules/api-management/service/subscription/README.md
deleted file mode 100644
index a140d3d3a6..0000000000
--- a/modules/api-management/service/subscription/README.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# API Management Service Subscriptions `[Microsoft.ApiManagement/service/subscriptions]`
-
-This module deploys an API Management Service Subscription.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ApiManagement/service/subscriptions` | [2021-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ApiManagement/2021-08-01/service/subscriptions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Subscription name. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`apiManagementServiceName`](#parameter-apimanagementservicename) | string | The name of the parent API Management service. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`allowTracing`](#parameter-allowtracing) | bool | Determines whether tracing can be enabled. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`ownerId`](#parameter-ownerid) | string | User (user ID path) for whom subscription is being created in form /users/{userId}. |
-| [`primaryKey`](#parameter-primarykey) | string | Primary subscription key. If not specified during request key will be generated automatically. |
-| [`scope`](#parameter-scope) | string | Scope type to choose between a product, "allAPIs" or a specific API. Scope like "/products/{productId}" or "/apis" or "/apis/{apiId}". |
-| [`secondaryKey`](#parameter-secondarykey) | string | Secondary subscription key. If not specified during request key will be generated automatically. |
-| [`state`](#parameter-state) | string | Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are "*" active "?" the subscription is active, "*" suspended "?" the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted ? the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected ? the subscription request has been denied by an administrator, * cancelled ? the subscription has been cancelled by the developer or administrator, * expired ? the subscription reached its expiration date and was deactivated. - suspended, active, expired, submitted, rejected, cancelled. |
-
-### Parameter: `name`
-
-Subscription name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `apiManagementServiceName`
-
-The name of the parent API Management service. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `allowTracing`
-
-Determines whether tracing can be enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `ownerId`
-
-User (user ID path) for whom subscription is being created in form /users/{userId}.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `primaryKey`
-
-Primary subscription key. If not specified during request key will be generated automatically.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `scope`
-
-Scope type to choose between a product, "allAPIs" or a specific API. Scope like "/products/{productId}" or "/apis" or "/apis/{apiId}".
-
-- Required: No
-- Type: string
-- Default: `'/apis'`
-
-### Parameter: `secondaryKey`
-
-Secondary subscription key. If not specified during request key will be generated automatically.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `state`
-
-Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are "*" active "?" the subscription is active, "*" suspended "?" the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted ? the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected ? the subscription request has been denied by an administrator, * cancelled ? the subscription has been cancelled by the developer or administrator, * expired ? the subscription reached its expiration date and was deactivated. - suspended, active, expired, submitted, rejected, cancelled.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the API management service subscription. |
-| `resourceGroupName` | string | The resource group the API management service subscription was deployed into. |
-| `resourceId` | string | The resource ID of the API management service subscription. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/api-management/service/subscription/main.bicep b/modules/api-management/service/subscription/main.bicep
deleted file mode 100644
index 93f54c62a0..0000000000
--- a/modules/api-management/service/subscription/main.bicep
+++ /dev/null
@@ -1,69 +0,0 @@
-metadata name = 'API Management Service Subscriptions'
-metadata description = 'This module deploys an API Management Service Subscription.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. Determines whether tracing can be enabled.')
-param allowTracing bool = true
-
-@description('Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment.')
-param apiManagementServiceName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. User (user ID path) for whom subscription is being created in form /users/{userId}.')
-param ownerId string = ''
-
-@description('Optional. Primary subscription key. If not specified during request key will be generated automatically.')
-param primaryKey string = ''
-
-@description('Optional. Scope type to choose between a product, "allAPIs" or a specific API. Scope like "/products/{productId}" or "/apis" or "/apis/{apiId}".')
-param scope string = '/apis'
-
-@description('Optional. Secondary subscription key. If not specified during request key will be generated automatically.')
-param secondaryKey string = ''
-
-@description('Optional. Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are "*" active "?" the subscription is active, "*" suspended "?" the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted ? the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected ? the subscription request has been denied by an administrator, * cancelled ? the subscription has been cancelled by the developer or administrator, * expired ? the subscription reached its expiration date and was deactivated. - suspended, active, expired, submitted, rejected, cancelled.')
-param state string = ''
-
-@description('Required. Subscription name.')
-param name string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource service 'Microsoft.ApiManagement/service@2021-08-01' existing = {
- name: apiManagementServiceName
-}
-
-resource subscription 'Microsoft.ApiManagement/service/subscriptions@2021-08-01' = {
- name: name
- parent: service
- properties: {
- scope: scope
- displayName: name
- ownerId: !empty(ownerId) ? ownerId : null
- primaryKey: !empty(primaryKey) ? primaryKey : null
- secondaryKey: !empty(secondaryKey) ? secondaryKey : null
- state: !empty(state) ? state : null
- allowTracing: allowTracing
- }
-}
-
-@description('The resource ID of the API management service subscription.')
-output resourceId string = subscription.id
-
-@description('The name of the API management service subscription.')
-output name string = subscription.name
-
-@description('The resource group the API management service subscription was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/api-management/service/subscription/main.json b/modules/api-management/service/subscription/main.json
deleted file mode 100644
index faefcb8783..0000000000
--- a/modules/api-management/service/subscription/main.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10733141744485121232"
- },
- "name": "API Management Service Subscriptions",
- "description": "This module deploys an API Management Service Subscription.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "allowTracing": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Determines whether tracing can be enabled."
- }
- },
- "apiManagementServiceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent API Management service. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "ownerId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. User (user ID path) for whom subscription is being created in form /users/{userId}."
- }
- },
- "primaryKey": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Primary subscription key. If not specified during request key will be generated automatically."
- }
- },
- "scope": {
- "type": "string",
- "defaultValue": "/apis",
- "metadata": {
- "description": "Optional. Scope type to choose between a product, \"allAPIs\" or a specific API. Scope like \"/products/{productId}\" or \"/apis\" or \"/apis/{apiId}\"."
- }
- },
- "secondaryKey": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Secondary subscription key. If not specified during request key will be generated automatically."
- }
- },
- "state": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are \"*\" active \"?\" the subscription is active, \"*\" suspended \"?\" the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted ? the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected ? the subscription request has been denied by an administrator, * cancelled ? the subscription has been cancelled by the developer or administrator, * expired ? the subscription reached its expiration date and was deactivated. - suspended, active, expired, submitted, rejected, cancelled."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Subscription name."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ApiManagement/service/subscriptions",
- "apiVersion": "2021-08-01",
- "name": "[format('{0}/{1}', parameters('apiManagementServiceName'), parameters('name'))]",
- "properties": {
- "scope": "[parameters('scope')]",
- "displayName": "[parameters('name')]",
- "ownerId": "[if(not(empty(parameters('ownerId'))), parameters('ownerId'), null())]",
- "primaryKey": "[if(not(empty(parameters('primaryKey'))), parameters('primaryKey'), null())]",
- "secondaryKey": "[if(not(empty(parameters('secondaryKey'))), parameters('secondaryKey'), null())]",
- "state": "[if(not(empty(parameters('state'))), parameters('state'), null())]",
- "allowTracing": "[parameters('allowTracing')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the API management service subscription."
- },
- "value": "[resourceId('Microsoft.ApiManagement/service/subscriptions', parameters('apiManagementServiceName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the API management service subscription."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the API management service subscription was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/api-management/service/subscription/version.json b/modules/api-management/service/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/api-management/service/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/api-management/service/tests/e2e/defaults/main.test.bicep b/modules/api-management/service/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 693a2e0673..0000000000
--- a/modules/api-management/service/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,51 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-apimanagement.service-${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 = 'apismin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- publisherEmail: 'apimgmt-noreply@mail.windowsazure.com'
- publisherName: '${namePrefix}-az-amorg-x-001'
- }
-}]
diff --git a/modules/api-management/service/tests/e2e/max/dependencies.bicep b/modules/api-management/service/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index bd63a95634..0000000000
--- a/modules/api-management/service/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/api-management/service/tests/e2e/max/main.test.bicep b/modules/api-management/service/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 5a03a93afb..0000000000
--- a/modules/api-management/service/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,230 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-apimanagement.service-${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 = 'apismax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-@description('Optional. The secret to leverage for authorization server authentication.')
-@secure()
-param customSecret string = newGuid()
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}azsa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- publisherEmail: 'apimgmt-noreply@mail.windowsazure.com'
- publisherName: '${namePrefix}-az-amorg-x-001'
- apis: [
- {
- apiVersionSet: {
- name: 'echo-version-set'
- properties: {
- description: 'echo-version-set'
- displayName: 'echo-version-set'
- versioningScheme: 'Segment'
- }
- }
- displayName: 'Echo API'
- name: 'echo-api'
- path: 'echo'
- serviceUrl: 'http://echoapi.cloudapp.net/api'
- }
- ]
- authorizationServers: {
- secureList: [
- {
- authorizationEndpoint: '${environment().authentication.loginEndpoint}651b43ce-ccb8-4301-b551-b04dd872d401/oauth2/v2.0/authorize'
- clientId: 'apimclientid'
- clientSecret: customSecret
- clientRegistrationEndpoint: 'http://localhost'
- grantTypes: [
- 'authorizationCode'
- ]
- name: 'AuthServer1'
- tokenEndpoint: '${environment().authentication.loginEndpoint}651b43ce-ccb8-4301-b551-b04dd872d401/oauth2/v2.0/token'
- }
- ]
- }
- backends: [
- {
- name: 'backend'
- tls: {
- validateCertificateChain: false
- validateCertificateName: false
- }
- url: 'http://echoapi.cloudapp.net/api'
- }
- ]
- caches: [
- {
- connectionString: 'connectionstringtest'
- name: 'westeurope'
- useFromLocation: 'westeurope'
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- identityProviders: [
- {
- name: 'aadProvider'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- namedValues: [
- {
- displayName: 'apimkey'
- name: 'apimkey'
- secret: true
- }
- ]
- policies: [
- {
- format: 'xml'
- value: '
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _Pe_
-
-
-
-
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Azure App Configuration. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`createMode`](#parameter-createmode) | string | Indicates whether the configuration store need to be recovered. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableLocalAuth`](#parameter-disablelocalauth) | bool | Disables all authentication methods other than AAD authentication. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enablePurgeProtection`](#parameter-enablepurgeprotection) | bool | Property specifying whether protection against purge is enabled for this configuration store. |
-| [`keyValues`](#parameter-keyvalues) | array | All Key / Values to create. Requires local authentication to be enabled. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`sku`](#parameter-sku) | string | Pricing tier of App Configuration. |
-| [`softDeleteRetentionInDays`](#parameter-softdeleteretentionindays) | int | The amount of time in days that the configuration store will be retained when it is soft deleted. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-Name of the Azure App Configuration.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `createMode`
-
-Indicates whether the configuration store need to be recovered.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'Recover'
- ]
- ```
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableLocalAuth`
-
-Disables all authentication methods other than AAD authentication.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enablePurgeProtection`
-
-Property specifying whether protection against purge is enabled for this configuration store.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `keyValues`
-
-All Key / Values to create. Requires local authentication to be enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `sku`
-
-Pricing tier of App Configuration.
-
-- Required: No
-- Type: string
-- Default: `'Standard'`
-- Allowed:
- ```Bicep
- [
- 'Free'
- 'Standard'
- ]
- ```
-
-### Parameter: `softDeleteRetentionInDays`
-
-The amount of time in days that the configuration store will be retained when it is soft deleted.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the app configuration. |
-| `resourceGroupName` | string | The resource group the app configuration store was deployed into. |
-| `resourceId` | string | The resource ID of the app configuration. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/app-configuration/configuration-store/key-value/README.md b/modules/app-configuration/configuration-store/key-value/README.md
deleted file mode 100644
index 6f6a67e760..0000000000
--- a/modules/app-configuration/configuration-store/key-value/README.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# App Configuration Stores Key Values `[Microsoft.AppConfiguration/configurationStores/keyValues]`
-
-This module deploys an App Configuration Store Key Value.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.AppConfiguration/configurationStores/keyValues` | [2023-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.AppConfiguration/2023-03-01/configurationStores/keyValues) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the key. |
-| [`value`](#parameter-value) | string | Name of the value. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`appConfigurationName`](#parameter-appconfigurationname) | string | The name of the parent app configuration store. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`contentType`](#parameter-contenttype) | string | The content type of the key-values value. Providing a proper content-type can enable transformations of values when they are retrieved by applications. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-Name of the key.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `value`
-
-Name of the value.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `appConfigurationName`
-
-The name of the parent app configuration store. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `contentType`
-
-The content type of the key-values value. Providing a proper content-type can enable transformations of values when they are retrieved by applications.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the key values. |
-| `resourceGroupName` | string | The resource group the batch account was deployed into. |
-| `resourceId` | string | The resource ID of the key values. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/app-configuration/configuration-store/key-value/main.bicep b/modules/app-configuration/configuration-store/key-value/main.bicep
deleted file mode 100644
index acc8bbc774..0000000000
--- a/modules/app-configuration/configuration-store/key-value/main.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-metadata name = 'App Configuration Stores Key Values'
-metadata description = 'This module deploys an App Configuration Store Key Value.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the key.')
-param name string
-
-@description('Required. Name of the value.')
-param value string
-
-@description('Conditional. The name of the parent app configuration store. Required if the template is used in a standalone deployment.')
-param appConfigurationName string
-
-@description('Optional. The content type of the key-values value. Providing a proper content-type can enable transformations of values when they are retrieved by applications.')
-param contentType string = ''
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') // update all the descriptions
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource appConfiguration 'Microsoft.AppConfiguration/configurationStores@2023-03-01' existing = {
- name: appConfigurationName
-}
-
-resource keyValues 'Microsoft.AppConfiguration/configurationStores/keyValues@2023-03-01' = {
- name: name
- parent: appConfiguration
- properties: {
- contentType: contentType
- tags: tags
- value: value
- }
-}
-@description('The name of the key values.')
-output name string = keyValues.name
-
-@description('The resource ID of the key values.')
-output resourceId string = keyValues.id
-
-@description('The resource group the batch account was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/app-configuration/configuration-store/key-value/main.json b/modules/app-configuration/configuration-store/key-value/main.json
deleted file mode 100644
index 2893f5eb2f..0000000000
--- a/modules/app-configuration/configuration-store/key-value/main.json
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5336531799585402354"
- },
- "name": "App Configuration Stores Key Values",
- "description": "This module deploys an App Configuration Store Key Value.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the key."
- }
- },
- "value": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the value."
- }
- },
- "appConfigurationName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent app configuration store. Required if the template is used in a standalone deployment."
- }
- },
- "contentType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The content type of the key-values value. Providing a proper content-type can enable transformations of values when they are retrieved by applications."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "appConfiguration": {
- "existing": true,
- "type": "Microsoft.AppConfiguration/configurationStores",
- "apiVersion": "2023-03-01",
- "name": "[parameters('appConfigurationName')]"
- },
- "keyValues": {
- "type": "Microsoft.AppConfiguration/configurationStores/keyValues",
- "apiVersion": "2023-03-01",
- "name": "[format('{0}/{1}', parameters('appConfigurationName'), parameters('name'))]",
- "properties": {
- "contentType": "[parameters('contentType')]",
- "tags": "[parameters('tags')]",
- "value": "[parameters('value')]"
- },
- "dependsOn": [
- "appConfiguration"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the key values."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the key values."
- },
- "value": "[resourceId('Microsoft.AppConfiguration/configurationStores/keyValues', parameters('appConfigurationName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the batch account was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/app-configuration/configuration-store/key-value/version.json b/modules/app-configuration/configuration-store/key-value/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/app-configuration/configuration-store/key-value/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/app-configuration/configuration-store/main.bicep b/modules/app-configuration/configuration-store/main.bicep
deleted file mode 100644
index f4bc48c14c..0000000000
--- a/modules/app-configuration/configuration-store/main.bicep
+++ /dev/null
@@ -1,402 +0,0 @@
-metadata name = 'App Configuration Stores'
-metadata description = 'This module deploys an App Configuration Store.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Azure App Configuration.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@allowed([
- 'Free'
- 'Standard'
-])
-@description('Optional. Pricing tier of App Configuration.')
-param sku string = 'Standard'
-
-@allowed([
- 'Default'
- 'Recover'
-])
-@description('Optional. Indicates whether the configuration store need to be recovered.')
-param createMode string = 'Default'
-
-@description('Optional. Disables all authentication methods other than AAD authentication.')
-param disableLocalAuth bool = false
-
-@description('Optional. Property specifying whether protection against purge is enabled for this configuration store.')
-param enablePurgeProtection bool = false
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. The amount of time in days that the configuration store will be retained when it is soft deleted.')
-@minValue(1)
-@maxValue(7)
-param softDeleteRetentionInDays int = 1
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. All Key / Values to create. Requires local authentication to be enabled.')
-param keyValues array = []
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-var enableReferencedModulesTelemetry = false
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- 'App Compliance Automation Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f37683f-2463-46b6-9ce7-9b788b988ba2')
- 'App Compliance Automation Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ffc6bbe0-e443-4c3b-bf54-26581bb2f78e')
- 'App Configuration Data Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b')
- 'App Configuration Data Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '516239f1-63e1-4d78-a4de-a74fb236a071')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource configurationStore 'Microsoft.AppConfiguration/configurationStores@2023-03-01' = {
- name: name
- location: location
- tags: tags
- sku: {
- name: sku
- }
- identity: identity
- properties: {
- createMode: createMode
- disableLocalAuth: disableLocalAuth
- enablePurgeProtection: sku == 'Free' ? false : enablePurgeProtection
- encryption: !empty(customerManagedKey) ? {
- keyVaultProperties: {
- keyIdentifier: !empty(customerManagedKey.?keyVersion ?? '') ? '${cMKKeyVault::cMKKey.properties.keyUri}/${customerManagedKey!.keyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- identityClientId: !empty(customerManagedKey.?userAssignedIdentityResourceId ?? '') ? cMKUserAssignedIdentity.properties.clientId : null
- }
- } : null
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : null
- softDeleteRetentionInDays: sku == 'Free' ? 0 : softDeleteRetentionInDays
- }
-}
-
-module configurationStore_keyValues 'key-value/main.bicep' = [for (keyValue, index) in keyValues: {
- name: '${uniqueString(deployment().name, location)}-AppConfig-KeyValues-${index}'
- params: {
- appConfigurationName: configurationStore.name
- name: keyValue.name
- value: keyValue.value
- contentType: contains(keyValue, 'contentType') ? keyValue.contentType : ''
- tags: keyValue.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource configurationStore_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: configurationStore
-}
-
-resource configurationStore_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: configurationStore
-}]
-
-resource configurationStore_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(configurationStore.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: configurationStore
-}]
-
-module configurationStore_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-configurationStore-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'configurationStores'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(configurationStore.id, '/'))}-${privateEndpoint.?service ?? 'configurationStores'}-${index}'
- serviceResourceId: configurationStore.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The name of the app configuration.')
-output name string = configurationStore.name
-
-@description('The resource ID of the app configuration.')
-output resourceId string = configurationStore.id
-
-@description('The resource group the app configuration store was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(configurationStore.identity, 'principalId') ? configurationStore.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = configurationStore.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/app-configuration/configuration-store/main.json b/modules/app-configuration/configuration-store/main.json
deleted file mode 100644
index 8356549175..0000000000
--- a/modules/app-configuration/configuration-store/main.json
+++ /dev/null
@@ -1,1520 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "1035721071234192840"
- },
- "name": "App Configuration Stores",
- "description": "This module deploys an App Configuration Store.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Azure App Configuration."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "sku": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Free",
- "Standard"
- ],
- "metadata": {
- "description": "Optional. Pricing tier of App Configuration."
- }
- },
- "createMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "Recover"
- ],
- "metadata": {
- "description": "Optional. Indicates whether the configuration store need to be recovered."
- }
- },
- "disableLocalAuth": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Disables all authentication methods other than AAD authentication."
- }
- },
- "enablePurgeProtection": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Property specifying whether protection against purge is enabled for this configuration store."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- },
- "softDeleteRetentionInDays": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 7,
- "metadata": {
- "description": "Optional. The amount of time in days that the configuration store will be retained when it is soft deleted."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "keyValues": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. All Key / Values to create. Requires local authentication to be enabled."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "App Compliance Automation Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f37683f-2463-46b6-9ce7-9b788b988ba2')]",
- "App Compliance Automation Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ffc6bbe0-e443-4c3b-bf54-26581bb2f78e')]",
- "App Configuration Data Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b')]",
- "App Configuration Data Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '516239f1-63e1-4d78-a4de-a74fb236a071')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "configurationStore": {
- "type": "Microsoft.AppConfiguration/configurationStores",
- "apiVersion": "2023-03-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('sku')]"
- },
- "identity": "[variables('identity')]",
- "properties": {
- "createMode": "[parameters('createMode')]",
- "disableLocalAuth": "[parameters('disableLocalAuth')]",
- "enablePurgeProtection": "[if(equals(parameters('sku'), 'Free'), false(), parameters('enablePurgeProtection'))]",
- "encryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('keyVaultProperties', createObject('keyIdentifier', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('customerManagedKey').keyVersion), reference('cMKKeyVault::cMKKey').keyUriWithVersion), 'identityClientId', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), ''))), reference('cMKUserAssignedIdentity').clientId, null()))), null())]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), null())]",
- "softDeleteRetentionInDays": "[if(equals(parameters('sku'), 'Free'), 0, parameters('softDeleteRetentionInDays'))]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "configurationStore_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.AppConfiguration/configurationStores/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "configurationStore"
- ]
- },
- "configurationStore_diagnosticSettings": {
- "copy": {
- "name": "configurationStore_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.AppConfiguration/configurationStores/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "configurationStore"
- ]
- },
- "configurationStore_roleAssignments": {
- "copy": {
- "name": "configurationStore_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.AppConfiguration/configurationStores/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.AppConfiguration/configurationStores', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "configurationStore"
- ]
- },
- "configurationStore_keyValues": {
- "copy": {
- "name": "configurationStore_keyValues",
- "count": "[length(parameters('keyValues'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AppConfig-KeyValues-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "appConfigurationName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('keyValues')[copyIndex()].name]"
- },
- "value": {
- "value": "[parameters('keyValues')[copyIndex()].value]"
- },
- "contentType": "[if(contains(parameters('keyValues')[copyIndex()], 'contentType'), createObject('value', parameters('keyValues')[copyIndex()].contentType), createObject('value', ''))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('keyValues')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "11370563001494590361"
- },
- "name": "App Configuration Stores Key Values",
- "description": "This module deploys an App Configuration Store Key Value.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the key."
- }
- },
- "value": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the value."
- }
- },
- "appConfigurationName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent app configuration store. Required if the template is used in a standalone deployment."
- }
- },
- "contentType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The content type of the key-values value. Providing a proper content-type can enable transformations of values when they are retrieved by applications."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "appConfiguration": {
- "existing": true,
- "type": "Microsoft.AppConfiguration/configurationStores",
- "apiVersion": "2023-03-01",
- "name": "[parameters('appConfigurationName')]"
- },
- "keyValues": {
- "type": "Microsoft.AppConfiguration/configurationStores/keyValues",
- "apiVersion": "2023-03-01",
- "name": "[format('{0}/{1}', parameters('appConfigurationName'), parameters('name'))]",
- "properties": {
- "contentType": "[parameters('contentType')]",
- "tags": "[parameters('tags')]",
- "value": "[parameters('value')]"
- },
- "dependsOn": [
- "appConfiguration"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the key values."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the key values."
- },
- "value": "[resourceId('Microsoft.AppConfiguration/configurationStores/keyValues', parameters('appConfigurationName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the batch account was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "configurationStore"
- ]
- },
- "configurationStore_privateEndpoints": {
- "copy": {
- "name": "configurationStore_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-configurationStore-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'configurationStores')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.AppConfiguration/configurationStores', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'configurationStores'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.AppConfiguration/configurationStores', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "configurationStore"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the app configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the app configuration."
- },
- "value": "[resourceId('Microsoft.AppConfiguration/configurationStores', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the app configuration store was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('configurationStore', '2023-03-01', 'full').identity, 'principalId')), reference('configurationStore', '2023-03-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('configurationStore', '2023-03-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/app-configuration/configuration-store/tests/e2e/defaults/main.test.bicep b/modules/app-configuration/configuration-store/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 895734bd01..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-appconfiguration.configurationstores-${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 = 'accmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/app-configuration/configuration-store/tests/e2e/encr/dependencies.bicep b/modules/app-configuration/configuration-store/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index bebad9a289..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,61 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2023-02-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true
- softDeleteRetentionInDays: 90
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2023-02-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the created encryption key.')
-output keyName string = keyVault::key.name
diff --git a/modules/app-configuration/configuration-store/tests/e2e/encr/main.test.bicep b/modules/app-configuration/configuration-store/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index 8c676e3be7..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,110 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-appconfiguration.configurationstores-${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 = 'accencr'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- createMode: 'Default'
- disableLocalAuth: false
- enablePurgeProtection: false
- keyValues: [
- {
- contentType: 'contentType'
- name: 'keyName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
-
- principalType: 'ServicePrincipal'
- }
- ]
- value: 'valueName'
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- softDeleteRetentionInDays: 1
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- }
-}]
diff --git a/modules/app-configuration/configuration-store/tests/e2e/max/dependencies.bicep b/modules/app-configuration/configuration-store/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index bd63a95634..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/app-configuration/configuration-store/tests/e2e/max/main.test.bicep b/modules/app-configuration/configuration-store/tests/e2e/max/main.test.bicep
deleted file mode 100644
index a3bba846cd..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,135 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-appconfiguration.configurationstores-${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 = 'accmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- createMode: 'Default'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- disableLocalAuth: false
- enablePurgeProtection: false
- keyValues: [
- {
- contentType: 'contentType'
- name: 'keyName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- value: 'valueName'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- softDeleteRetentionInDays: 1
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/app-configuration/configuration-store/tests/e2e/pe/dependencies.bicep b/modules/app-configuration/configuration-store/tests/e2e/pe/dependencies.bicep
deleted file mode 100644
index ee93b3e1e3..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/pe/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.azconfig.io'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetworkName}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/app-configuration/configuration-store/tests/e2e/pe/main.test.bicep b/modules/app-configuration/configuration-store/tests/e2e/pe/main.test.bicep
deleted file mode 100644
index 59ca3034ed..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/pe/main.test.bicep
+++ /dev/null
@@ -1,78 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-appconfiguration.configurationstores-${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 = 'accpe'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- createMode: 'Default'
- disableLocalAuth: false
- enablePurgeProtection: false
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
-
- nestedDependencies.outputs.privateDNSZoneResourceId
-
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- softDeleteRetentionInDays: 1
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/app-configuration/configuration-store/tests/e2e/waf-aligned/dependencies.bicep b/modules/app-configuration/configuration-store/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index bd63a95634..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/app-configuration/configuration-store/tests/e2e/waf-aligned/main.test.bicep b/modules/app-configuration/configuration-store/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 11ffe42dcc..0000000000
--- a/modules/app-configuration/configuration-store/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,118 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-appconfiguration.configurationstores-${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 = 'accwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- createMode: 'Default'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- disableLocalAuth: false
- enablePurgeProtection: false
- keyValues: [
- {
- contentType: 'contentType'
- name: 'keyName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- value: 'valueName'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- softDeleteRetentionInDays: 1
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/app-configuration/configuration-store/version.json b/modules/app-configuration/configuration-store/version.json
deleted file mode 100644
index b3d560b1ad..0000000000
--- a/modules/app-configuration/configuration-store/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.3",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/app/container-app/README.md b/modules/app/container-app/README.md
index 3c53161686..6f95c5024a 100644
--- a/modules/app/container-app/README.md
+++ b/modules/app/container-app/README.md
@@ -1,900 +1,7 @@
-# Container Apps `[Microsoft.App/containerApps]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`containers`](#parameter-containers) | array | List of container definitions for the Container App. |
-| [`environmentId`](#parameter-environmentid) | string | Resource ID of environment. |
-| [`name`](#parameter-name) | string | Name of the Container App. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`activeRevisionsMode`](#parameter-activerevisionsmode) | string | ActiveRevisionsMode controls how active revisions are handled for the Container app. |
-| [`customDomains`](#parameter-customdomains) | array | Custom domain bindings for Container App hostnames. |
-| [`dapr`](#parameter-dapr) | object | Dapr configuration for the Container App. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exposedPort`](#parameter-exposedport) | int | Exposed Port in containers for TCP traffic from ingress. |
-| [`ingressAllowInsecure`](#parameter-ingressallowinsecure) | bool | Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections. |
-| [`ingressExternal`](#parameter-ingressexternal) | bool | Bool indicating if app exposes an external http endpoint. |
-| [`ingressTargetPort`](#parameter-ingresstargetport) | int | Target Port in containers for traffic from ingress. |
-| [`ingressTransport`](#parameter-ingresstransport) | string | Ingress transport protocol. |
-| [`initContainersTemplate`](#parameter-initcontainerstemplate) | array | List of specialized containers that run before app containers. |
-| [`ipSecurityRestrictions`](#parameter-ipsecurityrestrictions) | array | Rules to restrict incoming IP address. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`maxInactiveRevisions`](#parameter-maxinactiverevisions) | int | Max inactive revisions a Container App can have. |
-| [`registries`](#parameter-registries) | array | Collection of private container registry credentials for containers used by the Container app. |
-| [`revisionSuffix`](#parameter-revisionsuffix) | string | User friendly suffix that is appended to the revision name. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute. |
-| [`scaleMaxReplicas`](#parameter-scalemaxreplicas) | int | Maximum number of container replicas. Defaults to 10 if not set. |
-| [`scaleMinReplicas`](#parameter-scaleminreplicas) | int | Minimum number of container replicas. |
-| [`scaleRules`](#parameter-scalerules) | array | Scaling rules. |
-| [`secrets`](#parameter-secrets) | secureObject | The secrets of the Container App. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`trafficLabel`](#parameter-trafficlabel) | string | Associates a traffic label with a revision. Label name should be consist of lower case alphanumeric characters or dashes. |
-| [`trafficLatestRevision`](#parameter-trafficlatestrevision) | bool | Indicates that the traffic weight belongs to a latest stable revision. |
-| [`trafficRevisionName`](#parameter-trafficrevisionname) | string | Name of a revision. |
-| [`trafficWeight`](#parameter-trafficweight) | int | Traffic weight assigned to a revision. |
-| [`volumes`](#parameter-volumes) | array | List of volume definitions for the Container App. |
-| [`workloadProfileType`](#parameter-workloadprofiletype) | string | Workload profile type to pin for container app execution. |
-
-### Parameter: `containers`
-
-List of container definitions for the Container App.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `environmentId`
-
-Resource ID of environment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the Container App.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `activeRevisionsMode`
-
-ActiveRevisionsMode controls how active revisions are handled for the Container app.
-
-- Required: No
-- Type: string
-- Default: `'Single'`
-- Allowed:
- ```Bicep
- [
- 'Multiple'
- 'Single'
- ]
- ```
-
-### Parameter: `customDomains`
-
-Custom domain bindings for Container App hostnames.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dapr`
-
-Dapr configuration for the Container App.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exposedPort`
-
-Exposed Port in containers for TCP traffic from ingress.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `ingressAllowInsecure`
-
-Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `ingressExternal`
-
-Bool indicating if app exposes an external http endpoint.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `ingressTargetPort`
-
-Target Port in containers for traffic from ingress.
-
-- Required: No
-- Type: int
-- Default: `80`
-
-### Parameter: `ingressTransport`
-
-Ingress transport protocol.
-
-- Required: No
-- Type: string
-- Default: `'auto'`
-- Allowed:
- ```Bicep
- [
- 'auto'
- 'http'
- 'http2'
- 'tcp'
- ]
- ```
-
-### Parameter: `initContainersTemplate`
-
-List of specialized containers that run before app containers.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `ipSecurityRestrictions`
-
-Rules to restrict incoming IP address.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `maxInactiveRevisions`
-
-Max inactive revisions a Container App can have.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `registries`
-
-Collection of private container registry credentials for containers used by the Container app.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `revisionSuffix`
-
-User friendly suffix that is appended to the revision name.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `scaleMaxReplicas`
-
-Maximum number of container replicas. Defaults to 10 if not set.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `scaleMinReplicas`
-
-Minimum number of container replicas.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `scaleRules`
-
-Scaling rules.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `secrets`
-
-The secrets of the Container App.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `trafficLabel`
-
-Associates a traffic label with a revision. Label name should be consist of lower case alphanumeric characters or dashes.
-
-- Required: No
-- Type: string
-- Default: `'label-1'`
-
-### Parameter: `trafficLatestRevision`
-
-Indicates that the traffic weight belongs to a latest stable revision.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `trafficRevisionName`
-
-Name of a revision.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `trafficWeight`
-
-Traffic weight assigned to a revision.
-
-- Required: No
-- Type: int
-- Default: `100`
-
-### Parameter: `volumes`
-
-List of volume definitions for the Container App.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `workloadProfileType`
-
-Workload profile type to pin for container app execution.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Container App. |
-| `resourceGroupName` | string | The name of the resource group the Container App was deployed into. |
-| `resourceId` | string | The resource ID of the Container App. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/app/container-app/main.bicep b/modules/app/container-app/main.bicep
deleted file mode 100644
index 939f2bed5c..0000000000
--- a/modules/app/container-app/main.bicep
+++ /dev/null
@@ -1,267 +0,0 @@
-metadata name = 'Container Apps'
-metadata description = 'This module deploys a Container App.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Container App.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Bool indicating if app exposes an external http endpoint.')
-param ingressExternal bool = true
-
-@allowed([
- 'auto'
- 'http'
- 'http2'
- 'tcp'
-])
-@description('Optional. Ingress transport protocol.')
-param ingressTransport string = 'auto'
-
-@description('Optional. Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections.')
-param ingressAllowInsecure bool = true
-
-@description('Optional. Target Port in containers for traffic from ingress.')
-param ingressTargetPort int = 80
-
-@description('Optional. Maximum number of container replicas. Defaults to 10 if not set.')
-param scaleMaxReplicas int = 1
-
-@description('Optional. Minimum number of container replicas.')
-param scaleMinReplicas int = 0
-
-@description('Optional. Scaling rules.')
-param scaleRules array = []
-
-@allowed([
- 'Multiple'
- 'Single'
-])
-@description('Optional. ActiveRevisionsMode controls how active revisions are handled for the Container app.')
-param activeRevisionsMode string = 'Single'
-
-@description('Required. Resource ID of environment.')
-param environmentId string
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Collection of private container registry credentials for containers used by the Container app.')
-param registries array = []
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@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.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Custom domain bindings for Container App hostnames.')
-param customDomains array = []
-
-@description('Optional. Exposed Port in containers for TCP traffic from ingress.')
-param exposedPort int = 0
-
-@description('Optional. Rules to restrict incoming IP address.')
-param ipSecurityRestrictions array = []
-
-@description('Optional. Associates a traffic label with a revision. Label name should be consist of lower case alphanumeric characters or dashes.')
-param trafficLabel string = 'label-1'
-
-@description('Optional. Indicates that the traffic weight belongs to a latest stable revision.')
-param trafficLatestRevision bool = true
-
-@description('Optional. Name of a revision.')
-param trafficRevisionName string = ''
-
-@description('Optional. Traffic weight assigned to a revision.')
-param trafficWeight int = 100
-
-@description('Optional. Dapr configuration for the Container App.')
-param dapr object = {}
-
-@description('Optional. Max inactive revisions a Container App can have.')
-param maxInactiveRevisions int = 0
-
-@description('Required. List of container definitions for the Container App.')
-param containers array
-
-@description('Optional. List of specialized containers that run before app containers.')
-param initContainersTemplate array = []
-
-@description('Optional. The secrets of the Container App.')
-@secure()
-param secrets object = {}
-
-@description('Optional. User friendly suffix that is appended to the revision name.')
-param revisionSuffix string = ''
-
-@description('Optional. List of volume definitions for the Container App.')
-param volumes array = []
-
-@description('Optional. Workload profile type to pin for container app execution.')
-param workloadProfileType string = ''
-
-var secretList = !empty(secrets) ? secrets.secureList : []
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- 'ContainerApp Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ad2dd5fb-cd4b-4fd4-a9b6-4fed3630980b')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource containerApp 'Microsoft.App/containerApps@2022-10-01' = {
- name: name
- tags: tags
- location: location
- identity: identity
- properties: {
- environmentId: environmentId
- configuration: {
- activeRevisionsMode: activeRevisionsMode
- dapr: !empty(dapr) ? dapr : null
- ingress: {
- allowInsecure: ingressAllowInsecure
- customDomains: !empty(customDomains) ? customDomains : null
- exposedPort: exposedPort
- external: ingressExternal
- ipSecurityRestrictions: !empty(ipSecurityRestrictions) ? ipSecurityRestrictions : null
- targetPort: ingressTargetPort
- traffic: [
- {
- label: trafficLabel
- latestRevision: trafficLatestRevision
- revisionName: trafficRevisionName
- weight: trafficWeight
- }
- ]
- transport: ingressTransport
- }
- maxInactiveRevisions: maxInactiveRevisions
- registries: !empty(registries) ? registries : null
- secrets: secretList
- }
- template: {
- containers: containers
- initContainers: !empty(initContainersTemplate) ? initContainersTemplate : null
- revisionSuffix: revisionSuffix
- scale: {
- maxReplicas: scaleMaxReplicas
- minReplicas: scaleMinReplicas
- rules: !empty(scaleRules) ? scaleRules : null
- }
- volumes: !empty(volumes) ? volumes : null
- }
- workloadProfileType: workloadProfileType
- }
-}
-
-resource containerApp_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: containerApp
-}
-
-resource containerApp_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(containerApp.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: containerApp
-}]
-
-@description('The resource ID of the Container App.')
-output resourceId string = containerApp.id
-
-@description('The name of the resource group the Container App was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Container App.')
-output name string = containerApp.name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(containerApp.identity, 'principalId') ? containerApp.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = containerApp.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/app/container-app/main.json b/modules/app/container-app/main.json
deleted file mode 100644
index 151294bb80..0000000000
--- a/modules/app/container-app/main.json
+++ /dev/null
@@ -1,510 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3664175856787955387"
- },
- "name": "Container Apps",
- "description": "This module deploys a Container App.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Container App."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "ingressExternal": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Bool indicating if app exposes an external http endpoint."
- }
- },
- "ingressTransport": {
- "type": "string",
- "defaultValue": "auto",
- "allowedValues": [
- "auto",
- "http",
- "http2",
- "tcp"
- ],
- "metadata": {
- "description": "Optional. Ingress transport protocol."
- }
- },
- "ingressAllowInsecure": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections."
- }
- },
- "ingressTargetPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. Target Port in containers for traffic from ingress."
- }
- },
- "scaleMaxReplicas": {
- "type": "int",
- "defaultValue": 1,
- "metadata": {
- "description": "Optional. Maximum number of container replicas. Defaults to 10 if not set."
- }
- },
- "scaleMinReplicas": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Minimum number of container replicas."
- }
- },
- "scaleRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Scaling rules."
- }
- },
- "activeRevisionsMode": {
- "type": "string",
- "defaultValue": "Single",
- "allowedValues": [
- "Multiple",
- "Single"
- ],
- "metadata": {
- "description": "Optional. ActiveRevisionsMode controls how active revisions are handled for the Container app."
- }
- },
- "environmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of environment."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "registries": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Collection of private container registry credentials for containers used by the Container app."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "customDomains": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Custom domain bindings for Container App hostnames."
- }
- },
- "exposedPort": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Exposed Port in containers for TCP traffic from ingress."
- }
- },
- "ipSecurityRestrictions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Rules to restrict incoming IP address."
- }
- },
- "trafficLabel": {
- "type": "string",
- "defaultValue": "label-1",
- "metadata": {
- "description": "Optional. Associates a traffic label with a revision. Label name should be consist of lower case alphanumeric characters or dashes."
- }
- },
- "trafficLatestRevision": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates that the traffic weight belongs to a latest stable revision."
- }
- },
- "trafficRevisionName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of a revision."
- }
- },
- "trafficWeight": {
- "type": "int",
- "defaultValue": 100,
- "metadata": {
- "description": "Optional. Traffic weight assigned to a revision."
- }
- },
- "dapr": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dapr configuration for the Container App."
- }
- },
- "maxInactiveRevisions": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Max inactive revisions a Container App can have."
- }
- },
- "containers": {
- "type": "array",
- "metadata": {
- "description": "Required. List of container definitions for the Container App."
- }
- },
- "initContainersTemplate": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of specialized containers that run before app containers."
- }
- },
- "secrets": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The secrets of the Container App."
- }
- },
- "revisionSuffix": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. User friendly suffix that is appended to the revision name."
- }
- },
- "volumes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of volume definitions for the Container App."
- }
- },
- "workloadProfileType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Workload profile type to pin for container app execution."
- }
- }
- },
- "variables": {
- "secretList": "[if(not(empty(parameters('secrets'))), parameters('secrets').secureList, createArray())]",
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "ContainerApp Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ad2dd5fb-cd4b-4fd4-a9b6-4fed3630980b')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "containerApp": {
- "type": "Microsoft.App/containerApps",
- "apiVersion": "2022-10-01",
- "name": "[parameters('name')]",
- "tags": "[parameters('tags')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "properties": {
- "environmentId": "[parameters('environmentId')]",
- "configuration": {
- "activeRevisionsMode": "[parameters('activeRevisionsMode')]",
- "dapr": "[if(not(empty(parameters('dapr'))), parameters('dapr'), null())]",
- "ingress": {
- "allowInsecure": "[parameters('ingressAllowInsecure')]",
- "customDomains": "[if(not(empty(parameters('customDomains'))), parameters('customDomains'), null())]",
- "exposedPort": "[parameters('exposedPort')]",
- "external": "[parameters('ingressExternal')]",
- "ipSecurityRestrictions": "[if(not(empty(parameters('ipSecurityRestrictions'))), parameters('ipSecurityRestrictions'), null())]",
- "targetPort": "[parameters('ingressTargetPort')]",
- "traffic": [
- {
- "label": "[parameters('trafficLabel')]",
- "latestRevision": "[parameters('trafficLatestRevision')]",
- "revisionName": "[parameters('trafficRevisionName')]",
- "weight": "[parameters('trafficWeight')]"
- }
- ],
- "transport": "[parameters('ingressTransport')]"
- },
- "maxInactiveRevisions": "[parameters('maxInactiveRevisions')]",
- "registries": "[if(not(empty(parameters('registries'))), parameters('registries'), null())]",
- "secrets": "[variables('secretList')]"
- },
- "template": {
- "containers": "[parameters('containers')]",
- "initContainers": "[if(not(empty(parameters('initContainersTemplate'))), parameters('initContainersTemplate'), null())]",
- "revisionSuffix": "[parameters('revisionSuffix')]",
- "scale": {
- "maxReplicas": "[parameters('scaleMaxReplicas')]",
- "minReplicas": "[parameters('scaleMinReplicas')]",
- "rules": "[if(not(empty(parameters('scaleRules'))), parameters('scaleRules'), null())]"
- },
- "volumes": "[if(not(empty(parameters('volumes'))), parameters('volumes'), null())]"
- },
- "workloadProfileType": "[parameters('workloadProfileType')]"
- }
- },
- "containerApp_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.App/containerApps/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "containerApp"
- ]
- },
- "containerApp_roleAssignments": {
- "copy": {
- "name": "containerApp_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.App/containerApps/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.App/containerApps', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "containerApp"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Container App."
- },
- "value": "[resourceId('Microsoft.App/containerApps', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Container App was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Container App."
- },
- "value": "[parameters('name')]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('containerApp', '2022-10-01', 'full').identity, 'principalId')), reference('containerApp', '2022-10-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('containerApp', '2022-10-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/app/container-app/tests/e2e/defaults/dependencies.bicep b/modules/app/container-app/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index edf4adee4b..0000000000
--- a/modules/app/container-app/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,17 +0,0 @@
-@description('Required. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Environment to create.')
-param managedEnvironmentName string
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-10-01' = {
- name: managedEnvironmentName
- location: location
- sku: {
- name: 'Consumption'
- }
- properties: {}
-}
-
-@description('The resource ID of the created Managed Environment.')
-output managedEnvironmentResourceId string = managedEnvironment.id
diff --git a/modules/app/container-app/tests/e2e/defaults/main.test.bicep b/modules/app/container-app/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index b00bf36743..0000000000
--- a/modules/app/container-app/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,75 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.containerApps-${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 = 'mcappmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- location: location
- managedEnvironmentName: 'dep-${namePrefix}-menv-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- environmentId: nestedDependencies.outputs.managedEnvironmentResourceId
- location: location
- containers: [
- {
- name: 'simple-hello-world-container'
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- resources: {
- // workaround as 'float' values are not supported in Bicep, yet the resource providers expects them. Related issue: https://github.com/Azure/bicep/issues/1386
- cpu: json('0.25')
- memory: '0.5Gi'
- }
- }
- ]
- }
-}]
diff --git a/modules/app/container-app/tests/e2e/max/dependencies.bicep b/modules/app/container-app/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a6700c9d60..0000000000
--- a/modules/app/container-app/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,28 +0,0 @@
-@description('Required. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Environment for Container Apps to create.')
-param managedEnvironmentName string
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-10-01' = {
- name: managedEnvironmentName
- location: location
- sku: {
- name: 'Consumption'
- }
- properties: {}
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Managed Environment.')
-output managedEnvironmentResourceId string = managedEnvironment.id
diff --git a/modules/app/container-app/tests/e2e/max/main.test.bicep b/modules/app/container-app/tests/e2e/max/main.test.bicep
deleted file mode 100644
index a9397c8777..0000000000
--- a/modules/app/container-app/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,110 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.containerApps-${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 = 'mcappmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- location: location
- managedEnvironmentName: 'dep-${namePrefix}-menv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- environmentId: nestedDependencies.outputs.managedEnvironmentResourceId
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- secrets: {
- secureList: [
- {
- name: 'customtest'
- value: guid(deployment().name)
- }
- ]
- }
- containers: [
- {
- name: 'simple-hello-world-container'
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- resources: {
- // workaround as 'float' values are not supported in Bicep, yet the resource providers expects them. Related issue: https://github.com/Azure/bicep/issues/1386
- cpu: json('0.25')
- memory: '0.5Gi'
- }
- probes: [
- {
- type: 'Liveness'
- httpGet: {
- path: '/health'
- port: 8080
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- }
- ]
- }
- ]
- }
-}]
diff --git a/modules/app/container-app/tests/e2e/waf-aligned/dependencies.bicep b/modules/app/container-app/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a6700c9d60..0000000000
--- a/modules/app/container-app/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,28 +0,0 @@
-@description('Required. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Environment for Container Apps to create.')
-param managedEnvironmentName string
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-10-01' = {
- name: managedEnvironmentName
- location: location
- sku: {
- name: 'Consumption'
- }
- properties: {}
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Managed Environment.')
-output managedEnvironmentResourceId string = managedEnvironment.id
diff --git a/modules/app/container-app/tests/e2e/waf-aligned/main.test.bicep b/modules/app/container-app/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index f7be7ad1bc..0000000000
--- a/modules/app/container-app/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,110 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.containerApps-${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 = 'mcappwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- location: location
- managedEnvironmentName: 'dep-${namePrefix}-menv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- environmentId: nestedDependencies.outputs.managedEnvironmentResourceId
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- secrets: {
- secureList: [
- {
- name: 'customtest'
- value: guid(deployment().name)
- }
- ]
- }
- containers: [
- {
- name: 'simple-hello-world-container'
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- resources: {
- // workaround as 'float' values are not supported in Bicep, yet the resource providers expects them. Related issue: https://github.com/Azure/bicep/issues/1386
- cpu: json('0.25')
- memory: '0.5Gi'
- }
- probes: [
- {
- type: 'Liveness'
- httpGet: {
- path: '/health'
- port: 8080
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- }
- ]
- }
- ]
- }
-}]
diff --git a/modules/app/container-app/version.json b/modules/app/container-app/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/app/container-app/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/app/job/README.md b/modules/app/job/README.md
index c041013706..d30892db91 100644
--- a/modules/app/job/README.md
+++ b/modules/app/job/README.md
@@ -1,854 +1,7 @@
-# Container App Jobs `[Microsoft.App/jobs]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`containers`](#parameter-containers) | array | List of container definitions for the Container App. |
-| [`environmentId`](#parameter-environmentid) | string | Resource ID of environment. |
-| [`name`](#parameter-name) | string | Name of the Container App. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventTriggerConfig`](#parameter-eventtriggerconfig) | object | Required if TriggerType is Event. Configuration of an event driven job. |
-| [`initContainersTemplate`](#parameter-initcontainerstemplate) | array | List of specialized containers that run before app containers. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`manualTriggerConfig`](#parameter-manualtriggerconfig) | object | Required if TriggerType is Manual. Configuration of a manual job. |
-| [`registries`](#parameter-registries) | array | Collection of private container registry credentials for containers used by the Container app. |
-| [`replicaRetryLimit`](#parameter-replicaretrylimit) | int | The maximum number of times a replica can be retried. |
-| [`replicaTimeout`](#parameter-replicatimeout) | int | Maximum number of seconds a replica is allowed to run. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute. |
-| [`scheduleTriggerConfig`](#parameter-scheduletriggerconfig) | object | Required if TriggerType is Schedule. Configuration of a schedule based job. |
-| [`secrets`](#parameter-secrets) | secureObject | The secrets of the Container App. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`triggerType`](#parameter-triggertype) | string | Trigger type of the job. |
-| [`volumes`](#parameter-volumes) | array | List of volume definitions for the Container App. |
-| [`workloadProfileName`](#parameter-workloadprofilename) | string | The name of the workload profile to use. |
-
-### Parameter: `containers`
-
-List of container definitions for the Container App.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `environmentId`
-
-Resource ID of environment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the Container App.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventTriggerConfig`
-
-Required if TriggerType is Event. Configuration of an event driven job.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `initContainersTemplate`
-
-List of specialized containers that run before app containers.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption.
-
-- Required: No
-- Type: array
-
-### Parameter: `manualTriggerConfig`
-
-Required if TriggerType is Manual. Configuration of a manual job.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `registries`
-
-Collection of private container registry credentials for containers used by the Container app.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `replicaRetryLimit`
-
-The maximum number of times a replica can be retried.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `replicaTimeout`
-
-Maximum number of seconds a replica is allowed to run.
-
-- Required: No
-- Type: int
-- Default: `1800`
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource ID of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource ID of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `scheduleTriggerConfig`
-
-Required if TriggerType is Schedule. Configuration of a schedule based job.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `secrets`
-
-The secrets of the Container App.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `triggerType`
-
-Trigger type of the job.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Event'
- 'Manual'
- 'Schedule'
- ]
- ```
-
-### Parameter: `volumes`
-
-List of volume definitions for the Container App.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `workloadProfileName`
-
-The name of the workload profile to use.
-
-- Required: No
-- Type: string
-- Default: `'Consumption'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Container App Job. |
-| `resourceGroupName` | string | The name of the resource group the Container App Job was deployed into. |
-| `resourceId` | string | The resource ID of the Container App Job. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/app/job/main.bicep b/modules/app/job/main.bicep
deleted file mode 100644
index 15d8106352..0000000000
--- a/modules/app/job/main.bicep
+++ /dev/null
@@ -1,205 +0,0 @@
-metadata name = 'Container App Jobs'
-metadata description = 'This module deploys a Container App Job.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Container App.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Required. Resource ID of environment.')
-param environmentId string
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags object = {}
-
-@description('Optional. Collection of private container registry credentials for containers used by the Container app.')
-param registries array = []
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@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.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. List of container definitions for the Container App.')
-param containers array
-
-@description('Optional. List of specialized containers that run before app containers.')
-param initContainersTemplate array = []
-
-@description('Optional. Required if TriggerType is Event. Configuration of an event driven job.')
-param eventTriggerConfig object = {}
-
-@description('Optional. Required if TriggerType is Schedule. Configuration of a schedule based job.')
-param scheduleTriggerConfig object = {}
-
-@description('Optional. Required if TriggerType is Manual. Configuration of a manual job.')
-param manualTriggerConfig object = {}
-
-@description('Optional. The maximum number of times a replica can be retried.')
-param replicaRetryLimit int = 0
-
-@description('Optional. The name of the workload profile to use.')
-param workloadProfileName string = 'Consumption'
-
-@description('Optional. The secrets of the Container App.')
-@secure()
-param secrets object = {}
-
-@description('Optional. List of volume definitions for the Container App.')
-param volumes array = []
-
-@description('Optional. Maximum number of seconds a replica is allowed to run.')
-param replicaTimeout int = 1800
-
-@allowed([
- 'Event'
- 'Manual'
- 'Schedule'
-])
-@description('Optional. Trigger type of the job.')
-param triggerType string
-
-var secretList = !empty(secrets) ? secrets.secureList : []
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- 'ContainerApp Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ad2dd5fb-cd4b-4fd4-a9b6-4fed3630980b')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource containerAppJob 'Microsoft.App/jobs@2023-05-01' = {
- name: name
- tags: tags
- location: location
- identity: identity
- properties: {
- environmentId: environmentId
- configuration: {
- eventTriggerConfig: triggerType == 'Event' ? eventTriggerConfig : null
- manualTriggerConfig: triggerType == 'Manual' ? manualTriggerConfig : null
- scheduleTriggerConfig: triggerType == 'Schedule' ? scheduleTriggerConfig : null
- replicaRetryLimit: replicaRetryLimit
- replicaTimeout: replicaTimeout
- registries: !empty(registries) ? registries : null
- secrets: secretList
- triggerType: triggerType
- }
- template: {
- containers: containers
- initContainers: !empty(initContainersTemplate) ? initContainersTemplate : null
- volumes: !empty(volumes) ? volumes : null
- }
- workloadProfileName: workloadProfileName
- }
-}
-
-resource containerAppJob_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: containerAppJob
-}
-
-resource containerAppJob_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(containerAppJob.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: containerAppJob
-}]
-
-@description('The resource ID of the Container App Job.')
-output resourceId string = containerAppJob.id
-
-@description('The name of the resource group the Container App Job was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Container App Job.')
-output name string = containerAppJob.name
-
-@description('The location the resource was deployed into.')
-output location string = containerAppJob.location
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(containerAppJob.identity, 'principalId') ? containerAppJob.identity.principalId : ''
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource ID of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption.')
- userAssignedResourceIds: string[]?
-}?
diff --git a/modules/app/job/main.json b/modules/app/job/main.json
deleted file mode 100644
index 2913e527df..0000000000
--- a/modules/app/job/main.json
+++ /dev/null
@@ -1,400 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5076851392653441401"
- },
- "name": "Container App Jobs",
- "description": "This module deploys a Container App Job.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource ID of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Container App."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "environmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of environment."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "registries": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Collection of private container registry credentials for containers used by the Container app."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "containers": {
- "type": "array",
- "metadata": {
- "description": "Required. List of container definitions for the Container App."
- }
- },
- "initContainersTemplate": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of specialized containers that run before app containers."
- }
- },
- "eventTriggerConfig": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Required if TriggerType is Event. Configuration of an event driven job."
- }
- },
- "scheduleTriggerConfig": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Required if TriggerType is Schedule. Configuration of a schedule based job."
- }
- },
- "manualTriggerConfig": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Required if TriggerType is Manual. Configuration of a manual job."
- }
- },
- "replicaRetryLimit": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. The maximum number of times a replica can be retried."
- }
- },
- "workloadProfileName": {
- "type": "string",
- "defaultValue": "Consumption",
- "metadata": {
- "description": "Optional. The name of the workload profile to use."
- }
- },
- "secrets": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The secrets of the Container App."
- }
- },
- "volumes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of volume definitions for the Container App."
- }
- },
- "replicaTimeout": {
- "type": "int",
- "defaultValue": 1800,
- "metadata": {
- "description": "Optional. Maximum number of seconds a replica is allowed to run."
- }
- },
- "triggerType": {
- "type": "string",
- "allowedValues": [
- "Event",
- "Manual",
- "Schedule"
- ],
- "metadata": {
- "description": "Optional. Trigger type of the job."
- }
- }
- },
- "variables": {
- "secretList": "[if(not(empty(parameters('secrets'))), parameters('secrets').secureList, createArray())]",
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "ContainerApp Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ad2dd5fb-cd4b-4fd4-a9b6-4fed3630980b')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "containerAppJob": {
- "type": "Microsoft.App/jobs",
- "apiVersion": "2023-05-01",
- "name": "[parameters('name')]",
- "tags": "[parameters('tags')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "properties": {
- "environmentId": "[parameters('environmentId')]",
- "configuration": {
- "eventTriggerConfig": "[if(equals(parameters('triggerType'), 'Event'), parameters('eventTriggerConfig'), null())]",
- "manualTriggerConfig": "[if(equals(parameters('triggerType'), 'Manual'), parameters('manualTriggerConfig'), null())]",
- "scheduleTriggerConfig": "[if(equals(parameters('triggerType'), 'Schedule'), parameters('scheduleTriggerConfig'), null())]",
- "replicaRetryLimit": "[parameters('replicaRetryLimit')]",
- "replicaTimeout": "[parameters('replicaTimeout')]",
- "registries": "[if(not(empty(parameters('registries'))), parameters('registries'), null())]",
- "secrets": "[variables('secretList')]",
- "triggerType": "[parameters('triggerType')]"
- },
- "template": {
- "containers": "[parameters('containers')]",
- "initContainers": "[if(not(empty(parameters('initContainersTemplate'))), parameters('initContainersTemplate'), null())]",
- "volumes": "[if(not(empty(parameters('volumes'))), parameters('volumes'), null())]"
- },
- "workloadProfileName": "[parameters('workloadProfileName')]"
- }
- },
- "containerAppJob_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.App/jobs/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "containerAppJob"
- ]
- },
- "containerAppJob_roleAssignments": {
- "copy": {
- "name": "containerAppJob_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.App/jobs/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.App/jobs', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "containerAppJob"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Container App Job."
- },
- "value": "[resourceId('Microsoft.App/jobs', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Container App Job was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Container App Job."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('containerAppJob', '2023-05-01', 'full').location]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('containerAppJob', '2023-05-01', 'full').identity, 'principalId')), reference('containerAppJob', '2023-05-01', 'full').identity.principalId, '')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/app/job/tests/e2e/defaults/dependencies.bicep b/modules/app/job/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index bb2af3d0f8..0000000000
--- a/modules/app/job/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,21 +0,0 @@
-@description('Required. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Environment to create.')
-param managedEnvironmentName string
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2023-05-01' = {
- name: managedEnvironmentName
- location: location
- properties: {
- workloadProfiles: [
- {
- workloadProfileType: 'Consumption'
- name: 'Consumption'
- }
- ]
- }
-}
-
-@description('The resource ID of the created Managed Environment.')
-output managedEnvironmentResourceId string = managedEnvironment.id
diff --git a/modules/app/job/tests/e2e/defaults/main.test.bicep b/modules/app/job/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index d09eaa87c6..0000000000
--- a/modules/app/job/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,79 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.job-${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 = 'ajmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- location: location
- managedEnvironmentName: 'dep-${namePrefix}-menv-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- environmentId: nestedDependencies.outputs.managedEnvironmentResourceId
- location: location
- triggerType: 'Manual'
- manualTriggerConfig: {
- replicaCompletionCount: 1
- parallelism: 1
- }
- containers: [
- {
- name: 'simple-hello-world-container'
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- resources: {
- // workaround as 'float' values are not supported in Bicep, yet the resource providers expects them. Related issue: https://github.com/Azure/bicep/issues/1386
- cpu: json('0.25')
- memory: '0.5Gi'
- }
- }
- ]
- }
-}
diff --git a/modules/app/job/tests/e2e/max/dependencies.bicep b/modules/app/job/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index b03d4aca93..0000000000
--- a/modules/app/job/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,40 +0,0 @@
-@description('Required. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Environment for Container Apps to create.')
-param managedEnvironmentName string
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the workload profile to create.')
-param workloadProfileName string
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2023-05-01' = {
- name: managedEnvironmentName
- location: location
- properties: {
- workloadProfiles: [
- {
- name: workloadProfileName
- workloadProfileType: 'D4'
- maximumCount: 1
- minimumCount: 1
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Managed Environment.')
-output managedEnvironmentResourceId string = managedEnvironment.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/app/job/tests/e2e/max/main.test.bicep b/modules/app/job/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 10751e7801..0000000000
--- a/modules/app/job/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,124 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.job-${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 = 'ajmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- location: location
- managedEnvironmentName: 'dep-${namePrefix}-menv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- workloadProfileName: serviceShort
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- environmentId: nestedDependencies.outputs.managedEnvironmentResourceId
- workloadProfileName: serviceShort
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- secrets: {
- secureList: [
- {
- name: 'customtest'
- value: guid(deployment().name)
- }
- ]
- }
- triggerType: 'Manual'
- manualTriggerConfig: {
- replicaCompletionCount: 1
- parallelism: 1
- }
- containers: [
- {
- name: 'simple-hello-world-container'
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- resources: {
- // workaround as 'float' values are not supported in Bicep, yet the resource providers expects them. Related issue: https://github.com/Azure/bicep/issues/1386
- cpu: json('0.25')
- memory: '0.5Gi'
- }
- probes: [
- {
- type: 'Liveness'
- httpGet: {
- path: '/health'
- port: 8080
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- }
- ]
- }
- ]
- roleAssignments: [
- {
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'ContainerApp Reader'
- principalType: 'ServicePrincipal'
- }
- ]
- }
-}
diff --git a/modules/app/job/tests/e2e/waf-aligned/dependencies.bicep b/modules/app/job/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index b03d4aca93..0000000000
--- a/modules/app/job/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,40 +0,0 @@
-@description('Required. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Environment for Container Apps to create.')
-param managedEnvironmentName string
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the workload profile to create.')
-param workloadProfileName string
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2023-05-01' = {
- name: managedEnvironmentName
- location: location
- properties: {
- workloadProfiles: [
- {
- name: workloadProfileName
- workloadProfileType: 'D4'
- maximumCount: 1
- minimumCount: 1
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Managed Environment.')
-output managedEnvironmentResourceId string = managedEnvironment.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/app/job/tests/e2e/waf-aligned/main.test.bicep b/modules/app/job/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 5de0b2f354..0000000000
--- a/modules/app/job/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,117 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.job-${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 = 'ajwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- location: location
- managedEnvironmentName: 'dep-${namePrefix}-menv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- workloadProfileName: serviceShort
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- environmentId: nestedDependencies.outputs.managedEnvironmentResourceId
- workloadProfileName: serviceShort
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- secrets: {
- secureList: [
- {
- name: 'customtest'
- value: guid(deployment().name)
- }
- ]
- }
- triggerType: 'Manual'
- manualTriggerConfig: {
- replicaCompletionCount: 1
- parallelism: 1
- }
- containers: [
- {
- name: 'simple-hello-world-container'
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- resources: {
- // workaround as 'float' values are not supported in Bicep, yet the resource providers expects them. Related issue: https://github.com/Azure/bicep/issues/1386
- cpu: json('0.25')
- memory: '0.5Gi'
- }
- probes: [
- {
- type: 'Liveness'
- httpGet: {
- path: '/health'
- port: 8080
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- }
- ]
- }
- ]
- }
-}
diff --git a/modules/app/job/version.json b/modules/app/job/version.json
deleted file mode 100644
index 7fa401bdf7..0000000000
--- a/modules/app/job/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.1",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/app/managed-environment/README.md b/modules/app/managed-environment/README.md
index d044d9f6fa..6b61c5513c 100644
--- a/modules/app/managed-environment/README.md
+++ b/modules/app/managed-environment/README.md
@@ -1,614 +1,7 @@
-# App ManagedEnvironments `[Microsoft.App/managedEnvironments]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`logAnalyticsWorkspaceResourceId`](#parameter-loganalyticsworkspaceresourceid) | string | Existing Log Analytics Workspace resource ID. Note: This value is not required as per the resource type. However, not providing it currently causes an issue that is tracked [here](https://github.com/Azure/bicep/issues/9990). |
-| [`name`](#parameter-name) | string | Name of the Container Apps Managed Environment. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`infrastructureSubnetId`](#parameter-infrastructuresubnetid) | string | Resource ID of a subnet for infrastructure components. This is used to deploy the environment into a virtual network. Must not overlap with any other provided IP ranges. Required if "internal" is set to true. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`certificatePassword`](#parameter-certificatepassword) | securestring | Password of the certificate used by the custom domain. |
-| [`certificateValue`](#parameter-certificatevalue) | securestring | Certificate to use for the custom domain. PFX or PEM. |
-| [`daprAIConnectionString`](#parameter-dapraiconnectionstring) | securestring | Application Insights connection string used by Dapr to export Service to Service communication telemetry. |
-| [`daprAIInstrumentationKey`](#parameter-dapraiinstrumentationkey) | securestring | Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. |
-| [`dnsSuffix`](#parameter-dnssuffix) | string | DNS suffix for the environment domain. |
-| [`dockerBridgeCidr`](#parameter-dockerbridgecidr) | string | CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`internal`](#parameter-internal) | bool | Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`logsDestination`](#parameter-logsdestination) | string | Logs destination. |
-| [`platformReservedCidr`](#parameter-platformreservedcidr) | string | IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. |
-| [`platformReservedDnsIP`](#parameter-platformreserveddnsip) | string | An IP address from the IP range defined by "platformReservedCidr" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`skuName`](#parameter-skuname) | string | Managed environment SKU. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`workloadProfiles`](#parameter-workloadprofiles) | array | Workload profiles configured for the Managed Environment. |
-| [`zoneRedundant`](#parameter-zoneredundant) | bool | Whether or not this Managed Environment is zone-redundant. |
-
-### Parameter: `logAnalyticsWorkspaceResourceId`
-
-Existing Log Analytics Workspace resource ID. Note: This value is not required as per the resource type. However, not providing it currently causes an issue that is tracked [here](https://github.com/Azure/bicep/issues/9990).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the Container Apps Managed Environment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `infrastructureSubnetId`
-
-Resource ID of a subnet for infrastructure components. This is used to deploy the environment into a virtual network. Must not overlap with any other provided IP ranges. Required if "internal" is set to true.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `certificatePassword`
-
-Password of the certificate used by the custom domain.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `certificateValue`
-
-Certificate to use for the custom domain. PFX or PEM.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `daprAIConnectionString`
-
-Application Insights connection string used by Dapr to export Service to Service communication telemetry.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `daprAIInstrumentationKey`
-
-Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `dnsSuffix`
-
-DNS suffix for the environment domain.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `dockerBridgeCidr`
-
-CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: Yes
-- Type: bool
-
-### Parameter: `internal`
-
-Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `logsDestination`
-
-Logs destination.
-
-- Required: No
-- Type: string
-- Default: `'log-analytics'`
-
-### Parameter: `platformReservedCidr`
-
-IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `platformReservedDnsIP`
-
-An IP address from the IP range defined by "platformReservedCidr" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `skuName`
-
-Managed environment SKU.
-
-- Required: No
-- Type: string
-- Default: `'Consumption'`
-- Allowed:
- ```Bicep
- [
- 'Consumption'
- 'Premium'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `workloadProfiles`
-
-Workload profiles configured for the Managed Environment.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `zoneRedundant`
-
-Whether or not this Managed Environment is zone-redundant.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Managed Environment. |
-| `resourceGroupName` | string | The name of the resource group the Managed Environment was deployed into. |
-| `resourceId` | string | The resource ID of the Managed Environment. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/app/managed-environment/main.bicep b/modules/app/managed-environment/main.bicep
deleted file mode 100644
index f3905ce986..0000000000
--- a/modules/app/managed-environment/main.bicep
+++ /dev/null
@@ -1,203 +0,0 @@
-metadata name = 'App ManagedEnvironments'
-metadata description = 'This module deploys an App Managed Environment (also known as a Container App Environment).'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Container Apps Managed Environment.')
-param name string
-
-@description('Required. Existing Log Analytics Workspace resource ID. Note: This value is not required as per the resource type. However, not providing it currently causes an issue that is tracked [here](https://github.com/Azure/bicep/issues/9990).')
-param logAnalyticsWorkspaceResourceId string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@allowed([
- 'Consumption'
- 'Premium'
-])
-@description('Optional. Managed environment SKU.')
-param skuName string = 'Consumption'
-
-@description('Optional. Logs destination.')
-param logsDestination string = 'log-analytics'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool
-
-@description('Optional. Application Insights connection string used by Dapr to export Service to Service communication telemetry.')
-@secure()
-param daprAIConnectionString string = ''
-
-@description('Optional. Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry.')
-@secure()
-param daprAIInstrumentationKey string = ''
-
-@description('Optional. CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform.')
-param dockerBridgeCidr string = ''
-
-@description('Conditional. Resource ID of a subnet for infrastructure components. This is used to deploy the environment into a virtual network. Must not overlap with any other provided IP ranges. Required if "internal" is set to true.')
-param infrastructureSubnetId string = ''
-
-@description('Optional. Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided.')
-param internal bool = false
-
-@description('Optional. IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform.')
-param platformReservedCidr string = ''
-
-@description('Optional. An IP address from the IP range defined by "platformReservedCidr" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform.')
-param platformReservedDnsIP string = ''
-
-@description('Optional. Whether or not this Managed Environment is zone-redundant.')
-param zoneRedundant bool = false
-
-@description('Optional. Password of the certificate used by the custom domain.')
-@secure()
-param certificatePassword string = ''
-
-@description('Optional. Certificate to use for the custom domain. PFX or PEM.')
-@secure()
-param certificateValue string = ''
-
-@description('Optional. DNS suffix for the environment domain.')
-param dnsSuffix string = ''
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Workload profiles configured for the Managed Environment.')
-param workloadProfiles array = []
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = if (!empty(logAnalyticsWorkspaceResourceId)) {
- name: last(split(logAnalyticsWorkspaceResourceId, '/'))!
- scope: resourceGroup(split(logAnalyticsWorkspaceResourceId, '/')[2], split(logAnalyticsWorkspaceResourceId, '/')[4])
-}
-
-resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-10-01' = {
- name: name
- location: location
- tags: tags
- sku: {
- name: skuName
- }
- properties: {
- appLogsConfiguration: {
- destination: logsDestination
- logAnalyticsConfiguration: {
- customerId: logAnalyticsWorkspace.properties.customerId
- sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
- }
- }
- daprAIConnectionString: daprAIConnectionString
- daprAIInstrumentationKey: daprAIInstrumentationKey
- customDomainConfiguration: {
- certificatePassword: certificatePassword
- certificateValue: !empty(certificateValue) ? certificateValue : null
- dnsSuffix: dnsSuffix
- }
- vnetConfiguration: {
- internal: internal
- infrastructureSubnetId: !empty(infrastructureSubnetId) && internal == true ? infrastructureSubnetId : null
- dockerBridgeCidr: !empty(infrastructureSubnetId) && internal == true ? dockerBridgeCidr : null
- platformReservedCidr: !empty(infrastructureSubnetId) && internal == true ? platformReservedCidr : null
- platformReservedDnsIP: !empty(infrastructureSubnetId) && internal == true ? platformReservedDnsIP : null
- }
- workloadProfiles: !empty(workloadProfiles) ? workloadProfiles : null
- zoneRedundant: zoneRedundant
- }
-}
-
-resource managedEnvironment_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(managedEnvironment.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: managedEnvironment
-}]
-
-resource managedEnvironment_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: managedEnvironment
-}
-
-@description('The name of the resource group the Managed Environment was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = managedEnvironment.location
-
-@description('The name of the Managed Environment.')
-output name string = managedEnvironment.name
-
-@description('The resource ID of the Managed Environment.')
-output resourceId string = managedEnvironment.id
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/app/managed-environment/main.json b/modules/app/managed-environment/main.json
deleted file mode 100644
index ba37943c32..0000000000
--- a/modules/app/managed-environment/main.json
+++ /dev/null
@@ -1,394 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15830956831455159038"
- },
- "name": "App ManagedEnvironments",
- "description": "This module deploys an App Managed Environment (also known as a Container App Environment).",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Container Apps Managed Environment."
- }
- },
- "logAnalyticsWorkspaceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Existing Log Analytics Workspace resource ID. Note: This value is not required as per the resource type. However, not providing it currently causes an issue that is tracked [here](https://github.com/Azure/bicep/issues/9990)."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "Consumption",
- "allowedValues": [
- "Consumption",
- "Premium"
- ],
- "metadata": {
- "description": "Optional. Managed environment SKU."
- }
- },
- "logsDestination": {
- "type": "string",
- "defaultValue": "log-analytics",
- "metadata": {
- "description": "Optional. Logs destination."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "daprAIConnectionString": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Application Insights connection string used by Dapr to export Service to Service communication telemetry."
- }
- },
- "daprAIInstrumentationKey": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry."
- }
- },
- "dockerBridgeCidr": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform."
- }
- },
- "infrastructureSubnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Resource ID of a subnet for infrastructure components. This is used to deploy the environment into a virtual network. Must not overlap with any other provided IP ranges. Required if \"internal\" is set to true."
- }
- },
- "internal": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then \"infrastructureSubnetId\" must be provided."
- }
- },
- "platformReservedCidr": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform."
- }
- },
- "platformReservedDnsIP": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. An IP address from the IP range defined by \"platformReservedCidr\" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform."
- }
- },
- "zoneRedundant": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether or not this Managed Environment is zone-redundant."
- }
- },
- "certificatePassword": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Password of the certificate used by the custom domain."
- }
- },
- "certificateValue": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Certificate to use for the custom domain. PFX or PEM."
- }
- },
- "dnsSuffix": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. DNS suffix for the environment domain."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "workloadProfiles": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Workload profiles configured for the Managed Environment."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "logAnalyticsWorkspace": {
- "condition": "[not(empty(parameters('logAnalyticsWorkspaceResourceId')))]",
- "existing": true,
- "type": "Microsoft.OperationalInsights/workspaces",
- "apiVersion": "2021-06-01",
- "subscriptionId": "[split(parameters('logAnalyticsWorkspaceResourceId'), '/')[2]]",
- "resourceGroup": "[split(parameters('logAnalyticsWorkspaceResourceId'), '/')[4]]",
- "name": "[last(split(parameters('logAnalyticsWorkspaceResourceId'), '/'))]"
- },
- "managedEnvironment": {
- "type": "Microsoft.App/managedEnvironments",
- "apiVersion": "2022-10-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('skuName')]"
- },
- "properties": {
- "appLogsConfiguration": {
- "destination": "[parameters('logsDestination')]",
- "logAnalyticsConfiguration": {
- "customerId": "[reference('logAnalyticsWorkspace').customerId]",
- "sharedKey": "[listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('logAnalyticsWorkspaceResourceId'), '/')[2], split(parameters('logAnalyticsWorkspaceResourceId'), '/')[4]), 'Microsoft.OperationalInsights/workspaces', last(split(parameters('logAnalyticsWorkspaceResourceId'), '/'))), '2021-06-01').primarySharedKey]"
- }
- },
- "daprAIConnectionString": "[parameters('daprAIConnectionString')]",
- "daprAIInstrumentationKey": "[parameters('daprAIInstrumentationKey')]",
- "customDomainConfiguration": {
- "certificatePassword": "[parameters('certificatePassword')]",
- "certificateValue": "[if(not(empty(parameters('certificateValue'))), parameters('certificateValue'), null())]",
- "dnsSuffix": "[parameters('dnsSuffix')]"
- },
- "vnetConfiguration": {
- "internal": "[parameters('internal')]",
- "infrastructureSubnetId": "[if(and(not(empty(parameters('infrastructureSubnetId'))), equals(parameters('internal'), true())), parameters('infrastructureSubnetId'), null())]",
- "dockerBridgeCidr": "[if(and(not(empty(parameters('infrastructureSubnetId'))), equals(parameters('internal'), true())), parameters('dockerBridgeCidr'), null())]",
- "platformReservedCidr": "[if(and(not(empty(parameters('infrastructureSubnetId'))), equals(parameters('internal'), true())), parameters('platformReservedCidr'), null())]",
- "platformReservedDnsIP": "[if(and(not(empty(parameters('infrastructureSubnetId'))), equals(parameters('internal'), true())), parameters('platformReservedDnsIP'), null())]"
- },
- "workloadProfiles": "[if(not(empty(parameters('workloadProfiles'))), parameters('workloadProfiles'), null())]",
- "zoneRedundant": "[parameters('zoneRedundant')]"
- },
- "dependsOn": [
- "logAnalyticsWorkspace"
- ]
- },
- "managedEnvironment_roleAssignments": {
- "copy": {
- "name": "managedEnvironment_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.App/managedEnvironments/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.App/managedEnvironments', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "managedEnvironment"
- ]
- },
- "managedEnvironment_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.App/managedEnvironments/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "managedEnvironment"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Managed Environment was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('managedEnvironment', '2022-10-01', 'full').location]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Managed Environment."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Managed Environment."
- },
- "value": "[resourceId('Microsoft.App/managedEnvironments', parameters('name'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/app/managed-environment/tests/e2e/defaults/dependencies.bicep b/modules/app/managed-environment/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index 737827c1fd..0000000000
--- a/modules/app/managed-environment/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,22 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
- name: logAnalyticsWorkspaceName
- location: location
- properties: any({
- retentionInDays: 30
- features: {
- searchVersion: 1
- }
- sku: {
- name: 'PerGB2018'
- }
- })
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
diff --git a/modules/app/managed-environment/tests/e2e/defaults/main.test.bicep b/modules/app/managed-environment/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 40a1ae5178..0000000000
--- a/modules/app/managed-environment/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,57 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.managedenvironments-${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 = 'amemin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
-}]
diff --git a/modules/app/managed-environment/tests/e2e/max/dependencies.bicep b/modules/app/managed-environment/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index f61380acc4..0000000000
--- a/modules/app/managed-environment/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,51 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
- name: logAnalyticsWorkspaceName
- location: location
- properties: any({
- retentionInDays: 30
- features: {
- searchVersion: 1
- }
- sku: {
- name: 'PerGB2018'
- }
- })
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
diff --git a/modules/app/managed-environment/tests/e2e/max/main.test.bicep b/modules/app/managed-environment/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 7eecb1c599..0000000000
--- a/modules/app/managed-environment/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.managedenvironments-${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 = 'amemax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- location: location
- skuName: 'Consumption'
- internal: true
- dockerBridgeCidr: '172.16.0.1/28'
- platformReservedCidr: '172.17.17.0/24'
- platformReservedDnsIP: '172.17.17.17'
- infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- }
-}]
diff --git a/modules/app/managed-environment/tests/e2e/waf-aligned/dependencies.bicep b/modules/app/managed-environment/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index f61380acc4..0000000000
--- a/modules/app/managed-environment/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,51 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
- name: logAnalyticsWorkspaceName
- location: location
- properties: any({
- retentionInDays: 30
- features: {
- searchVersion: 1
- }
- sku: {
- name: 'PerGB2018'
- }
- })
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
diff --git a/modules/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep b/modules/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index f7416ce8ed..0000000000
--- a/modules/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-app.managedenvironments-${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 = 'amewaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- location: location
- skuName: 'Consumption'
- internal: true
- dockerBridgeCidr: '172.16.0.1/28'
- platformReservedCidr: '172.17.17.0/24'
- platformReservedDnsIP: '172.17.17.17'
- infrastructureSubnetId: nestedDependencies.outputs.subnetResourceId
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Env: 'test'
- }
- }
-}]
diff --git a/modules/app/managed-environment/version.json b/modules/app/managed-environment/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/app/managed-environment/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/lock/README.md b/modules/authorization/lock/README.md
index 20a037b24f..d35fa91a1a 100644
--- a/modules/authorization/lock/README.md
+++ b/modules/authorization/lock/README.md
@@ -1,226 +1,7 @@
-# Authorization Locks (All scopes) `[Microsoft.Authorization/locks]`
+
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`level`](#parameter-level) | string | Set lock level. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`notes`](#parameter-notes) | string | The decription attached to the lock. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | Name of the Resource Group to assign the lock to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided lock to the resource group. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | Subscription ID of the subscription to assign the lock to. If not provided, will use the current scope for deployment. If no resource group name is provided, the module deploys at subscription level, therefore assigns the provided locks to the subscription. |
-
-### Parameter: `level`
-
-Set lock level.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `notes`
-
-The decription attached to the lock.
-
-- Required: No
-- Type: string
-- Default: `[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]`
-
-### Parameter: `resourceGroupName`
-
-Name of the Resource Group to assign the lock to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided lock to the resource group.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subscriptionId`
-
-Subscription ID of the subscription to assign the lock to. If not provided, will use the current scope for deployment. If no resource group name is provided, the module deploys at subscription level, therefore assigns the provided locks to the subscription.
-
-- Required: No
-- Type: string
-- Default: `[subscription().id]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the lock. |
-| `resourceId` | string | The resource ID of the lock. |
-| `scope` | string | The scope this lock applies to. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/lock/main.bicep b/modules/authorization/lock/main.bicep
deleted file mode 100644
index 47261c8205..0000000000
--- a/modules/authorization/lock/main.bicep
+++ /dev/null
@@ -1,75 +0,0 @@
-metadata name = 'Authorization Locks (All scopes)'
-metadata description = 'This module deploys an Authorization Lock at a Subscription or Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@allowed([
- 'CanNotDelete'
- 'ReadOnly'
-])
-@description('Required. Set lock level.')
-param level string
-
-@description('Optional. The decription attached to the lock.')
-param notes string = level == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot modify the resource or child resources.'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Name of the Resource Group to assign the lock to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided lock to the resource group.')
-param resourceGroupName string = ''
-
-@description('Optional. Subscription ID of the subscription to assign the lock to. If not provided, will use the current scope for deployment. If no resource group name is provided, the module deploys at subscription level, therefore assigns the provided locks to the subscription.')
-param subscriptionId string = subscription().id
-
-@description('Optional. Location for all resources.')
-param location string = deployment().location
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module lock_sub 'subscription/main.bicep' = if (!empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-Lock-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- name: '${subscription().displayName}-${level}-lock'
- level: level
- notes: notes
- // owners: owners // Not intended to be applied by users (ref https://github.com/Azure/azure-cli/issues/22528)
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module lock_rg 'resource-group/main.bicep' = if (!empty(subscriptionId) && !empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-Lock-RG-Module'
- scope: resourceGroup(subscriptionId, resourceGroupName)
- params: {
- name: '${resourceGroupName}-${level}-lock'
- level: level
- notes: notes
- // owners: owners // Not intended to be applied by users (ref https://github.com/Azure/azure-cli/issues/22528)
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@description('The name of the lock.')
-output name string = empty(resourceGroupName) ? lock_sub.outputs.name : lock_rg.outputs.name
-
-@description('The resource ID of the lock.')
-output resourceId string = empty(resourceGroupName) ? lock_sub.outputs.resourceId : lock_rg.outputs.resourceId
-
-@sys.description('The scope this lock applies to.')
-output scope string = empty(resourceGroupName) ? lock_sub.outputs.scope : lock_rg.outputs.scope
diff --git a/modules/authorization/lock/main.json b/modules/authorization/lock/main.json
deleted file mode 100644
index 927dc1ae2c..0000000000
--- a/modules/authorization/lock/main.json
+++ /dev/null
@@ -1,364 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15385346851879884120"
- },
- "name": "Authorization Locks (All scopes)",
- "description": "This module deploys an Authorization Lock at a Subscription or Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "level": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "ReadOnly"
- ],
- "metadata": {
- "description": "Required. Set lock level."
- }
- },
- "notes": {
- "type": "string",
- "defaultValue": "[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]",
- "metadata": {
- "description": "Optional. The decription attached to the lock."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of the Resource Group to assign the lock to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided lock to the resource group."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().id]",
- "metadata": {
- "description": "Optional. Subscription ID of the subscription to assign the lock to. If not provided, will use the current scope for deployment. If no resource group name is provided, the module deploys at subscription level, therefore assigns the provided locks to the subscription."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lock-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[format('{0}-{1}-lock', subscription().displayName, parameters('level'))]"
- },
- "level": {
- "value": "[parameters('level')]"
- },
- "notes": {
- "value": "[parameters('notes')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "876321567657394219"
- },
- "name": "Authorization Locks (Subscription scope)",
- "description": "This module deploys an Authorization Lock at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}-lock', parameters('level'))]",
- "metadata": {
- "description": "Optional. The name of the lock."
- }
- },
- "level": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "ReadOnly"
- ],
- "metadata": {
- "description": "Required. Set lock level."
- }
- },
- "notes": {
- "type": "string",
- "defaultValue": "[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]",
- "metadata": {
- "description": "Optional. The decription attached to the lock."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "name": "[parameters('name')]",
- "properties": {
- "level": "[parameters('level')]",
- "notes": "[parameters('notes')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lock."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lock."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/locks', parameters('name'))]"
- },
- "subscriptionName": {
- "type": "string",
- "metadata": {
- "description": "The subscription name the lock was deployed into."
- },
- "value": "[subscription().displayName]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this lock applies to."
- },
- "value": "[subscription().id]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('subscriptionId'))), not(empty(parameters('resourceGroupName'))))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lock-RG-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "resourceGroup": "[parameters('resourceGroupName')]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[format('{0}-{1}-lock', parameters('resourceGroupName'), parameters('level'))]"
- },
- "level": {
- "value": "[parameters('level')]"
- },
- "notes": {
- "value": "[parameters('notes')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "8961143332409950444"
- },
- "name": "Authorization Locks (Resource Group scope)",
- "description": "This module deploys an Authorization Lock at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}-lock', parameters('level'))]",
- "metadata": {
- "description": "Optional. The name of the lock."
- }
- },
- "level": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "ReadOnly"
- ],
- "metadata": {
- "description": "Required. Set lock level."
- }
- },
- "notes": {
- "type": "string",
- "defaultValue": "[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]",
- "metadata": {
- "description": "Optional. The decription attached to the lock."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "name": "[parameters('name')]",
- "properties": {
- "level": "[parameters('level')]",
- "notes": "[parameters('notes')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lock."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lock."
- },
- "value": "[resourceId('Microsoft.Authorization/locks', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group name the lock was applied to."
- },
- "value": "[resourceGroup().name]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this lock applies to."
- },
- "value": "[resourceGroup().id]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lock."
- },
- "value": "[if(empty(parameters('resourceGroupName')), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-Lock-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-Lock-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value)]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lock."
- },
- "value": "[if(empty(parameters('resourceGroupName')), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-Lock-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-Lock-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value)]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this lock applies to."
- },
- "value": "[if(empty(parameters('resourceGroupName')), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-Lock-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-Lock-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value)]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/lock/resource-group/README.md b/modules/authorization/lock/resource-group/README.md
deleted file mode 100644
index a74295ef1a..0000000000
--- a/modules/authorization/lock/resource-group/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Authorization Locks (Resource Group scope) `[Microsoft.Authorization/locks]`
-
-This module deploys an Authorization Lock at a Resource Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`level`](#parameter-level) | string | Set lock level. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`name`](#parameter-name) | string | The name of the lock. |
-| [`notes`](#parameter-notes) | string | The decription attached to the lock. |
-
-### Parameter: `level`
-
-Set lock level.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `name`
-
-The name of the lock.
-
-- Required: No
-- Type: string
-- Default: `[format('{0}-lock', parameters('level'))]`
-
-### Parameter: `notes`
-
-The decription attached to the lock.
-
-- Required: No
-- Type: string
-- Default: `[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the lock. |
-| `resourceGroupName` | string | The name of the resource group name the lock was applied to. |
-| `resourceId` | string | The resource ID of the lock. |
-| `scope` | string | The scope this lock applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/lock/resource-group/main.bicep b/modules/authorization/lock/resource-group/main.bicep
deleted file mode 100644
index 72013c33e2..0000000000
--- a/modules/authorization/lock/resource-group/main.bicep
+++ /dev/null
@@ -1,54 +0,0 @@
-metadata name = 'Authorization Locks (Resource Group scope)'
-metadata description = 'This module deploys an Authorization Lock at a Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'resourceGroup'
-
-@description('Optional. The name of the lock.')
-param name string = '${level}-lock'
-
-@allowed([
- 'CanNotDelete'
- 'ReadOnly'
-])
-@description('Required. Set lock level.')
-param level string
-
-@description('Optional. The decription attached to the lock.')
-param notes string = level == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot modify the resource or child resources.'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lock 'Microsoft.Authorization/locks@2020-05-01' = {
- name: name
- properties: {
- level: level
- notes: notes
- // owners: owners // Not intended to be applied by users (ref https://github.com/Azure/azure-cli/issues/22528)
- }
-}
-
-@description('The name of the lock.')
-output name string = lock.name
-
-@description('The resource ID of the lock.')
-output resourceId string = lock.id
-
-@description('The name of the resource group name the lock was applied to.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The scope this lock applies to.')
-output scope string = resourceGroup().id
diff --git a/modules/authorization/lock/resource-group/main.json b/modules/authorization/lock/resource-group/main.json
deleted file mode 100644
index 903530da93..0000000000
--- a/modules/authorization/lock/resource-group/main.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "8961143332409950444"
- },
- "name": "Authorization Locks (Resource Group scope)",
- "description": "This module deploys an Authorization Lock at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}-lock', parameters('level'))]",
- "metadata": {
- "description": "Optional. The name of the lock."
- }
- },
- "level": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "ReadOnly"
- ],
- "metadata": {
- "description": "Required. Set lock level."
- }
- },
- "notes": {
- "type": "string",
- "defaultValue": "[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]",
- "metadata": {
- "description": "Optional. The decription attached to the lock."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "name": "[parameters('name')]",
- "properties": {
- "level": "[parameters('level')]",
- "notes": "[parameters('notes')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lock."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lock."
- },
- "value": "[resourceId('Microsoft.Authorization/locks', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group name the lock was applied to."
- },
- "value": "[resourceGroup().name]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this lock applies to."
- },
- "value": "[resourceGroup().id]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/lock/resource-group/version.json b/modules/authorization/lock/resource-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/lock/resource-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/lock/subscription/README.md b/modules/authorization/lock/subscription/README.md
deleted file mode 100644
index 2458071e3c..0000000000
--- a/modules/authorization/lock/subscription/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Authorization Locks (Subscription scope) `[Microsoft.Authorization/locks]`
-
-This module deploys an Authorization Lock at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`level`](#parameter-level) | string | Set lock level. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`name`](#parameter-name) | string | The name of the lock. |
-| [`notes`](#parameter-notes) | string | The decription attached to the lock. |
-
-### Parameter: `level`
-
-Set lock level.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `name`
-
-The name of the lock.
-
-- Required: No
-- Type: string
-- Default: `[format('{0}-lock', parameters('level'))]`
-
-### Parameter: `notes`
-
-The decription attached to the lock.
-
-- Required: No
-- Type: string
-- Default: `[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the lock. |
-| `resourceId` | string | The resource ID of the lock. |
-| `scope` | string | The scope this lock applies to. |
-| `subscriptionName` | string | The subscription name the lock was deployed into. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/lock/subscription/main.bicep b/modules/authorization/lock/subscription/main.bicep
deleted file mode 100644
index 8736ff5997..0000000000
--- a/modules/authorization/lock/subscription/main.bicep
+++ /dev/null
@@ -1,54 +0,0 @@
-metadata name = 'Authorization Locks (Subscription scope)'
-metadata description = 'This module deploys an Authorization Lock at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@description('Optional. The name of the lock.')
-param name string = '${level}-lock'
-
-@allowed([
- 'CanNotDelete'
- 'ReadOnly'
-])
-@description('Required. Set lock level.')
-param level string
-
-@description('Optional. The decription attached to the lock.')
-param notes string = level == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot modify the resource or child resources.'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lock 'Microsoft.Authorization/locks@2020-05-01' = {
- name: name
- properties: {
- level: level
- notes: notes
- // owners: owners // Not intended to be applied by users (ref https://github.com/Azure/azure-cli/issues/22528)
- }
-}
-
-@description('The name of the lock.')
-output name string = lock.name
-
-@description('The resource ID of the lock.')
-output resourceId string = lock.id
-
-@description('The subscription name the lock was deployed into.')
-output subscriptionName string = subscription().displayName
-
-@sys.description('The scope this lock applies to.')
-output scope string = subscription().id
diff --git a/modules/authorization/lock/subscription/main.json b/modules/authorization/lock/subscription/main.json
deleted file mode 100644
index 19ec31903c..0000000000
--- a/modules/authorization/lock/subscription/main.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "876321567657394219"
- },
- "name": "Authorization Locks (Subscription scope)",
- "description": "This module deploys an Authorization Lock at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}-lock', parameters('level'))]",
- "metadata": {
- "description": "Optional. The name of the lock."
- }
- },
- "level": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "ReadOnly"
- ],
- "metadata": {
- "description": "Required. Set lock level."
- }
- },
- "notes": {
- "type": "string",
- "defaultValue": "[if(equals(parameters('level'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot modify the resource or child resources.')]",
- "metadata": {
- "description": "Optional. The decription attached to the lock."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "name": "[parameters('name')]",
- "properties": {
- "level": "[parameters('level')]",
- "notes": "[parameters('notes')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lock."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lock."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/locks', parameters('name'))]"
- },
- "subscriptionName": {
- "type": "string",
- "metadata": {
- "description": "The subscription name the lock was deployed into."
- },
- "value": "[subscription().displayName]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this lock applies to."
- },
- "value": "[subscription().id]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/lock/subscription/version.json b/modules/authorization/lock/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/lock/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/lock/tests/e2e/max/main.test.bicep b/modules/authorization/lock/tests/e2e/max/main.test.bicep
deleted file mode 100644
index b0a46425c0..0000000000
--- a/modules/authorization/lock/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.locks-${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 = 'almax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- level: 'CanNotDelete'
- resourceGroupName: resourceGroup.name
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/lock/tests/e2e/waf-aligned/main.test.bicep b/modules/authorization/lock/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 0ed75a7621..0000000000
--- a/modules/authorization/lock/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.locks-${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 = 'alwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- level: 'CanNotDelete'
- resourceGroupName: resourceGroup.name
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/lock/version.json b/modules/authorization/lock/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/lock/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-assignment/README.md b/modules/authorization/policy-assignment/README.md
index fcbd860880..276421f4fe 100644
--- a/modules/authorization/policy-assignment/README.md
+++ b/modules/authorization/policy-assignment/README.md
@@ -1,1163 +1,7 @@
-# Policy Assignments (All scopes) `[Microsoft.Authorization/policyAssignments]`
+
-
-
-
-### Example 2: _Mg.Min_
-
-
-
-
-
-### Example 3: _Rg.Common_
-
-
-
-
-
-### Example 4: _Rg.Min_
-
-
-
-
-
-### Example 5: _Sub.Common_
-
-
-
-
-
-### Example 6: _Sub.Min_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope, 64 characters for subscription and resource group scopes. |
-| [`policyDefinitionId`](#parameter-policydefinitionid) | string | Specifies the ID of the policy definition or policy set definition being assigned. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | This message will be part of response in case of policy violation. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy assignment. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enforcementMode`](#parameter-enforcementmode) | string | The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce. |
-| [`identity`](#parameter-identity) | string | The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment. |
-| [`metadata`](#parameter-metadata) | object | The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`nonComplianceMessages`](#parameter-noncompliancemessages) | array | The messages that describe why a resource is non-compliant with the policy. |
-| [`notScopes`](#parameter-notscopes) | array | The policy excluded scopes. |
-| [`overrides`](#parameter-overrides) | array | The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition. |
-| [`parameters`](#parameter-parameters) | object | Parameters for the policy assignment if needed. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | The Target Scope for the Policy. The name of the resource group for the policy assignment. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location. |
-| [`roleDefinitionIds`](#parameter-roledefinitionids) | array | The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. |
-| [`userAssignedIdentityId`](#parameter-userassignedidentityid) | string | The Resource ID for the user assigned identity to assign to the policy assignment. |
-
-### Parameter: `name`
-
-Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope, 64 characters for subscription and resource group scopes.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitionId`
-
-Specifies the ID of the policy definition or policy set definition being assigned.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-This message will be part of response in case of policy violation.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy assignment. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enforcementMode`
-
-The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'DoNotEnforce'
- ]
- ```
-
-### Parameter: `identity`
-
-The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions.
-
-- Required: No
-- Type: string
-- Default: `'SystemAssigned'`
-- Allowed:
- ```Bicep
- [
- 'None'
- 'SystemAssigned'
- 'UserAssigned'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `metadata`
-
-The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `nonComplianceMessages`
-
-The messages that describe why a resource is non-compliant with the policy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notScopes`
-
-The policy excluded scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `overrides`
-
-The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `parameters`
-
-Parameters for the policy assignment if needed.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `resourceGroupName`
-
-The Target Scope for the Policy. The name of the resource group for the policy assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleDefinitionIds`
-
-The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `subscriptionId`
-
-The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `userAssignedIdentityId`
-
-The Resource ID for the user assigned identity to assign to the policy assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | Policy Assignment Name. |
-| `principalId` | string | Policy Assignment principal ID. |
-| `resourceId` | string | Policy Assignment resource ID. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Module Usage Guidance
-
-In general, most of the resources under the `Microsoft.Authorization` namespace allows deploying resources at multiple scopes (management groups, subscriptions, resource groups). The `main.bicep` root module is simply an orchestrator module that targets sub-modules for different scopes as seen in the parameter usage section. All sub-modules for this namespace have folders that represent the target scope. For example, if the orchestrator module in the [root](main.bicep) needs to target 'subscription' level scopes. It will look at the relative path ['/subscription/main.bicep'](./subscription/main.bicep) and use this sub-module for the actual deployment, while still passing the same parameters from the root module.
-
-The above method is useful when you want to use a single point to interact with the module but rely on parameter combinations to achieve the target scope. But what if you want to incorporate this module in other modules with lower scopes? This would force you to deploy the module in scope `managementGroup` regardless and further require you to provide its ID with it. If you do not set the scope to management group, this would be the error that you can expect to face:
-
-```bicep
-Error BCP134: Scope "subscription" is not valid for this module. Permitted scopes: "managementGroup"
-```
-
-The solution is to have the option of directly targeting the sub-module that achieves the required scope. For example, if you have your own Bicep file wanting to create resources at the subscription level, and also use some of the modules from the `Microsoft.Authorization` namespace, then you can directly use the sub-module ['/subscription/main.bicep'](./subscription/main.bicep) as a path within your repository, or reference that same published module from the bicep registry. CARML also published the sub-modules so you would be able to reference it like the following:
-
-**Bicep Registry Reference**
-```bicep
-module policyassignment 'br:bicepregistry.azurecr.io/bicep/modules/authorization.policy-assignment.subscription:version' = {}
-```
-**Local Path Reference**
-```bicep
-module policyassignment 'yourpath/module/authorization/policy-assignment/subscription/main.bicep' = {}
-```
-
-### Parameter Usage: `managementGroupId`
-
-To deploy resource to a Management Group, provide the `managementGroupId` as an input parameter to the module.
-
-
-
-> `managementGroupId` is an optional parameter. If not provided, the deployment will use the management group defined in the current deployment scope (i.e. `managementGroup().name`).
-
-### Parameter Usage: `subscriptionId`
-
-To deploy resource to an Azure Subscription, provide the `subscriptionId` as an input parameter to the module. **Example**:
-
-
-
-### Parameter Usage: `resourceGroupName`
-
-To deploy resource to a Resource Group, provide the `subscriptionId` and `resourceGroupName` as an input parameter to the module. **Example**:
-
-
-
-> The `subscriptionId` is used to enable deployment to a Resource Group Scope, allowing the use of the `resourceGroup()` function from a Management Group Scope. [Additional Details](https://github.com/Azure/bicep/pull/1420).
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/policy-assignment/main.bicep b/modules/authorization/policy-assignment/main.bicep
deleted file mode 100644
index f937dcdbc8..0000000000
--- a/modules/authorization/policy-assignment/main.bicep
+++ /dev/null
@@ -1,171 +0,0 @@
-metadata name = 'Policy Assignments (All scopes)'
-metadata description = 'This module deploys a Policy Assignment at a Management Group, Subscription or Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope, 64 characters for subscription and resource group scopes.')
-param name string
-
-@sys.description('Optional. This message will be part of response in case of policy violation.')
-param description string = ''
-
-@sys.description('Optional. The display name of the policy assignment. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Required. Specifies the ID of the policy definition or policy set definition being assigned.')
-param policyDefinitionId string
-
-@sys.description('Optional. Parameters for the policy assignment if needed.')
-param parameters object = {}
-
-@sys.description('Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning \'Modify\' policy definitions.')
-@allowed([
- 'SystemAssigned'
- 'UserAssigned'
- 'None'
-])
-param identity string = 'SystemAssigned'
-
-@sys.description('Optional. The Resource ID for the user assigned identity to assign to the policy assignment.')
-param userAssignedIdentityId string = ''
-
-@sys.description('Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.')
-param roleDefinitionIds array = []
-
-@sys.description('Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The messages that describe why a resource is non-compliant with the policy.')
-param nonComplianceMessages array = []
-
-@sys.description('Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.')
-@allowed([
- 'Default'
- 'DoNotEnforce'
-])
-param enforcementMode string = 'Default'
-
-@sys.description('Optional. The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment.')
-param subscriptionId string = ''
-
-@sys.description('Optional. The Target Scope for the Policy. The name of the resource group for the policy assignment.')
-param resourceGroupName string = ''
-
-@sys.description('Optional. The policy excluded scopes.')
-param notScopes array = []
-
-@sys.description('Optional. Location for all resources.')
-param location string = deployment().location
-
-@sys.description('Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.')
-param overrides array = []
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.')
-param resourceSelectors array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module policyAssignment_mg 'management-group/main.bicep' = if (empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-PolicyAssignment-MG-Module'
- scope: managementGroup(managementGroupId)
- params: {
- name: name
- policyDefinitionId: policyDefinitionId
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- parameters: !empty(parameters) ? parameters : {}
- identity: identity
- userAssignedIdentityId: userAssignedIdentityId
- roleDefinitionIds: !empty(roleDefinitionIds) ? roleDefinitionIds : []
- metadata: !empty(metadata) ? metadata : {}
- nonComplianceMessages: !empty(nonComplianceMessages) ? nonComplianceMessages : []
- enforcementMode: enforcementMode
- notScopes: !empty(notScopes) ? notScopes : []
- managementGroupId: managementGroupId
- location: location
- overrides: !empty(overrides) ? overrides : []
- resourceSelectors: !empty(resourceSelectors) ? resourceSelectors : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module policyAssignment_sub 'subscription/main.bicep' = if (!empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-PolicyAssignment-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- name: name
- policyDefinitionId: policyDefinitionId
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- parameters: !empty(parameters) ? parameters : {}
- identity: identity
- userAssignedIdentityId: userAssignedIdentityId
- roleDefinitionIds: !empty(roleDefinitionIds) ? roleDefinitionIds : []
- metadata: !empty(metadata) ? metadata : {}
- nonComplianceMessages: !empty(nonComplianceMessages) ? nonComplianceMessages : []
- enforcementMode: enforcementMode
- notScopes: !empty(notScopes) ? notScopes : []
- subscriptionId: subscriptionId
- location: location
- overrides: !empty(overrides) ? overrides : []
- resourceSelectors: !empty(resourceSelectors) ? resourceSelectors : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module policyAssignment_rg 'resource-group/main.bicep' = if (!empty(resourceGroupName) && !empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-PolicyAssignment-RG-Module'
- scope: resourceGroup(subscriptionId, resourceGroupName)
- params: {
- name: name
- policyDefinitionId: policyDefinitionId
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- parameters: !empty(parameters) ? parameters : {}
- identity: identity
- userAssignedIdentityId: userAssignedIdentityId
- roleDefinitionIds: !empty(roleDefinitionIds) ? roleDefinitionIds : []
- metadata: !empty(metadata) ? metadata : {}
- nonComplianceMessages: !empty(nonComplianceMessages) ? nonComplianceMessages : []
- enforcementMode: enforcementMode
- notScopes: !empty(notScopes) ? notScopes : []
- subscriptionId: subscriptionId
- location: location
- overrides: !empty(overrides) ? overrides : []
- resourceSelectors: !empty(resourceSelectors) ? resourceSelectors : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@sys.description('Policy Assignment Name.')
-output name string = empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_mg.outputs.name : (!empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_sub.outputs.name : policyAssignment_rg.outputs.name)
-
-@sys.description('Policy Assignment principal ID.')
-output principalId string = empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_mg.outputs.principalId : (!empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_sub.outputs.principalId : policyAssignment_rg.outputs.principalId)
-
-@sys.description('Policy Assignment resource ID.')
-output resourceId string = empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_mg.outputs.resourceId : (!empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_sub.outputs.resourceId : policyAssignment_rg.outputs.resourceId)
-
-@sys.description('The location the resource was deployed into.')
-output location string = empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_mg.outputs.location : (!empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_sub.outputs.location : policyAssignment_rg.outputs.location)
diff --git a/modules/authorization/policy-assignment/main.json b/modules/authorization/policy-assignment/main.json
deleted file mode 100644
index 4b15a7c3ee..0000000000
--- a/modules/authorization/policy-assignment/main.json
+++ /dev/null
@@ -1,1060 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10579624444479342334"
- },
- "name": "Policy Assignments (All scopes)",
- "description": "This module deploys a Policy Assignment at a Management Group, Subscription or Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope, 64 characters for subscription and resource group scopes."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The name of the resource group for the policy assignment."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))]",
- "scope": "[format('Microsoft.Management/managementGroups/{0}', parameters('managementGroupId'))]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "policyDefinitionId": {
- "value": "[parameters('policyDefinitionId')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "identity": {
- "value": "[parameters('identity')]"
- },
- "userAssignedIdentityId": {
- "value": "[parameters('userAssignedIdentityId')]"
- },
- "roleDefinitionIds": "[if(not(empty(parameters('roleDefinitionIds'))), createObject('value', parameters('roleDefinitionIds')), createObject('value', createArray()))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), createObject('value', parameters('nonComplianceMessages')), createObject('value', createArray()))]",
- "enforcementMode": {
- "value": "[parameters('enforcementMode')]"
- },
- "notScopes": "[if(not(empty(parameters('notScopes'))), createObject('value', parameters('notScopes')), createObject('value', createArray()))]",
- "managementGroupId": {
- "value": "[parameters('managementGroupId')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "overrides": "[if(not(empty(parameters('overrides'))), createObject('value', parameters('overrides')), createObject('value', createArray()))]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), createObject('value', parameters('resourceSelectors')), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14811948404877688716"
- },
- "name": "Policy Assignments (Management Group scope)",
- "description": "This module deploys a Policy Assignment at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 24,
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "identityVar": "[if(equals(parameters('identity'), 'SystemAssigned'), createObject('type', parameters('identity')), if(equals(parameters('identity'), 'UserAssigned'), createObject('type', parameters('identity'), 'userAssignedIdentities', createObject(format('{0}', parameters('userAssignedIdentityId')), createObject())), null()))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyAssignments",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "policyDefinitionId": "[parameters('policyDefinitionId')]",
- "parameters": "[parameters('parameters')]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), parameters('nonComplianceMessages'), createArray())]",
- "enforcementMode": "[parameters('enforcementMode')]",
- "notScopes": "[if(not(empty(parameters('notScopes'))), parameters('notScopes'), createArray())]",
- "overrides": "[if(not(empty(parameters('overrides'))), parameters('overrides'), createArray())]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), parameters('resourceSelectors'), createArray())]"
- },
- "identity": "[variables('identityVar')]"
- },
- {
- "copy": {
- "name": "roleAssignment",
- "count": "[length(parameters('roleDefinitionIds'))]"
- },
- "condition": "[and(not(empty(parameters('roleDefinitionIds'))), equals(parameters('identity'), 'SystemAssigned'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('managementGroupId'), parameters('roleDefinitionIds')[copyIndex()], parameters('location'), parameters('name'))]",
- "properties": {
- "roleDefinitionId": "[parameters('roleDefinitionIds')[copyIndex()]]",
- "principalId": "[reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[parameters('name')]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(equals(parameters('identity'), 'SystemAssigned'), reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId, '')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').location]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "policyDefinitionId": {
- "value": "[parameters('policyDefinitionId')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "identity": {
- "value": "[parameters('identity')]"
- },
- "userAssignedIdentityId": {
- "value": "[parameters('userAssignedIdentityId')]"
- },
- "roleDefinitionIds": "[if(not(empty(parameters('roleDefinitionIds'))), createObject('value', parameters('roleDefinitionIds')), createObject('value', createArray()))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), createObject('value', parameters('nonComplianceMessages')), createObject('value', createArray()))]",
- "enforcementMode": {
- "value": "[parameters('enforcementMode')]"
- },
- "notScopes": "[if(not(empty(parameters('notScopes'))), createObject('value', parameters('notScopes')), createObject('value', createArray()))]",
- "subscriptionId": {
- "value": "[parameters('subscriptionId')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "overrides": "[if(not(empty(parameters('overrides'))), createObject('value', parameters('overrides')), createObject('value', createArray()))]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), createObject('value', parameters('resourceSelectors')), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1296030047986147440"
- },
- "name": "Policy Assignments (Subscription scope)",
- "description": "This module deploys a Policy Assignment at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 64 characters for subscription scope."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "identityVar": "[if(equals(parameters('identity'), 'SystemAssigned'), createObject('type', parameters('identity')), if(equals(parameters('identity'), 'UserAssigned'), createObject('type', parameters('identity'), 'userAssignedIdentities', createObject(format('{0}', parameters('userAssignedIdentityId')), createObject())), null()))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyAssignments",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "policyDefinitionId": "[parameters('policyDefinitionId')]",
- "parameters": "[parameters('parameters')]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), parameters('nonComplianceMessages'), createArray())]",
- "enforcementMode": "[parameters('enforcementMode')]",
- "notScopes": "[if(not(empty(parameters('notScopes'))), parameters('notScopes'), createArray())]",
- "overrides": "[if(not(empty(parameters('overrides'))), parameters('overrides'), createArray())]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), parameters('resourceSelectors'), createArray())]"
- },
- "identity": "[variables('identityVar')]"
- },
- {
- "copy": {
- "name": "roleAssignment",
- "count": "[length(parameters('roleDefinitionIds'))]"
- },
- "condition": "[and(not(empty(parameters('roleDefinitionIds'))), equals(parameters('identity'), 'SystemAssigned'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), parameters('roleDefinitionIds')[copyIndex()], parameters('location'), parameters('name'))]",
- "properties": {
- "roleDefinitionId": "[parameters('roleDefinitionIds')[copyIndex()]]",
- "principalId": "[reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "[subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[parameters('name')]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(equals(parameters('identity'), 'SystemAssigned'), reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId, '')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').location]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId'))))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "resourceGroup": "[parameters('resourceGroupName')]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "policyDefinitionId": {
- "value": "[parameters('policyDefinitionId')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "identity": {
- "value": "[parameters('identity')]"
- },
- "userAssignedIdentityId": {
- "value": "[parameters('userAssignedIdentityId')]"
- },
- "roleDefinitionIds": "[if(not(empty(parameters('roleDefinitionIds'))), createObject('value', parameters('roleDefinitionIds')), createObject('value', createArray()))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), createObject('value', parameters('nonComplianceMessages')), createObject('value', createArray()))]",
- "enforcementMode": {
- "value": "[parameters('enforcementMode')]"
- },
- "notScopes": "[if(not(empty(parameters('notScopes'))), createObject('value', parameters('notScopes')), createObject('value', createArray()))]",
- "subscriptionId": {
- "value": "[parameters('subscriptionId')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "overrides": "[if(not(empty(parameters('overrides'))), createObject('value', parameters('overrides')), createObject('value', createArray()))]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), createObject('value', parameters('resourceSelectors')), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15032410491892224041"
- },
- "name": "Policy Assignments (Resource Group scope)",
- "description": "This module deploys a Policy Assignment at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 64 characters for resource group scope."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The name of the resource group for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "identityVar": "[if(equals(parameters('identity'), 'SystemAssigned'), createObject('type', parameters('identity')), if(equals(parameters('identity'), 'UserAssigned'), createObject('type', parameters('identity'), 'userAssignedIdentities', createObject(format('{0}', parameters('userAssignedIdentityId')), createObject())), null()))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyAssignments",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "policyDefinitionId": "[parameters('policyDefinitionId')]",
- "parameters": "[parameters('parameters')]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), parameters('nonComplianceMessages'), createArray())]",
- "enforcementMode": "[parameters('enforcementMode')]",
- "notScopes": "[if(not(empty(parameters('notScopes'))), parameters('notScopes'), createArray())]",
- "overrides": "[if(not(empty(parameters('overrides'))), parameters('overrides'), createArray())]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), parameters('resourceSelectors'), createArray())]"
- },
- "identity": "[variables('identityVar')]"
- },
- {
- "copy": {
- "name": "roleAssignment",
- "count": "[length(parameters('roleDefinitionIds'))]"
- },
- "condition": "[and(not(empty(parameters('roleDefinitionIds'))), equals(parameters('identity'), 'SystemAssigned'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), parameters('resourceGroupName'), parameters('roleDefinitionIds')[copyIndex()], parameters('location'), parameters('name'))]",
- "properties": {
- "roleDefinitionId": "[parameters('roleDefinitionIds')[copyIndex()]]",
- "principalId": "[reference(resourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "[resourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[parameters('name')]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(equals(parameters('identity'), 'SystemAssigned'), reference(resourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId, '')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[resourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the policy was assigned to."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').location]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value))]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.principalId.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.principalId.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.principalId.value))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.location.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.location.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.location.value))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-assignment/management-group/README.md b/modules/authorization/policy-assignment/management-group/README.md
deleted file mode 100644
index c49026c652..0000000000
--- a/modules/authorization/policy-assignment/management-group/README.md
+++ /dev/null
@@ -1,209 +0,0 @@
-# Policy Assignments (Management Group scope) `[Microsoft.Authorization/policyAssignments]`
-
-This module deploys a Policy Assignment at a Management Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyAssignments` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-06-01/policyAssignments) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope. |
-| [`policyDefinitionId`](#parameter-policydefinitionid) | string | Specifies the ID of the policy definition or policy set definition being assigned. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | This message will be part of response in case of policy violation. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy assignment. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enforcementMode`](#parameter-enforcementmode) | string | The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce. |
-| [`identity`](#parameter-identity) | string | The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment. |
-| [`metadata`](#parameter-metadata) | object | The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`nonComplianceMessages`](#parameter-noncompliancemessages) | array | The messages that describe why a resource is non-compliant with the policy. |
-| [`notScopes`](#parameter-notscopes) | array | The policy excluded scopes. |
-| [`overrides`](#parameter-overrides) | array | The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition. |
-| [`parameters`](#parameter-parameters) | object | Parameters for the policy assignment if needed. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location. |
-| [`roleDefinitionIds`](#parameter-roledefinitionids) | array | The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition. |
-| [`userAssignedIdentityId`](#parameter-userassignedidentityid) | string | The Resource ID for the user assigned identity to assign to the policy assignment. |
-
-### Parameter: `name`
-
-Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitionId`
-
-Specifies the ID of the policy definition or policy set definition being assigned.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-This message will be part of response in case of policy violation.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy assignment. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enforcementMode`
-
-The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'DoNotEnforce'
- ]
- ```
-
-### Parameter: `identity`
-
-The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions.
-
-- Required: No
-- Type: string
-- Default: `'SystemAssigned'`
-- Allowed:
- ```Bicep
- [
- 'None'
- 'SystemAssigned'
- 'UserAssigned'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `metadata`
-
-The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `nonComplianceMessages`
-
-The messages that describe why a resource is non-compliant with the policy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notScopes`
-
-The policy excluded scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `overrides`
-
-The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `parameters`
-
-Parameters for the policy assignment if needed.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleDefinitionIds`
-
-The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `userAssignedIdentityId`
-
-The Resource ID for the user assigned identity to assign to the policy assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | Policy Assignment Name. |
-| `principalId` | string | Policy Assignment principal ID. |
-| `resourceId` | string | Policy Assignment resource ID. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-assignment/management-group/main.bicep b/modules/authorization/policy-assignment/management-group/main.bicep
deleted file mode 100644
index 7a7e8005f3..0000000000
--- a/modules/authorization/policy-assignment/management-group/main.bicep
+++ /dev/null
@@ -1,128 +0,0 @@
-metadata name = 'Policy Assignments (Management Group scope)'
-metadata description = 'This module deploys a Policy Assignment at a Management Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope.')
-@maxLength(24)
-param name string
-
-@sys.description('Optional. This message will be part of response in case of policy violation.')
-param description string = ''
-
-@sys.description('Optional. The display name of the policy assignment. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Required. Specifies the ID of the policy definition or policy set definition being assigned.')
-param policyDefinitionId string
-
-@sys.description('Optional. Parameters for the policy assignment if needed.')
-param parameters object = {}
-
-@sys.description('Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning \'Modify\' policy definitions.')
-@allowed([
- 'SystemAssigned'
- 'UserAssigned'
- 'None'
-])
-param identity string = 'SystemAssigned'
-
-@sys.description('Optional. The Resource ID for the user assigned identity to assign to the policy assignment.')
-param userAssignedIdentityId string = ''
-
-@sys.description('Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.')
-param roleDefinitionIds array = []
-
-@sys.description('Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The messages that describe why a resource is non-compliant with the policy.')
-param nonComplianceMessages array = []
-
-@sys.description('Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.')
-@allowed([
- 'Default'
- 'DoNotEnforce'
-])
-param enforcementMode string = 'Default'
-
-@sys.description('Optional. The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The policy excluded scopes.')
-param notScopes array = []
-
-@sys.description('Optional. Location for all resources.')
-param location string = deployment().location
-
-@sys.description('Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.')
-param overrides array = []
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.')
-param resourceSelectors array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var identityVar = identity == 'SystemAssigned' ? {
- type: identity
-} : identity == 'UserAssigned' ? {
- type: identity
- userAssignedIdentities: {
- '${userAssignedIdentityId}': {}
- }
-} : null
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
- name: name
- location: location
- properties: {
- displayName: !empty(displayName) ? displayName : null
- metadata: !empty(metadata) ? metadata : null
- description: !empty(description) ? description : null
- policyDefinitionId: policyDefinitionId
- parameters: parameters
- nonComplianceMessages: !empty(nonComplianceMessages) ? nonComplianceMessages : []
- enforcementMode: enforcementMode
- notScopes: !empty(notScopes) ? notScopes : []
- overrides: !empty(overrides) ? overrides : []
- resourceSelectors: !empty(resourceSelectors) ? resourceSelectors : []
- }
- identity: identityVar
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for roleDefinitionId in roleDefinitionIds: if (!empty(roleDefinitionIds) && identity == 'SystemAssigned') {
- name: guid(managementGroupId, roleDefinitionId, location, name)
- properties: {
- roleDefinitionId: roleDefinitionId
- principalId: policyAssignment.identity.principalId
- principalType: 'ServicePrincipal'
- }
-}]
-
-@sys.description('Policy Assignment Name.')
-output name string = policyAssignment.name
-
-@sys.description('Policy Assignment principal ID.')
-output principalId string = identity == 'SystemAssigned' ? policyAssignment.identity.principalId : ''
-
-@sys.description('Policy Assignment resource ID.')
-output resourceId string = policyAssignment.id
-
-@sys.description('The location the resource was deployed into.')
-output location string = policyAssignment.location
diff --git a/modules/authorization/policy-assignment/management-group/main.json b/modules/authorization/policy-assignment/management-group/main.json
deleted file mode 100644
index 5041a99c35..0000000000
--- a/modules/authorization/policy-assignment/management-group/main.json
+++ /dev/null
@@ -1,231 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14811948404877688716"
- },
- "name": "Policy Assignments (Management Group scope)",
- "description": "This module deploys a Policy Assignment at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 24,
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 24 characters for management group scope."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The name of the management group for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "identityVar": "[if(equals(parameters('identity'), 'SystemAssigned'), createObject('type', parameters('identity')), if(equals(parameters('identity'), 'UserAssigned'), createObject('type', parameters('identity'), 'userAssignedIdentities', createObject(format('{0}', parameters('userAssignedIdentityId')), createObject())), null()))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyAssignments",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "policyDefinitionId": "[parameters('policyDefinitionId')]",
- "parameters": "[parameters('parameters')]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), parameters('nonComplianceMessages'), createArray())]",
- "enforcementMode": "[parameters('enforcementMode')]",
- "notScopes": "[if(not(empty(parameters('notScopes'))), parameters('notScopes'), createArray())]",
- "overrides": "[if(not(empty(parameters('overrides'))), parameters('overrides'), createArray())]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), parameters('resourceSelectors'), createArray())]"
- },
- "identity": "[variables('identityVar')]"
- },
- {
- "copy": {
- "name": "roleAssignment",
- "count": "[length(parameters('roleDefinitionIds'))]"
- },
- "condition": "[and(not(empty(parameters('roleDefinitionIds'))), equals(parameters('identity'), 'SystemAssigned'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('managementGroupId'), parameters('roleDefinitionIds')[copyIndex()], parameters('location'), parameters('name'))]",
- "properties": {
- "roleDefinitionId": "[parameters('roleDefinitionIds')[copyIndex()]]",
- "principalId": "[reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[parameters('name')]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(equals(parameters('identity'), 'SystemAssigned'), reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId, '')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-assignment/management-group/version.json b/modules/authorization/policy-assignment/management-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-assignment/management-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-assignment/resource-group/README.md b/modules/authorization/policy-assignment/resource-group/README.md
deleted file mode 100644
index da543f77c1..0000000000
--- a/modules/authorization/policy-assignment/resource-group/README.md
+++ /dev/null
@@ -1,219 +0,0 @@
-# Policy Assignments (Resource Group scope) `[Microsoft.Authorization/policyAssignments]`
-
-This module deploys a Policy Assignment at a Resource Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyAssignments` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-06-01/policyAssignments) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy assignment. Maximum length is 64 characters for resource group scope. |
-| [`policyDefinitionId`](#parameter-policydefinitionid) | string | Specifies the ID of the policy definition or policy set definition being assigned. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | This message will be part of response in case of policy violation. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy assignment. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enforcementMode`](#parameter-enforcementmode) | string | The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce. |
-| [`identity`](#parameter-identity) | string | The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`metadata`](#parameter-metadata) | object | The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`nonComplianceMessages`](#parameter-noncompliancemessages) | array | The messages that describe why a resource is non-compliant with the policy. |
-| [`notScopes`](#parameter-notscopes) | array | The policy excluded scopes. |
-| [`overrides`](#parameter-overrides) | array | The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition. |
-| [`parameters`](#parameter-parameters) | object | Parameters for the policy assignment if needed. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | The Target Scope for the Policy. The name of the resource group for the policy assignment. If not provided, will use the current scope for deployment. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location. |
-| [`roleDefinitionIds`](#parameter-roledefinitionids) | array | The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment. |
-| [`userAssignedIdentityId`](#parameter-userassignedidentityid) | string | The Resource ID for the user assigned identity to assign to the policy assignment. |
-
-### Parameter: `name`
-
-Specifies the name of the policy assignment. Maximum length is 64 characters for resource group scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitionId`
-
-Specifies the ID of the policy definition or policy set definition being assigned.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-This message will be part of response in case of policy violation.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy assignment. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enforcementMode`
-
-The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'DoNotEnforce'
- ]
- ```
-
-### Parameter: `identity`
-
-The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions.
-
-- Required: No
-- Type: string
-- Default: `'SystemAssigned'`
-- Allowed:
- ```Bicep
- [
- 'None'
- 'SystemAssigned'
- 'UserAssigned'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `metadata`
-
-The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `nonComplianceMessages`
-
-The messages that describe why a resource is non-compliant with the policy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notScopes`
-
-The policy excluded scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `overrides`
-
-The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `parameters`
-
-Parameters for the policy assignment if needed.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `resourceGroupName`
-
-The Target Scope for the Policy. The name of the resource group for the policy assignment. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().name]`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleDefinitionIds`
-
-The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `subscriptionId`
-
-The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[subscription().subscriptionId]`
-
-### Parameter: `userAssignedIdentityId`
-
-The Resource ID for the user assigned identity to assign to the policy assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | Policy Assignment Name. |
-| `principalId` | string | Policy Assignment principal ID. |
-| `resourceGroupName` | string | The name of the resource group the policy was assigned to. |
-| `resourceId` | string | Policy Assignment resource ID. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-assignment/resource-group/main.bicep b/modules/authorization/policy-assignment/resource-group/main.bicep
deleted file mode 100644
index 049e8babe2..0000000000
--- a/modules/authorization/policy-assignment/resource-group/main.bicep
+++ /dev/null
@@ -1,133 +0,0 @@
-metadata name = 'Policy Assignments (Resource Group scope)'
-metadata description = 'This module deploys a Policy Assignment at a Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'resourceGroup'
-
-@sys.description('Required. Specifies the name of the policy assignment. Maximum length is 64 characters for resource group scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. This message will be part of response in case of policy violation.')
-param description string = ''
-
-@sys.description('Optional. The display name of the policy assignment. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Required. Specifies the ID of the policy definition or policy set definition being assigned.')
-param policyDefinitionId string
-
-@sys.description('Optional. Parameters for the policy assignment if needed.')
-param parameters object = {}
-
-@sys.description('Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning \'Modify\' policy definitions.')
-@allowed([
- 'SystemAssigned'
- 'UserAssigned'
- 'None'
-])
-param identity string = 'SystemAssigned'
-
-@sys.description('Optional. The Resource ID for the user assigned identity to assign to the policy assignment.')
-param userAssignedIdentityId string = ''
-
-@sys.description('Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.')
-param roleDefinitionIds array = []
-
-@sys.description('Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The messages that describe why a resource is non-compliant with the policy.')
-param nonComplianceMessages array = []
-
-@sys.description('Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.')
-@allowed([
- 'Default'
- 'DoNotEnforce'
-])
-param enforcementMode string = 'Default'
-
-@sys.description('Optional. The policy excluded scopes.')
-param notScopes array = []
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.')
-param overrides array = []
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.')
-param resourceSelectors array = []
-
-@sys.description('Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment.')
-param subscriptionId string = subscription().subscriptionId
-
-@sys.description('Optional. The Target Scope for the Policy. The name of the resource group for the policy assignment. If not provided, will use the current scope for deployment.')
-param resourceGroupName string = resourceGroup().name
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-var identityVar = identity == 'SystemAssigned' ? {
- type: identity
-} : identity == 'UserAssigned' ? {
- type: identity
- userAssignedIdentities: {
- '${userAssignedIdentityId}': {}
- }
-} : null
-
-resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
- name: name
- location: location
- properties: {
- displayName: !empty(displayName) ? displayName : null
- metadata: !empty(metadata) ? metadata : null
- description: !empty(description) ? description : null
- policyDefinitionId: policyDefinitionId
- parameters: parameters
- nonComplianceMessages: !empty(nonComplianceMessages) ? nonComplianceMessages : []
- enforcementMode: enforcementMode
- notScopes: !empty(notScopes) ? notScopes : []
- overrides: !empty(overrides) ? overrides : []
- resourceSelectors: !empty(resourceSelectors) ? resourceSelectors : []
- }
- identity: identityVar
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for roleDefinitionId in roleDefinitionIds: if (!empty(roleDefinitionIds) && identity == 'SystemAssigned') {
- name: guid(subscriptionId, resourceGroupName, roleDefinitionId, location, name)
- properties: {
- roleDefinitionId: roleDefinitionId
- principalId: policyAssignment.identity.principalId
- principalType: 'ServicePrincipal'
- }
-}]
-
-@sys.description('Policy Assignment Name.')
-output name string = policyAssignment.name
-
-@sys.description('Policy Assignment principal ID.')
-output principalId string = identity == 'SystemAssigned' ? policyAssignment.identity.principalId : ''
-
-@sys.description('Policy Assignment resource ID.')
-output resourceId string = policyAssignment.id
-
-@sys.description('The name of the resource group the policy was assigned to.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The location the resource was deployed into.')
-output location string = policyAssignment.location
diff --git a/modules/authorization/policy-assignment/resource-group/main.json b/modules/authorization/policy-assignment/resource-group/main.json
deleted file mode 100644
index 65912a4b91..0000000000
--- a/modules/authorization/policy-assignment/resource-group/main.json
+++ /dev/null
@@ -1,244 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15032410491892224041"
- },
- "name": "Policy Assignments (Resource Group scope)",
- "description": "This module deploys a Policy Assignment at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 64 characters for resource group scope."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The name of the resource group for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "identityVar": "[if(equals(parameters('identity'), 'SystemAssigned'), createObject('type', parameters('identity')), if(equals(parameters('identity'), 'UserAssigned'), createObject('type', parameters('identity'), 'userAssignedIdentities', createObject(format('{0}', parameters('userAssignedIdentityId')), createObject())), null()))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyAssignments",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "policyDefinitionId": "[parameters('policyDefinitionId')]",
- "parameters": "[parameters('parameters')]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), parameters('nonComplianceMessages'), createArray())]",
- "enforcementMode": "[parameters('enforcementMode')]",
- "notScopes": "[if(not(empty(parameters('notScopes'))), parameters('notScopes'), createArray())]",
- "overrides": "[if(not(empty(parameters('overrides'))), parameters('overrides'), createArray())]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), parameters('resourceSelectors'), createArray())]"
- },
- "identity": "[variables('identityVar')]"
- },
- {
- "copy": {
- "name": "roleAssignment",
- "count": "[length(parameters('roleDefinitionIds'))]"
- },
- "condition": "[and(not(empty(parameters('roleDefinitionIds'))), equals(parameters('identity'), 'SystemAssigned'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), parameters('resourceGroupName'), parameters('roleDefinitionIds')[copyIndex()], parameters('location'), parameters('name'))]",
- "properties": {
- "roleDefinitionId": "[parameters('roleDefinitionIds')[copyIndex()]]",
- "principalId": "[reference(resourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "[resourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[parameters('name')]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(equals(parameters('identity'), 'SystemAssigned'), reference(resourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId, '')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[resourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the policy was assigned to."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-assignment/resource-group/version.json b/modules/authorization/policy-assignment/resource-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-assignment/resource-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-assignment/subscription/README.md b/modules/authorization/policy-assignment/subscription/README.md
deleted file mode 100644
index 3cdd823dd4..0000000000
--- a/modules/authorization/policy-assignment/subscription/README.md
+++ /dev/null
@@ -1,209 +0,0 @@
-# Policy Assignments (Subscription scope) `[Microsoft.Authorization/policyAssignments]`
-
-This module deploys a Policy Assignment at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyAssignments` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-06-01/policyAssignments) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy assignment. Maximum length is 64 characters for subscription scope. |
-| [`policyDefinitionId`](#parameter-policydefinitionid) | string | Specifies the ID of the policy definition or policy set definition being assigned. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | This message will be part of response in case of policy violation. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy assignment. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enforcementMode`](#parameter-enforcementmode) | string | The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce. |
-| [`identity`](#parameter-identity) | string | The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`metadata`](#parameter-metadata) | object | The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`nonComplianceMessages`](#parameter-noncompliancemessages) | array | The messages that describe why a resource is non-compliant with the policy. |
-| [`notScopes`](#parameter-notscopes) | array | The policy excluded scopes. |
-| [`overrides`](#parameter-overrides) | array | The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition. |
-| [`parameters`](#parameter-parameters) | object | Parameters for the policy assignment if needed. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location. |
-| [`roleDefinitionIds`](#parameter-roledefinitionids) | array | The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment. |
-| [`userAssignedIdentityId`](#parameter-userassignedidentityid) | string | The Resource ID for the user assigned identity to assign to the policy assignment. |
-
-### Parameter: `name`
-
-Specifies the name of the policy assignment. Maximum length is 64 characters for subscription scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitionId`
-
-Specifies the ID of the policy definition or policy set definition being assigned.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-This message will be part of response in case of policy violation.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy assignment. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enforcementMode`
-
-The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'DoNotEnforce'
- ]
- ```
-
-### Parameter: `identity`
-
-The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions.
-
-- Required: No
-- Type: string
-- Default: `'SystemAssigned'`
-- Allowed:
- ```Bicep
- [
- 'None'
- 'SystemAssigned'
- 'UserAssigned'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `nonComplianceMessages`
-
-The messages that describe why a resource is non-compliant with the policy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notScopes`
-
-The policy excluded scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `overrides`
-
-The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `parameters`
-
-Parameters for the policy assignment if needed.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleDefinitionIds`
-
-The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `subscriptionId`
-
-The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[subscription().subscriptionId]`
-
-### Parameter: `userAssignedIdentityId`
-
-The Resource ID for the user assigned identity to assign to the policy assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | Policy Assignment Name. |
-| `principalId` | string | Policy Assignment principal ID. |
-| `resourceId` | string | Policy Assignment resource ID. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-assignment/subscription/main.bicep b/modules/authorization/policy-assignment/subscription/main.bicep
deleted file mode 100644
index fd7cad4047..0000000000
--- a/modules/authorization/policy-assignment/subscription/main.bicep
+++ /dev/null
@@ -1,128 +0,0 @@
-metadata name = 'Policy Assignments (Subscription scope)'
-metadata description = 'This module deploys a Policy Assignment at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@sys.description('Required. Specifies the name of the policy assignment. Maximum length is 64 characters for subscription scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. This message will be part of response in case of policy violation.')
-param description string = ''
-
-@sys.description('Optional. The display name of the policy assignment. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Required. Specifies the ID of the policy definition or policy set definition being assigned.')
-param policyDefinitionId string
-
-@sys.description('Optional. Parameters for the policy assignment if needed.')
-param parameters object = {}
-
-@sys.description('Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning \'Modify\' policy definitions.')
-@allowed([
- 'SystemAssigned'
- 'UserAssigned'
- 'None'
-])
-param identity string = 'SystemAssigned'
-
-@sys.description('Optional. The Resource ID for the user assigned identity to assign to the policy assignment.')
-param userAssignedIdentityId string = ''
-
-@sys.description('Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition.')
-param roleDefinitionIds array = []
-
-@sys.description('Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The messages that describe why a resource is non-compliant with the policy.')
-param nonComplianceMessages array = []
-
-@sys.description('Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce.')
-@allowed([
- 'Default'
- 'DoNotEnforce'
-])
-param enforcementMode string = 'Default'
-
-@sys.description('Optional. The policy excluded scopes.')
-param notScopes array = []
-
-@sys.description('Optional. Location for all resources.')
-param location string = deployment().location
-
-@sys.description('Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition.')
-param overrides array = []
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location.')
-param resourceSelectors array = []
-
-@sys.description('Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment.')
-param subscriptionId string = subscription().subscriptionId
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var identityVar = identity == 'SystemAssigned' ? {
- type: identity
-} : identity == 'UserAssigned' ? {
- type: identity
- userAssignedIdentities: {
- '${userAssignedIdentityId}': {}
- }
-} : null
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
- name: name
- location: location
- properties: {
- displayName: !empty(displayName) ? displayName : null
- metadata: !empty(metadata) ? metadata : null
- description: !empty(description) ? description : null
- policyDefinitionId: policyDefinitionId
- parameters: parameters
- nonComplianceMessages: !empty(nonComplianceMessages) ? nonComplianceMessages : []
- enforcementMode: enforcementMode
- notScopes: !empty(notScopes) ? notScopes : []
- overrides: !empty(overrides) ? overrides : []
- resourceSelectors: !empty(resourceSelectors) ? resourceSelectors : []
- }
- identity: identityVar
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for roleDefinitionId in roleDefinitionIds: if (!empty(roleDefinitionIds) && identity == 'SystemAssigned') {
- name: guid(subscriptionId, roleDefinitionId, location, name)
- properties: {
- roleDefinitionId: roleDefinitionId
- principalId: policyAssignment.identity.principalId
- principalType: 'ServicePrincipal'
- }
-}]
-
-@sys.description('Policy Assignment Name.')
-output name string = policyAssignment.name
-
-@sys.description('Policy Assignment principal ID.')
-output principalId string = identity == 'SystemAssigned' ? policyAssignment.identity.principalId : ''
-
-@sys.description('Policy Assignment resource ID.')
-output resourceId string = policyAssignment.id
-
-@sys.description('The location the resource was deployed into.')
-output location string = policyAssignment.location
diff --git a/modules/authorization/policy-assignment/subscription/main.json b/modules/authorization/policy-assignment/subscription/main.json
deleted file mode 100644
index 5d6deb533a..0000000000
--- a/modules/authorization/policy-assignment/subscription/main.json
+++ /dev/null
@@ -1,231 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1296030047986147440"
- },
- "name": "Policy Assignments (Subscription scope)",
- "description": "This module deploys a Policy Assignment at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy assignment. Maximum length is 64 characters for subscription scope."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This message will be part of response in case of policy violation."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "policyDefinitionId": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the ID of the policy definition or policy set definition being assigned."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the policy assignment if needed."
- }
- },
- "identity": {
- "type": "string",
- "defaultValue": "SystemAssigned",
- "allowedValues": [
- "SystemAssigned",
- "UserAssigned",
- "None"
- ],
- "metadata": {
- "description": "Optional. The managed identity associated with the policy assignment. Policy assignments must include a resource identity when assigning 'Modify' policy definitions."
- }
- },
- "userAssignedIdentityId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Resource ID for the user assigned identity to assign to the policy assignment."
- }
- },
- "roleDefinitionIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IDs Of the Azure Role Definition list that is used to assign permissions to the identity. You need to provide either the fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.. See https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles for the list IDs for built-in Roles. They must match on what is on the policy definition."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy assignment metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "nonComplianceMessages": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The messages that describe why a resource is non-compliant with the policy."
- }
- },
- "enforcementMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "DoNotEnforce"
- ],
- "metadata": {
- "description": "Optional. The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. - Default or DoNotEnforce."
- }
- },
- "notScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy excluded scopes."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "overrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy property value override. Allows changing the effect of a policy definition without modifying the underlying policy definition or using a parameterized effect in the policy definition."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties. Facilitates safe deployment practices (SDP) by enabling gradual roll out policy assignments based on factors like resource location, resource type, or whether a resource has a location."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The Target Scope for the Policy. The subscription ID of the subscription for the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "identityVar": "[if(equals(parameters('identity'), 'SystemAssigned'), createObject('type', parameters('identity')), if(equals(parameters('identity'), 'UserAssigned'), createObject('type', parameters('identity'), 'userAssignedIdentities', createObject(format('{0}', parameters('userAssignedIdentityId')), createObject())), null()))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyAssignments",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "policyDefinitionId": "[parameters('policyDefinitionId')]",
- "parameters": "[parameters('parameters')]",
- "nonComplianceMessages": "[if(not(empty(parameters('nonComplianceMessages'))), parameters('nonComplianceMessages'), createArray())]",
- "enforcementMode": "[parameters('enforcementMode')]",
- "notScopes": "[if(not(empty(parameters('notScopes'))), parameters('notScopes'), createArray())]",
- "overrides": "[if(not(empty(parameters('overrides'))), parameters('overrides'), createArray())]",
- "resourceSelectors": "[if(not(empty(parameters('resourceSelectors'))), parameters('resourceSelectors'), createArray())]"
- },
- "identity": "[variables('identityVar')]"
- },
- {
- "copy": {
- "name": "roleAssignment",
- "count": "[length(parameters('roleDefinitionIds'))]"
- },
- "condition": "[and(not(empty(parameters('roleDefinitionIds'))), equals(parameters('identity'), 'SystemAssigned'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), parameters('roleDefinitionIds')[copyIndex()], parameters('location'), parameters('name'))]",
- "properties": {
- "roleDefinitionId": "[parameters('roleDefinitionIds')[copyIndex()]]",
- "principalId": "[reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "[subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment Name."
- },
- "value": "[parameters('name')]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment principal ID."
- },
- "value": "[if(equals(parameters('identity'), 'SystemAssigned'), reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').identity.principalId, '')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Assignment resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', parameters('name')), '2022-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-assignment/subscription/version.json b/modules/authorization/policy-assignment/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-assignment/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-assignment/tests/e2e/mg.common/main.test.bicep b/modules/authorization/policy-assignment/tests/e2e/mg.common/main.test.bicep
deleted file mode 100644
index 95285f90ac..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/mg.common/main.test.bicep
+++ /dev/null
@@ -1,94 +0,0 @@
-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 = 'apamgcom'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611'
- description: '[Description] Policy Assignment at the management group scope'
- displayName: '[Display Name] Policy Assignment at the management group scope'
- enforcementMode: 'DoNotEnforce'
- identity: 'SystemAssigned'
- location: location
- managementGroupId: last(split(managementGroup().id, '/'))
- metadata: {
- category: 'Security'
- version: '1.0'
- assignedBy: 'Bicep'
- }
- nonComplianceMessages: [
- {
- message: 'Violated Policy Assignment - This is a Non Compliance Message'
- }
- ]
- notScopes: [
- '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg'
- ]
- parameters: {
- enableCollectionOfSqlQueriesForSecurityResearch: {
- value: false
- }
- effect: {
- value: 'Disabled'
- }
- }
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c'
- ]
- overrides: [
- {
- kind: 'policyEffect'
- value: 'Disabled'
- selectors: [
- {
- kind: 'policyDefinitionReferenceId'
- in: [
- 'ASC_DeployAzureDefenderForSqlAdvancedThreatProtectionWindowsAgent'
- 'ASC_DeployAzureDefenderForSqlVulnerabilityAssessmentWindowsAgent'
- ]
- }
- ]
- }
- ]
- resourceSelectors: [
- {
- name: 'resourceSelector-test'
- selectors: [
- {
- kind: 'resourceType'
- in: [
- 'Microsoft.Compute/virtualMachines'
- ]
- }
- {
- kind: 'resourceLocation'
- in: [
- 'westeurope'
- ]
- }
- ]
- }
- ]
- }
-}
diff --git a/modules/authorization/policy-assignment/tests/e2e/mg.min/main.test.bicep b/modules/authorization/policy-assignment/tests/e2e/mg.min/main.test.bicep
deleted file mode 100644
index d0d00c55f3..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/mg.min/main.test.bicep
+++ /dev/null
@@ -1,30 +0,0 @@
-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 = 'apamgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d'
- metadata: {
- assignedBy: 'Bicep'
- }
- }
-}
diff --git a/modules/authorization/policy-assignment/tests/e2e/rg.common/dependencies.bicep b/modules/authorization/policy-assignment/tests/e2e/rg.common/dependencies.bicep
deleted file mode 100644
index f4151d61c7..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/rg.common/dependencies.bicep
+++ /dev/null
@@ -1,33 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- accessPolicies: []
- }
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
diff --git a/modules/authorization/policy-assignment/tests/e2e/rg.common/main.test.bicep b/modules/authorization/policy-assignment/tests/e2e/rg.common/main.test.bicep
deleted file mode 100644
index 3c64f5e2c1..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/rg.common/main.test.bicep
+++ /dev/null
@@ -1,121 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.policyassignments-${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 = 'apargcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611'
- description: '[Description] Policy Assignment at the resource group scope'
- displayName: '[Display Name] Policy Assignment at the resource group scope'
- enforcementMode: 'DoNotEnforce'
- identity: 'UserAssigned'
- location: location
- metadata: {
- category: 'Security'
- version: '1.0'
- assignedBy: 'Bicep'
- }
- nonComplianceMessages: [
- {
- message: 'Violated Policy Assignment - This is a Non Compliance Message'
- }
- ]
- notScopes: [
- nestedDependencies.outputs.keyVaultResourceId
- ]
- parameters: {
- enableCollectionOfSqlQueriesForSecurityResearch: {
- value: false
- }
- effect: {
- value: 'Disabled'
- }
- }
- resourceGroupName: resourceGroup.name
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c'
- ]
- overrides: [
- {
- kind: 'policyEffect'
- value: 'Disabled'
- selectors: [
- {
- kind: 'policyDefinitionReferenceId'
- in: [
- 'ASC_DeployAzureDefenderForSqlAdvancedThreatProtectionWindowsAgent'
- 'ASC_DeployAzureDefenderForSqlVulnerabilityAssessmentWindowsAgent'
- ]
- }
- ]
- }
- ]
- resourceSelectors: [
- {
- name: 'resourceSelector-test'
- selectors: [
- {
- kind: 'resourceType'
- in: [
- 'Microsoft.Compute/virtualMachines'
- ]
- }
- {
- kind: 'resourceLocation'
- in: [
- 'westeurope'
- ]
- }
- ]
- }
- ]
- subscriptionId: subscription().subscriptionId
- userAssignedIdentityId: nestedDependencies.outputs.managedIdentityResourceId
- }
-}
diff --git a/modules/authorization/policy-assignment/tests/e2e/rg.min/main.test.bicep b/modules/authorization/policy-assignment/tests/e2e/rg.min/main.test.bicep
deleted file mode 100644
index 2953f4aace..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/rg.min/main.test.bicep
+++ /dev/null
@@ -1,50 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.policyassignments-${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 = 'apargmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d'
- subscriptionId: subscription().subscriptionId
- metadata: {
- assignedBy: 'Bicep'
- }
- }
-}
diff --git a/modules/authorization/policy-assignment/tests/e2e/sub.common/dependencies.bicep b/modules/authorization/policy-assignment/tests/e2e/sub.common/dependencies.bicep
deleted file mode 100644
index f17c563bb2..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/sub.common/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/authorization/policy-assignment/tests/e2e/sub.common/main.test.bicep b/modules/authorization/policy-assignment/tests/e2e/sub.common/main.test.bicep
deleted file mode 100644
index cb3c088c6c..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/sub.common/main.test.bicep
+++ /dev/null
@@ -1,118 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.policyassignments-${serviceShort}-rg'
-
-@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 = 'apasubcom'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611'
- description: '[Description] Policy Assignment at the subscription scope'
- displayName: '[Display Name] Policy Assignment at the subscription scope'
- enforcementMode: 'DoNotEnforce'
- identity: 'UserAssigned'
- location: location
- metadata: {
- category: 'Security'
- version: '1.0'
- assignedBy: 'Bicep'
- }
- nonComplianceMessages: [
- {
- message: 'Violated Policy Assignment - This is a Non Compliance Message'
- }
- ]
- notScopes: [
- '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg'
- ]
- parameters: {
- enableCollectionOfSqlQueriesForSecurityResearch: {
- value: false
- }
- effect: {
- value: 'Disabled'
- }
- }
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c'
- ]
- overrides: [
- {
- kind: 'policyEffect'
- value: 'Disabled'
- selectors: [
- {
- kind: 'policyDefinitionReferenceId'
- in: [
- 'ASC_DeployAzureDefenderForSqlAdvancedThreatProtectionWindowsAgent'
- 'ASC_DeployAzureDefenderForSqlVulnerabilityAssessmentWindowsAgent'
- ]
- }
- ]
- }
- ]
- resourceSelectors: [
- {
- name: 'resourceSelector-test'
- selectors: [
- {
- kind: 'resourceType'
- in: [
- 'Microsoft.Compute/virtualMachines'
- ]
- }
- {
- kind: 'resourceLocation'
- in: [
- 'westeurope'
- ]
- }
- ]
- }
- ]
- subscriptionId: subscription().subscriptionId
- userAssignedIdentityId: nestedDependencies.outputs.managedIdentityResourceId
- }
-}
diff --git a/modules/authorization/policy-assignment/tests/e2e/sub.min/main.test.bicep b/modules/authorization/policy-assignment/tests/e2e/sub.min/main.test.bicep
deleted file mode 100644
index d9039eca58..0000000000
--- a/modules/authorization/policy-assignment/tests/e2e/sub.min/main.test.bicep
+++ /dev/null
@@ -1,33 +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 = 'apasubmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d'
- subscriptionId: subscription().subscriptionId
- metadata: {
- category: 'Security'
- version: '1.0'
- assignedBy: 'Bicep'
- }
- }
-}
diff --git a/modules/authorization/policy-assignment/version.json b/modules/authorization/policy-assignment/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-assignment/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-definition/README.md b/modules/authorization/policy-definition/README.md
index 4e0ff7369a..e416312377 100644
--- a/modules/authorization/policy-definition/README.md
+++ b/modules/authorization/policy-definition/README.md
@@ -1,741 +1,7 @@
-# Policy Definitions (All scopes) `[Microsoft.Authorization/policyDefinitions]`
+
-
-
-
-### Example 2: _Mg.Min_
-
-
-
-
-
-### Example 3: _Sub.Common_
-
-
-
-
-
-### Example 4: _Sub.Min_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy definition. Maximum length is 64 characters for management group scope and subscription scope. |
-| [`policyRule`](#parameter-policyrule) | object | The Policy Rule details for the Policy Definition. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The policy definition description. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy definition. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment. |
-| [`metadata`](#parameter-metadata) | object | The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`mode`](#parameter-mode) | string | The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data. |
-| [`parameters`](#parameter-parameters) | object | The policy definition parameters that can be used in policy definition references. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The subscription ID of the subscription (Scope). Cannot be used with managementGroupId. |
-
-### Parameter: `name`
-
-Specifies the name of the policy definition. Maximum length is 64 characters for management group scope and subscription scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyRule`
-
-The Policy Rule details for the Policy Definition.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `description`
-
-The policy definition description.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy definition. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `metadata`
-
-The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `mode`
-
-The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data.
-
-- Required: No
-- Type: string
-- Default: `'All'`
-- Allowed:
- ```Bicep
- [
- 'All'
- 'Indexed'
- 'Microsoft.ContainerService.Data'
- 'Microsoft.KeyVault.Data'
- 'Microsoft.Kubernetes.Data'
- 'Microsoft.Network.Data'
- ]
- ```
-
-### Parameter: `parameters`
-
-The policy definition parameters that can be used in policy definition references.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `subscriptionId`
-
-The subscription ID of the subscription (Scope). Cannot be used with managementGroupId.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Definition Name. |
-| `resourceId` | string | Policy Definition resource ID. |
-| `roleDefinitionIds` | array | Policy Definition Role Definition IDs. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Module Usage Guidance
-
-In general, most of the resources under the `Microsoft.Authorization` namespace allows deploying resources at multiple scopes (management groups, subscriptions, resource groups). The `main.bicep` root module is simply an orchestrator module that targets sub-modules for different scopes as seen in the parameter usage section. All sub-modules for this namespace have folders that represent the target scope. For example, if the orchestrator module in the [root](main.bicep) needs to target 'subscription' level scopes. It will look at the relative path ['/subscription/main.bicep'](./subscription/main.bicep) and use this sub-module for the actual deployment, while still passing the same parameters from the root module.
-
-The above method is useful when you want to use a single point to interact with the module but rely on parameter combinations to achieve the target scope. But what if you want to incorporate this module in other modules with lower scopes? This would force you to deploy the module in scope `managementGroup` regardless and further require you to provide its ID with it. If you do not set the scope to management group, this would be the error that you can expect to face:
-
-```bicep
-Error BCP134: Scope "subscription" is not valid for this module. Permitted scopes: "managementGroup"
-```
-
-The solution is to have the option of directly targeting the sub-module that achieves the required scope. For example, if you have your own Bicep file wanting to create resources at the subscription level, and also use some of the modules from the `Microsoft.Authorization` namespace, then you can directly use the sub-module ['/subscription/main.bicep'](./subscription/main.bicep) as a path within your repository, or reference that same published module from the bicep registry. CARML also published the sub-modules so you would be able to reference it like the following:
-
-**Bicep Registry Reference**
-```bicep
-module policydefinition 'br:bicepregistry.azurecr.io/bicep/modules/authorization.policy-definition.subscription:version' = {}
-```
-**Local Path Reference**
-```bicep
-module policydefinition 'yourpath/module/authorization/policy-definition/subscription/main.bicep' = {}
-```
-
-### Parameter Usage: `managementGroupId`
-
-To deploy resource to a Management Group, provide the `managementGroupId` as an input parameter to the module.
-
-
-
-> `managementGroupId` is an optional parameter. If not provided, the deployment will use the management group defined in the current deployment scope (i.e. `managementGroup().name`).
-
-### Parameter Usage: `subscriptionId`
-
-To deploy resource to an Azure Subscription, provide the `subscriptionId` as an input parameter to the module. **Example**:
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/policy-definition/main.bicep b/modules/authorization/policy-definition/main.bicep
deleted file mode 100644
index 8649c39875..0000000000
--- a/modules/authorization/policy-definition/main.bicep
+++ /dev/null
@@ -1,104 +0,0 @@
-metadata name = 'Policy Definitions (All scopes)'
-metadata description = 'This module deploys a Policy Definition at a Management Group or Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy definition. Maximum length is 64 characters for management group scope and subscription scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy definition. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The policy definition description.')
-param description string = ''
-
-@sys.description('Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data.')
-@allowed([
- 'All'
- 'Indexed'
- 'Microsoft.KeyVault.Data'
- 'Microsoft.ContainerService.Data'
- 'Microsoft.Kubernetes.Data'
- 'Microsoft.Network.Data'
-])
-param mode string = 'All'
-
-@sys.description('Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy definition parameters that can be used in policy definition references.')
-param parameters object = {}
-
-@sys.description('Required. The Policy Rule details for the Policy Definition.')
-param policyRule object
-
-@sys.description('Optional. The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The subscription ID of the subscription (Scope). Cannot be used with managementGroupId.')
-param subscriptionId string = ''
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module policyDefinition_mg 'management-group/main.bicep' = if (empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-PolicyDefinition-MG-Module'
- scope: managementGroup(managementGroupId)
- params: {
- name: name
- mode: mode
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- metadata: !empty(metadata) ? metadata : {}
- parameters: !empty(parameters) ? parameters : {}
- policyRule: policyRule
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module policyDefinition_sub 'subscription/main.bicep' = if (!empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-PolicyDefinition-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- name: name
- mode: mode
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- metadata: !empty(metadata) ? metadata : {}
- parameters: !empty(parameters) ? parameters : {}
- policyRule: policyRule
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@sys.description('Policy Definition Name.')
-output name string = empty(subscriptionId) ? policyDefinition_mg.outputs.name : policyDefinition_sub.outputs.name
-
-@sys.description('Policy Definition resource ID.')
-output resourceId string = empty(subscriptionId) ? policyDefinition_mg.outputs.resourceId : policyDefinition_sub.outputs.resourceId
-
-@sys.description('Policy Definition Role Definition IDs.')
-output roleDefinitionIds array = empty(subscriptionId) ? policyDefinition_mg.outputs.roleDefinitionIds : policyDefinition_sub.outputs.roleDefinitionIds
diff --git a/modules/authorization/policy-definition/main.json b/modules/authorization/policy-definition/main.json
deleted file mode 100644
index 0667382c4a..0000000000
--- a/modules/authorization/policy-definition/main.json
+++ /dev/null
@@ -1,496 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12398926446776214850"
- },
- "name": "Policy Definitions (All scopes)",
- "description": "This module deploys a Policy Definition at a Management Group or Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy definition. Maximum length is 64 characters for management group scope and subscription scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy definition. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The policy definition description."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Indexed",
- "Microsoft.KeyVault.Data",
- "Microsoft.ContainerService.Data",
- "Microsoft.Kubernetes.Data",
- "Microsoft.Network.Data"
- ],
- "metadata": {
- "description": "Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy definition parameters that can be used in policy definition references."
- }
- },
- "policyRule": {
- "type": "object",
- "metadata": {
- "description": "Required. The Policy Rule details for the Policy Definition."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The subscription ID of the subscription (Scope). Cannot be used with managementGroupId."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[empty(parameters('subscriptionId'))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))]",
- "scope": "[format('Microsoft.Management/managementGroups/{0}', parameters('managementGroupId'))]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "mode": {
- "value": "[parameters('mode')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "policyRule": {
- "value": "[parameters('policyRule')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3632302304949681871"
- },
- "name": "Policy Definitions (Management Group scope)",
- "description": "This module deploys a Policy Definition at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy definition. Maximum length is 64 characters."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy definition. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The policy definition description."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Indexed",
- "Microsoft.KeyVault.Data",
- "Microsoft.ContainerService.Data",
- "Microsoft.Kubernetes.Data",
- "Microsoft.Network.Data"
- ],
- "metadata": {
- "description": "Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy definition parameters that can be used in policy definition references."
- }
- },
- "policyRule": {
- "type": "object",
- "metadata": {
- "description": "Required. The Policy Rule details for the Policy Definition."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "mode": "[parameters('mode')]",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyRule": "[parameters('policyRule')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name'))]"
- },
- "roleDefinitionIds": {
- "type": "array",
- "metadata": {
- "description": "Policy Definition Role Definition IDs."
- },
- "value": "[if(contains(reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then, 'details'), if(contains(reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details, 'roleDefinitionIds'), reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details.roleDefinitionIds, createArray()), createArray())]"
- }
- }
- }
- }
- },
- {
- "condition": "[not(empty(parameters('subscriptionId')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "mode": {
- "value": "[parameters('mode')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "policyRule": {
- "value": "[parameters('policyRule')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15610043692526006499"
- },
- "name": "Policy Definitions (Subscription scope)",
- "description": "This module deploys a Policy Definition at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy definition. Maximum length is 64 characters."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy definition. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The policy definition description."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Indexed",
- "Microsoft.KeyVault.Data",
- "Microsoft.ContainerService.Data",
- "Microsoft.Kubernetes.Data",
- "Microsoft.Network.Data"
- ],
- "metadata": {
- "description": "Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy definition parameters that can be used in policy definition references."
- }
- },
- "policyRule": {
- "type": "object",
- "metadata": {
- "description": "Required. The Policy Rule details for the Policy Definition."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "mode": "[parameters('mode')]",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyRule": "[parameters('policyRule')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name'))]"
- },
- "roleDefinitionIds": {
- "type": "array",
- "metadata": {
- "description": "Policy Definition Role Definition IDs."
- },
- "value": "[if(contains(reference(subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then, 'details'), if(contains(reference(subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details, 'roleDefinitionIds'), reference(subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details.roleDefinitionIds, createArray()), createArray())]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition Name."
- },
- "value": "[if(empty(parameters('subscriptionId')), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value)]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition resource ID."
- },
- "value": "[if(empty(parameters('subscriptionId')), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value)]"
- },
- "roleDefinitionIds": {
- "type": "array",
- "metadata": {
- "description": "Policy Definition Role Definition IDs."
- },
- "value": "[if(empty(parameters('subscriptionId')), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.roleDefinitionIds.value, reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.roleDefinitionIds.value)]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-definition/management-group/README.md b/modules/authorization/policy-definition/management-group/README.md
deleted file mode 100644
index 610d78baf7..0000000000
--- a/modules/authorization/policy-definition/management-group/README.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Policy Definitions (Management Group scope) `[Microsoft.Authorization/policyDefinitions]`
-
-This module deploys a Policy Definition at a Management Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyDefinitions` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-06-01/policyDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy definition. Maximum length is 64 characters. |
-| [`policyRule`](#parameter-policyrule) | object | The Policy Rule details for the Policy Definition. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The policy definition description. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy definition. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`metadata`](#parameter-metadata) | object | The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`mode`](#parameter-mode) | string | The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data. |
-| [`parameters`](#parameter-parameters) | object | The policy definition parameters that can be used in policy definition references. |
-
-### Parameter: `name`
-
-Specifies the name of the policy definition. Maximum length is 64 characters.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyRule`
-
-The Policy Rule details for the Policy Definition.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `description`
-
-The policy definition description.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy definition. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `mode`
-
-The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data.
-
-- Required: No
-- Type: string
-- Default: `'All'`
-- Allowed:
- ```Bicep
- [
- 'All'
- 'Indexed'
- 'Microsoft.ContainerService.Data'
- 'Microsoft.KeyVault.Data'
- 'Microsoft.Kubernetes.Data'
- 'Microsoft.Network.Data'
- ]
- ```
-
-### Parameter: `parameters`
-
-The policy definition parameters that can be used in policy definition references.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Definition Name. |
-| `resourceId` | string | Policy Definition resource ID. |
-| `roleDefinitionIds` | array | Policy Definition Role Definition IDs. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-definition/management-group/main.bicep b/modules/authorization/policy-definition/management-group/main.bicep
deleted file mode 100644
index 3d14724f81..0000000000
--- a/modules/authorization/policy-definition/management-group/main.bicep
+++ /dev/null
@@ -1,77 +0,0 @@
-metadata name = 'Policy Definitions (Management Group scope)'
-metadata description = 'This module deploys a Policy Definition at a Management Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy definition. Maximum length is 64 characters.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy definition. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The policy definition description.')
-param description string = ''
-
-@sys.description('Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data.')
-@allowed([
- 'All'
- 'Indexed'
- 'Microsoft.KeyVault.Data'
- 'Microsoft.ContainerService.Data'
- 'Microsoft.Kubernetes.Data'
- 'Microsoft.Network.Data'
-])
-param mode string = 'All'
-
-@sys.description('Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy definition parameters that can be used in policy definition references.')
-param parameters object = {}
-
-@sys.description('Required. The Policy Rule details for the Policy Definition.')
-param policyRule object
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
- name: name
- properties: {
- policyType: 'Custom'
- mode: mode
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- parameters: !empty(parameters) ? parameters : null
- policyRule: policyRule
- }
-}
-
-@sys.description('Policy Definition Name.')
-output name string = policyDefinition.name
-
-@sys.description('Policy Definition resource ID.')
-output resourceId string = policyDefinition.id
-
-@sys.description('Policy Definition Role Definition IDs.')
-output roleDefinitionIds array = (contains(policyDefinition.properties.policyRule.then, 'details') ? ((contains(policyDefinition.properties.policyRule.then.details, 'roleDefinitionIds') ? policyDefinition.properties.policyRule.then.details.roleDefinitionIds : [])) : [])
diff --git a/modules/authorization/policy-definition/management-group/main.json b/modules/authorization/policy-definition/management-group/main.json
deleted file mode 100644
index 0c99261e72..0000000000
--- a/modules/authorization/policy-definition/management-group/main.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3632302304949681871"
- },
- "name": "Policy Definitions (Management Group scope)",
- "description": "This module deploys a Policy Definition at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy definition. Maximum length is 64 characters."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy definition. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The policy definition description."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Indexed",
- "Microsoft.KeyVault.Data",
- "Microsoft.ContainerService.Data",
- "Microsoft.Kubernetes.Data",
- "Microsoft.Network.Data"
- ],
- "metadata": {
- "description": "Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy definition parameters that can be used in policy definition references."
- }
- },
- "policyRule": {
- "type": "object",
- "metadata": {
- "description": "Required. The Policy Rule details for the Policy Definition."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "mode": "[parameters('mode')]",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyRule": "[parameters('policyRule')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name'))]"
- },
- "roleDefinitionIds": {
- "type": "array",
- "metadata": {
- "description": "Policy Definition Role Definition IDs."
- },
- "value": "[if(contains(reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then, 'details'), if(contains(reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details, 'roleDefinitionIds'), reference(extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details.roleDefinitionIds, createArray()), createArray())]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-definition/management-group/version.json b/modules/authorization/policy-definition/management-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-definition/management-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-definition/subscription/README.md b/modules/authorization/policy-definition/subscription/README.md
deleted file mode 100644
index 6de136d33a..0000000000
--- a/modules/authorization/policy-definition/subscription/README.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Policy Definitions (Subscription scope) `[Microsoft.Authorization/policyDefinitions]`
-
-This module deploys a Policy Definition at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyDefinitions` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-06-01/policyDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy definition. Maximum length is 64 characters. |
-| [`policyRule`](#parameter-policyrule) | object | The Policy Rule details for the Policy Definition. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The policy definition description. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy definition. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`metadata`](#parameter-metadata) | object | The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`mode`](#parameter-mode) | string | The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data. |
-| [`parameters`](#parameter-parameters) | object | The policy definition parameters that can be used in policy definition references. |
-
-### Parameter: `name`
-
-Specifies the name of the policy definition. Maximum length is 64 characters.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyRule`
-
-The Policy Rule details for the Policy Definition.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `description`
-
-The policy definition description.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy definition. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `mode`
-
-The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data.
-
-- Required: No
-- Type: string
-- Default: `'All'`
-- Allowed:
- ```Bicep
- [
- 'All'
- 'Indexed'
- 'Microsoft.ContainerService.Data'
- 'Microsoft.KeyVault.Data'
- 'Microsoft.Kubernetes.Data'
- 'Microsoft.Network.Data'
- ]
- ```
-
-### Parameter: `parameters`
-
-The policy definition parameters that can be used in policy definition references.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Definition Name. |
-| `resourceId` | string | Policy Definition resource ID. |
-| `roleDefinitionIds` | array | Policy Definition Role Definition IDs. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-definition/subscription/main.bicep b/modules/authorization/policy-definition/subscription/main.bicep
deleted file mode 100644
index 8bdb6898d5..0000000000
--- a/modules/authorization/policy-definition/subscription/main.bicep
+++ /dev/null
@@ -1,77 +0,0 @@
-metadata name = 'Policy Definitions (Subscription scope)'
-metadata description = 'This module deploys a Policy Definition at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@sys.description('Required. Specifies the name of the policy definition. Maximum length is 64 characters.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy definition. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The policy definition description.')
-param description string = ''
-
-@sys.description('Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data.')
-@allowed([
- 'All'
- 'Indexed'
- 'Microsoft.KeyVault.Data'
- 'Microsoft.ContainerService.Data'
- 'Microsoft.Kubernetes.Data'
- 'Microsoft.Network.Data'
-])
-param mode string = 'All'
-
-@sys.description('Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy definition parameters that can be used in policy definition references.')
-param parameters object = {}
-
-@sys.description('Required. The Policy Rule details for the Policy Definition.')
-param policyRule object
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
- name: name
- properties: {
- policyType: 'Custom'
- mode: mode
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- parameters: !empty(parameters) ? parameters : null
- policyRule: policyRule
- }
-}
-
-@sys.description('Policy Definition Name.')
-output name string = policyDefinition.name
-
-@sys.description('Policy Definition resource ID.')
-output resourceId string = policyDefinition.id
-
-@sys.description('Policy Definition Role Definition IDs.')
-output roleDefinitionIds array = (contains(policyDefinition.properties.policyRule.then, 'details') ? ((contains(policyDefinition.properties.policyRule.then.details, 'roleDefinitionIds') ? policyDefinition.properties.policyRule.then.details.roleDefinitionIds : [])) : [])
diff --git a/modules/authorization/policy-definition/subscription/main.json b/modules/authorization/policy-definition/subscription/main.json
deleted file mode 100644
index d765d1b498..0000000000
--- a/modules/authorization/policy-definition/subscription/main.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15610043692526006499"
- },
- "name": "Policy Definitions (Subscription scope)",
- "description": "This module deploys a Policy Definition at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy definition. Maximum length is 64 characters."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy definition. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The policy definition description."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Indexed",
- "Microsoft.KeyVault.Data",
- "Microsoft.ContainerService.Data",
- "Microsoft.Kubernetes.Data",
- "Microsoft.Network.Data"
- ],
- "metadata": {
- "description": "Optional. The policy definition mode. Default is All, Some examples are All, Indexed, Microsoft.KeyVault.Data."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy Definition metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy definition parameters that can be used in policy definition references."
- }
- },
- "policyRule": {
- "type": "object",
- "metadata": {
- "description": "Required. The Policy Rule details for the Policy Definition."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "mode": "[parameters('mode')]",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyRule": "[parameters('policyRule')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Definition resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name'))]"
- },
- "roleDefinitionIds": {
- "type": "array",
- "metadata": {
- "description": "Policy Definition Role Definition IDs."
- },
- "value": "[if(contains(reference(subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then, 'details'), if(contains(reference(subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details, 'roleDefinitionIds'), reference(subscriptionResourceId('Microsoft.Authorization/policyDefinitions', parameters('name')), '2021-06-01').policyRule.then.details.roleDefinitionIds, createArray()), createArray())]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-definition/subscription/version.json b/modules/authorization/policy-definition/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-definition/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-definition/tests/e2e/mg.common/main.test.bicep b/modules/authorization/policy-definition/tests/e2e/mg.common/main.test.bicep
deleted file mode 100644
index df669b50c3..0000000000
--- a/modules/authorization/policy-definition/tests/e2e/mg.common/main.test.bicep
+++ /dev/null
@@ -1,76 +0,0 @@
-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 = 'apdmgcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.Resources/subscriptions'
- field: 'type'
- }
- {
- exists: 'false'
- field: '[concat(\'tags[\', parameters(\'tagName\'), \']\')]'
- }
- ]
- }
- then: {
- details: {
- operations: [
- {
- field: '[concat(\'tags[\', parameters(\'tagName\'), \']\')]'
- operation: 'add'
- value: '[parameters(\'tagValue\')]'
- }
- ]
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f'
- ]
- }
- effect: 'modify'
- }
- }
- description: '[Description] This policy definition is deployed at the management group scope'
- displayName: '[DisplayName] This policy definition is deployed at the management group scope'
- metadata: {
- category: 'Security'
- }
- parameters: {
- tagName: {
- metadata: {
- description: 'Name of the tag such as \'environment\''
- displayName: 'Tag Name'
- }
- type: 'String'
- }
- tagValue: {
- metadata: {
- description: 'Value of the tag such as \'environment\''
- displayName: 'Tag Value'
- }
- type: 'String'
- }
- }
- }
-}
diff --git a/modules/authorization/policy-definition/tests/e2e/mg.min/main.test.bicep b/modules/authorization/policy-definition/tests/e2e/mg.min/main.test.bicep
deleted file mode 100644
index 26408738b1..0000000000
--- a/modules/authorization/policy-definition/tests/e2e/mg.min/main.test.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-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 = 'apdmgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- parameters: {
- effect: {
- allowedValues: [
- 'Audit'
- ]
- defaultValue: 'Audit'
- type: 'String'
- }
- }
- }
-}
diff --git a/modules/authorization/policy-definition/tests/e2e/sub.common/main.test.bicep b/modules/authorization/policy-definition/tests/e2e/sub.common/main.test.bicep
deleted file mode 100644
index 735058877b..0000000000
--- a/modules/authorization/policy-definition/tests/e2e/sub.common/main.test.bicep
+++ /dev/null
@@ -1,76 +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 = 'apdsubcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.Resources/subscriptions'
- field: 'type'
- }
- {
- exists: 'false'
- field: '[concat(\'tags[\', parameters(\'tagName\'), \']\')]'
- }
- ]
- }
- then: {
- details: {
- operations: [
- {
- field: '[concat(\'tags[\', parameters(\'tagName\'), \']\')]'
- operation: 'add'
- value: '[parameters(\'tagValue\')]'
- }
- ]
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f'
- ]
- }
- effect: 'modify'
- }
- }
- description: '[Description] This policy definition is deployed at subscription scope'
- displayName: '[DisplayName] This policy definition is deployed at subscription scope'
- metadata: {
- category: 'Security'
- }
- parameters: {
- tagName: {
- metadata: {
- description: 'Name of the tag such as \'environment\''
- displayName: 'Tag Name'
- }
- type: 'String'
- }
- tagValue: {
- metadata: {
- description: 'Value of the tag such as \'production\''
- displayName: 'Tag Value'
- }
- type: 'String'
- }
- }
- }
-}
diff --git a/modules/authorization/policy-definition/tests/e2e/sub.min/main.test.bicep b/modules/authorization/policy-definition/tests/e2e/sub.min/main.test.bicep
deleted file mode 100644
index 8e0f2c8c48..0000000000
--- a/modules/authorization/policy-definition/tests/e2e/sub.min/main.test.bicep
+++ /dev/null
@@ -1,48 +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 = 'apdsubmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- parameters: {
- effect: {
- allowedValues: [
- 'Audit'
- ]
- defaultValue: 'Audit'
- type: 'String'
- }
- }
- }
-}
diff --git a/modules/authorization/policy-definition/version.json b/modules/authorization/policy-definition/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-definition/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-exemption/README.md b/modules/authorization/policy-exemption/README.md
index 365732cdd7..0430f274c7 100644
--- a/modules/authorization/policy-exemption/README.md
+++ b/modules/authorization/policy-exemption/README.md
@@ -1,839 +1,7 @@
-# Policy Exemptions (All scopes) `[Microsoft.Authorization/policyExemptions]`
+
-
-
-
-### Example 2: _Mg.Min_
-
-
-
-
-
-### Example 3: _Rg.Common_
-
-
-
-
-
-### Example 4: _Rg.Min_
-
-
-
-
-
-### Example 5: _Sub.Common_
-
-
-
-
-
-### Example 6: _Sub.Min_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy exemption. Maximum length is 64 characters for management group, subscription and resource group scopes. |
-| [`policyAssignmentId`](#parameter-policyassignmentid) | string | The resource ID of the policy assignment that is being exempted. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`assignmentScopeValidation`](#parameter-assignmentscopevalidation) | string | The option whether validate the exemption is at or under the assignment scope. |
-| [`description`](#parameter-description) | string | The description of the policy exemption. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy exemption. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exemptionCategory`](#parameter-exemptioncategory) | string | The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated. |
-| [`expiresOn`](#parameter-expireson) | string | The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z. |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The group ID of the management group to be exempted from the policy assignment. If not provided, will use the current scope for deployment. |
-| [`metadata`](#parameter-metadata) | object | The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`policyDefinitionReferenceIds`](#parameter-policydefinitionreferenceids) | array | The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | The name of the resource group to be exempted from the policy assignment. Must also use the subscription ID parameter. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The subscription ID of the subscription to be exempted from the policy assignment. Cannot use with management group ID parameter. |
-
-### Parameter: `name`
-
-Specifies the name of the policy exemption. Maximum length is 64 characters for management group, subscription and resource group scopes.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyAssignmentId`
-
-The resource ID of the policy assignment that is being exempted.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `assignmentScopeValidation`
-
-The option whether validate the exemption is at or under the assignment scope.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Default'
- 'DoNotValidate'
- ]
- ```
-
-### Parameter: `description`
-
-The description of the policy exemption.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy exemption. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exemptionCategory`
-
-The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.
-
-- Required: No
-- Type: string
-- Default: `'Mitigated'`
-- Allowed:
- ```Bicep
- [
- 'Mitigated'
- 'Waiver'
- ]
- ```
-
-### Parameter: `expiresOn`
-
-The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The group ID of the management group to be exempted from the policy assignment. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `metadata`
-
-The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionReferenceIds`
-
-The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `resourceGroupName`
-
-The name of the resource group to be exempted from the policy assignment. Must also use the subscription ID parameter.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `subscriptionId`
-
-The subscription ID of the subscription to be exempted from the policy assignment. Cannot use with management group ID parameter.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Exemption Name. |
-| `resourceId` | string | Policy Exemption resource ID. |
-| `scope` | string | Policy Exemption Scope. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Module Usage Guidance
-
-In general, most of the resources under the `Microsoft.Authorization` namespace allows deploying resources at multiple scopes (management groups, subscriptions, resource groups). The `main.bicep` root module is simply an orchestrator module that targets sub-modules for different scopes as seen in the parameter usage section. All sub-modules for this namespace have folders that represent the target scope. For example, if the orchestrator module in the [root](main.bicep) needs to target 'subscription' level scopes. It will look at the relative path ['/subscription/main.bicep'](./subscription/main.bicep) and use this sub-module for the actual deployment, while still passing the same parameters from the root module.
-
-The above method is useful when you want to use a single point to interact with the module but rely on parameter combinations to achieve the target scope. But what if you want to incorporate this module in other modules with lower scopes? This would force you to deploy the module in scope `managementGroup` regardless and further require you to provide its ID with it. If you do not set the scope to management group, this would be the error that you can expect to face:
-
-```bicep
-Error BCP134: Scope "subscription" is not valid for this module. Permitted scopes: "managementGroup"
-```
-
-The solution is to have the option of directly targeting the sub-module that achieves the required scope. For example, if you have your own Bicep file wanting to create resources at the subscription level, and also use some of the modules from the `Microsoft.Authorization` namespace, then you can directly use the sub-module ['/subscription/main.bicep'](./subscription/main.bicep) as a path within your repository, or reference that same published module from the bicep registry. CARML also published the sub-modules so you would be able to reference it like the following:
-
-**Bicep Registry Reference**
-```bicep
-module policyexemption 'br:bicepregistry.azurecr.io/bicep/modules/authorization.policy-exemption.subscription:version' = {}
-```
-**Local Path Reference**
-```bicep
-module policyexemption 'yourpath/module/authorization/policy-exemption/subscription/main.bicep' = {}
-```
-
-### Parameter Usage: `managementGroupId`
-
-To deploy resource to a Management Group, provide the `managementGroupId` as an input parameter to the module.
-
-
-
-
-> `managementGroupId` is an optional parameter. If not provided, the deployment will use the management group defined in the current deployment scope (i.e. `managementGroup().name`).
-
-### Parameter Usage: `subscriptionId`
-
-To deploy resource to an Azure Subscription, provide the `subscriptionId` as an input parameter to the module. **Example**:
-
-
-
-### Parameter Usage: `resourceGroupName`
-
-To deploy resource to a Resource Group, provide the `subscriptionId` and `resourceGroupName` as an input parameter to the module. **Example**:
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-},
-"resourceGroupName": {
- "value": "target-resourceGroup"
-}
-```
-
-> The `subscriptionId` is used to enable deployment to a Resource Group Scope, allowing the use of the `resourceGroup()` function from a Management Group Scope. [Additional Details](https://github.com/Azure/bicep/pull/1420).
-
-### Parameter Usage: `resourceSelectors`
-
-To deploy Resource Selectors, you can apply the following syntax
-
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/policy-exemption/main.bicep b/modules/authorization/policy-exemption/main.bicep
deleted file mode 100644
index cbb2469f61..0000000000
--- a/modules/authorization/policy-exemption/main.bicep
+++ /dev/null
@@ -1,137 +0,0 @@
-metadata name = 'Policy Exemptions (All scopes)'
-metadata description = 'This module deploys a Policy Exemption at a Management Group, Subscription or Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy exemption. Maximum length is 64 characters for management group, subscription and resource group scopes.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy exemption. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description of the policy exemption.')
-param description string = ''
-
-@sys.description('Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.')
-@allowed([
- 'Mitigated'
- 'Waiver'
-])
-param exemptionCategory string = 'Mitigated'
-
-@sys.description('Required. The resource ID of the policy assignment that is being exempted.')
-param policyAssignmentId string
-
-@sys.description('Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.')
-param policyDefinitionReferenceIds array = []
-
-@sys.description('Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.')
-param expiresOn string = ''
-
-@sys.description('Optional. The group ID of the management group to be exempted from the policy assignment. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The subscription ID of the subscription to be exempted from the policy assignment. Cannot use with management group ID parameter.')
-param subscriptionId string = ''
-
-@sys.description('Optional. The name of the resource group to be exempted from the policy assignment. Must also use the subscription ID parameter.')
-param resourceGroupName string = ''
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. The option whether validate the exemption is at or under the assignment scope.')
-@allowed([
- ''
- 'Default'
- 'DoNotValidate'
-])
-param assignmentScopeValidation string = ''
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties.')
-param resourceSelectors array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module policyExemption_mg 'management-group/main.bicep' = if (empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-PolicyExemption-MG-Module'
- scope: managementGroup(managementGroupId)
- params: {
- name: name
- displayName: displayName
- description: description
- metadata: metadata
- exemptionCategory: exemptionCategory
- policyAssignmentId: policyAssignmentId
- policyDefinitionReferenceIds: policyDefinitionReferenceIds
- expiresOn: expiresOn
- location: location
- assignmentScopeValidation: assignmentScopeValidation
- resourceSelectors: resourceSelectors
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module policyExemption_sub 'subscription/main.bicep' = if (!empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-PolicyExemption-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- name: name
- displayName: displayName
- description: description
- metadata: metadata
- exemptionCategory: exemptionCategory
- policyAssignmentId: policyAssignmentId
- policyDefinitionReferenceIds: policyDefinitionReferenceIds
- expiresOn: expiresOn
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module policyExemption_rg 'resource-group/main.bicep' = if (!empty(resourceGroupName) && !empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-PolicyExemption-RG-Module'
- scope: resourceGroup(subscriptionId, resourceGroupName)
- params: {
- name: name
- displayName: displayName
- description: description
- metadata: metadata
- exemptionCategory: exemptionCategory
- policyAssignmentId: policyAssignmentId
- policyDefinitionReferenceIds: policyDefinitionReferenceIds
- expiresOn: expiresOn
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@sys.description('Policy Exemption Name.')
-output name string = empty(subscriptionId) && empty(resourceGroupName) ? policyExemption_mg.outputs.name : (!empty(subscriptionId) && empty(resourceGroupName) ? policyExemption_sub.outputs.name : policyExemption_rg.outputs.name)
-
-@sys.description('Policy Exemption resource ID.')
-output resourceId string = empty(subscriptionId) && empty(resourceGroupName) ? policyExemption_mg.outputs.resourceId : (!empty(subscriptionId) && empty(resourceGroupName) ? policyExemption_sub.outputs.resourceId : policyExemption_rg.outputs.resourceId)
-
-@sys.description('Policy Exemption Scope.')
-output scope string = empty(subscriptionId) && empty(resourceGroupName) ? policyExemption_mg.outputs.scope : (!empty(subscriptionId) && empty(resourceGroupName) ? policyExemption_sub.outputs.scope : policyExemption_rg.outputs.scope)
diff --git a/modules/authorization/policy-exemption/main.json b/modules/authorization/policy-exemption/main.json
deleted file mode 100644
index 37bb291bf4..0000000000
--- a/modules/authorization/policy-exemption/main.json
+++ /dev/null
@@ -1,808 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5596643679633132129"
- },
- "name": "Policy Exemptions (All scopes)",
- "description": "This module deploys a Policy Exemption at a Management Group, Subscription or Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for management group, subscription and resource group scopes."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy exemption. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The group ID of the management group to be exempted from the policy assignment. If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The subscription ID of the subscription to be exempted from the policy assignment. Cannot use with management group ID parameter."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the resource group to be exempted from the policy assignment. Must also use the subscription ID parameter."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyExemption-MG-Module', uniqueString(deployment().name, parameters('location')))]",
- "scope": "[format('Microsoft.Management/managementGroups/{0}', parameters('managementGroupId'))]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "displayName": {
- "value": "[parameters('displayName')]"
- },
- "description": {
- "value": "[parameters('description')]"
- },
- "metadata": {
- "value": "[parameters('metadata')]"
- },
- "exemptionCategory": {
- "value": "[parameters('exemptionCategory')]"
- },
- "policyAssignmentId": {
- "value": "[parameters('policyAssignmentId')]"
- },
- "policyDefinitionReferenceIds": {
- "value": "[parameters('policyDefinitionReferenceIds')]"
- },
- "expiresOn": {
- "value": "[parameters('expiresOn')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "assignmentScopeValidation": {
- "value": "[parameters('assignmentScopeValidation')]"
- },
- "resourceSelectors": {
- "value": "[parameters('resourceSelectors')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5606667569084267633"
- },
- "name": "Policy Exemptions (Management Group scope)",
- "description": "This module deploys a Policy Exemption at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for management group scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyExemptions",
- "apiVersion": "2022-07-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "exemptionCategory": "[parameters('exemptionCategory')]",
- "policyAssignmentId": "[parameters('policyAssignmentId')]",
- "policyDefinitionReferenceIds": "[if(not(empty(parameters('policyDefinitionReferenceIds'))), parameters('policyDefinitionReferenceIds'), createArray())]",
- "expiresOn": "[if(not(empty(parameters('expiresOn'))), parameters('expiresOn'), null())]",
- "assignmentScopeValidation": "[if(not(empty(parameters('assignmentScopeValidation'))), parameters('assignmentScopeValidation'), null())]",
- "resourceSelectors": "[parameters('resourceSelectors')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyExemptions', parameters('name'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[managementGroup().id]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyExemption-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "displayName": {
- "value": "[parameters('displayName')]"
- },
- "description": {
- "value": "[parameters('description')]"
- },
- "metadata": {
- "value": "[parameters('metadata')]"
- },
- "exemptionCategory": {
- "value": "[parameters('exemptionCategory')]"
- },
- "policyAssignmentId": {
- "value": "[parameters('policyAssignmentId')]"
- },
- "policyDefinitionReferenceIds": {
- "value": "[parameters('policyDefinitionReferenceIds')]"
- },
- "expiresOn": {
- "value": "[parameters('expiresOn')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10613705515536903891"
- },
- "name": "Policy Exemptions (Subscription scope)",
- "description": "This module deploys a Policy Exemption at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for subscription scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy exemption. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyExemptions",
- "apiVersion": "2022-07-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "exemptionCategory": "[parameters('exemptionCategory')]",
- "policyAssignmentId": "[parameters('policyAssignmentId')]",
- "policyDefinitionReferenceIds": "[if(not(empty(parameters('policyDefinitionReferenceIds'))), parameters('policyDefinitionReferenceIds'), createArray())]",
- "expiresOn": "[if(not(empty(parameters('expiresOn'))), parameters('expiresOn'), null())]",
- "assignmentScopeValidation": "[if(not(empty(parameters('assignmentScopeValidation'))), parameters('assignmentScopeValidation'), null())]",
- "resourceSelectors": "[parameters('resourceSelectors')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policyExemptions', parameters('name'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[subscription().id]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId'))))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicyExemption-RG-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "resourceGroup": "[parameters('resourceGroupName')]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "displayName": {
- "value": "[parameters('displayName')]"
- },
- "description": {
- "value": "[parameters('description')]"
- },
- "metadata": {
- "value": "[parameters('metadata')]"
- },
- "exemptionCategory": {
- "value": "[parameters('exemptionCategory')]"
- },
- "policyAssignmentId": {
- "value": "[parameters('policyAssignmentId')]"
- },
- "policyDefinitionReferenceIds": {
- "value": "[parameters('policyDefinitionReferenceIds')]"
- },
- "expiresOn": {
- "value": "[parameters('expiresOn')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17689607806582642174"
- },
- "name": "Policy Exemptions (Resource Group scope)",
- "description": "This module deploys a Policy Exemption at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for resource group scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy exemption. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyExemptions",
- "apiVersion": "2022-07-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "exemptionCategory": "[parameters('exemptionCategory')]",
- "policyAssignmentId": "[parameters('policyAssignmentId')]",
- "policyDefinitionReferenceIds": "[if(not(empty(parameters('policyDefinitionReferenceIds'))), parameters('policyDefinitionReferenceIds'), createArray())]",
- "expiresOn": "[if(not(empty(parameters('expiresOn'))), parameters('expiresOn'), null())]",
- "assignmentScopeValidation": "[if(not(empty(parameters('assignmentScopeValidation'))), parameters('assignmentScopeValidation'), null())]",
- "resourceSelectors": "[parameters('resourceSelectors')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[resourceId('Microsoft.Authorization/policyExemptions', parameters('name'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[resourceGroup().id]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the policy exemption was applied at."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-PolicyExemption-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-exemption/management-group/README.md b/modules/authorization/policy-exemption/management-group/README.md
deleted file mode 100644
index 303d90d848..0000000000
--- a/modules/authorization/policy-exemption/management-group/README.md
+++ /dev/null
@@ -1,162 +0,0 @@
-# Policy Exemptions (Management Group scope) `[Microsoft.Authorization/policyExemptions]`
-
-This module deploys a Policy Exemption at a Management Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyExemptions` | [2022-07-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-07-01-preview/policyExemptions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy exemption. Maximum length is 64 characters for management group scope. |
-| [`policyAssignmentId`](#parameter-policyassignmentid) | string | The resource ID of the policy assignment that is being exempted. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`assignmentScopeValidation`](#parameter-assignmentscopevalidation) | string | The option whether validate the exemption is at or under the assignment scope. |
-| [`description`](#parameter-description) | string | The description of the policy exemption. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy assignment. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exemptionCategory`](#parameter-exemptioncategory) | string | The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated. |
-| [`expiresOn`](#parameter-expireson) | string | The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z. |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`metadata`](#parameter-metadata) | object | The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`policyDefinitionReferenceIds`](#parameter-policydefinitionreferenceids) | array | The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. |
-
-### Parameter: `name`
-
-Specifies the name of the policy exemption. Maximum length is 64 characters for management group scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyAssignmentId`
-
-The resource ID of the policy assignment that is being exempted.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `assignmentScopeValidation`
-
-The option whether validate the exemption is at or under the assignment scope.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Default'
- 'DoNotValidate'
- ]
- ```
-
-### Parameter: `description`
-
-The description of the policy exemption.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy assignment. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exemptionCategory`
-
-The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.
-
-- Required: No
-- Type: string
-- Default: `'Mitigated'`
-- Allowed:
- ```Bicep
- [
- 'Mitigated'
- 'Waiver'
- ]
- ```
-
-### Parameter: `expiresOn`
-
-The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionReferenceIds`
-
-The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Exemption Name. |
-| `resourceId` | string | Policy Exemption resource ID. |
-| `scope` | string | Policy Exemption Scope. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-exemption/management-group/main.bicep b/modules/authorization/policy-exemption/management-group/main.bicep
deleted file mode 100644
index add07a7130..0000000000
--- a/modules/authorization/policy-exemption/management-group/main.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-metadata name = 'Policy Exemptions (Management Group scope)'
-metadata description = 'This module deploys a Policy Exemption at a Management Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy exemption. Maximum length is 64 characters for management group scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy assignment. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description of the policy exemption.')
-param description string = ''
-
-@sys.description('Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.')
-@allowed([
- 'Mitigated'
- 'Waiver'
-])
-param exemptionCategory string = 'Mitigated'
-
-@sys.description('Required. The resource ID of the policy assignment that is being exempted.')
-param policyAssignmentId string
-
-@sys.description('Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.')
-param policyDefinitionReferenceIds array = []
-
-@sys.description('Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.')
-param expiresOn string = ''
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. The option whether validate the exemption is at or under the assignment scope.')
-@allowed([
- ''
- 'Default'
- 'DoNotValidate'
-])
-param assignmentScopeValidation string = ''
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties.')
-param resourceSelectors array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyExemption 'Microsoft.Authorization/policyExemptions@2022-07-01-preview' = {
- name: name
- properties: {
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- exemptionCategory: exemptionCategory
- policyAssignmentId: policyAssignmentId
- policyDefinitionReferenceIds: !empty(policyDefinitionReferenceIds) ? policyDefinitionReferenceIds : []
- expiresOn: !empty(expiresOn) ? expiresOn : null
- assignmentScopeValidation: !empty(assignmentScopeValidation) ? assignmentScopeValidation : null
- resourceSelectors: resourceSelectors
- }
-}
-
-@sys.description('Policy Exemption Name.')
-output name string = policyExemption.name
-
-@sys.description('Policy Exemption resource ID.')
-output resourceId string = policyExemption.id
-
-@sys.description('Policy Exemption Scope.')
-output scope string = managementGroup().id
diff --git a/modules/authorization/policy-exemption/management-group/main.json b/modules/authorization/policy-exemption/management-group/main.json
deleted file mode 100644
index 8271a1ee56..0000000000
--- a/modules/authorization/policy-exemption/management-group/main.json
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5606667569084267633"
- },
- "name": "Policy Exemptions (Management Group scope)",
- "description": "This module deploys a Policy Exemption at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for management group scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy assignment. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyExemptions",
- "apiVersion": "2022-07-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "exemptionCategory": "[parameters('exemptionCategory')]",
- "policyAssignmentId": "[parameters('policyAssignmentId')]",
- "policyDefinitionReferenceIds": "[if(not(empty(parameters('policyDefinitionReferenceIds'))), parameters('policyDefinitionReferenceIds'), createArray())]",
- "expiresOn": "[if(not(empty(parameters('expiresOn'))), parameters('expiresOn'), null())]",
- "assignmentScopeValidation": "[if(not(empty(parameters('assignmentScopeValidation'))), parameters('assignmentScopeValidation'), null())]",
- "resourceSelectors": "[parameters('resourceSelectors')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policyExemptions', parameters('name'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[managementGroup().id]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-exemption/management-group/version.json b/modules/authorization/policy-exemption/management-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-exemption/management-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-exemption/resource-group/README.md b/modules/authorization/policy-exemption/resource-group/README.md
deleted file mode 100644
index 0db23d6178..0000000000
--- a/modules/authorization/policy-exemption/resource-group/README.md
+++ /dev/null
@@ -1,154 +0,0 @@
-# Policy Exemptions (Resource Group scope) `[Microsoft.Authorization/policyExemptions]`
-
-This module deploys a Policy Exemption at a Resource Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyExemptions` | [2022-07-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-07-01-preview/policyExemptions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy exemption. Maximum length is 64 characters for resource group scope. |
-| [`policyAssignmentId`](#parameter-policyassignmentid) | string | The resource ID of the policy assignment that is being exempted. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`assignmentScopeValidation`](#parameter-assignmentscopevalidation) | string | The option whether validate the exemption is at or under the assignment scope. |
-| [`description`](#parameter-description) | string | The description of the policy exemption. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy exemption. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exemptionCategory`](#parameter-exemptioncategory) | string | The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated. |
-| [`expiresOn`](#parameter-expireson) | string | The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z. |
-| [`metadata`](#parameter-metadata) | object | The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`policyDefinitionReferenceIds`](#parameter-policydefinitionreferenceids) | array | The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. |
-
-### Parameter: `name`
-
-Specifies the name of the policy exemption. Maximum length is 64 characters for resource group scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyAssignmentId`
-
-The resource ID of the policy assignment that is being exempted.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `assignmentScopeValidation`
-
-The option whether validate the exemption is at or under the assignment scope.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Default'
- 'DoNotValidate'
- ]
- ```
-
-### Parameter: `description`
-
-The description of the policy exemption.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy exemption. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exemptionCategory`
-
-The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.
-
-- Required: No
-- Type: string
-- Default: `'Mitigated'`
-- Allowed:
- ```Bicep
- [
- 'Mitigated'
- 'Waiver'
- ]
- ```
-
-### Parameter: `expiresOn`
-
-The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `metadata`
-
-The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionReferenceIds`
-
-The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Exemption Name. |
-| `resourceGroupName` | string | The name of the resource group the policy exemption was applied at. |
-| `resourceId` | string | Policy Exemption resource ID. |
-| `scope` | string | Policy Exemption Scope. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-exemption/resource-group/main.bicep b/modules/authorization/policy-exemption/resource-group/main.bicep
deleted file mode 100644
index ed9737da0e..0000000000
--- a/modules/authorization/policy-exemption/resource-group/main.bicep
+++ /dev/null
@@ -1,88 +0,0 @@
-metadata name = 'Policy Exemptions (Resource Group scope)'
-metadata description = 'This module deploys a Policy Exemption at a Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'resourceGroup'
-
-@sys.description('Required. Specifies the name of the policy exemption. Maximum length is 64 characters for resource group scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy exemption. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description of the policy exemption.')
-param description string = ''
-
-@sys.description('Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.')
-@allowed([
- 'Mitigated'
- 'Waiver'
-])
-param exemptionCategory string = 'Mitigated'
-
-@sys.description('Required. The resource ID of the policy assignment that is being exempted.')
-param policyAssignmentId string
-
-@sys.description('Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.')
-param policyDefinitionReferenceIds array = []
-
-@sys.description('Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.')
-param expiresOn string = ''
-
-@sys.description('Optional. The option whether validate the exemption is at or under the assignment scope.')
-@allowed([
- ''
- 'Default'
- 'DoNotValidate'
-])
-param assignmentScopeValidation string = ''
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties.')
-param resourceSelectors array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyExemption 'Microsoft.Authorization/policyExemptions@2022-07-01-preview' = {
- name: name
- properties: {
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- exemptionCategory: exemptionCategory
- policyAssignmentId: policyAssignmentId
- policyDefinitionReferenceIds: !empty(policyDefinitionReferenceIds) ? policyDefinitionReferenceIds : []
- expiresOn: !empty(expiresOn) ? expiresOn : null
- assignmentScopeValidation: !empty(assignmentScopeValidation) ? assignmentScopeValidation : null
- resourceSelectors: resourceSelectors
- }
-}
-
-@sys.description('Policy Exemption Name.')
-output name string = policyExemption.name
-
-@sys.description('Policy Exemption resource ID.')
-output resourceId string = policyExemption.id
-
-@sys.description('Policy Exemption Scope.')
-output scope string = resourceGroup().id
-
-@sys.description('The name of the resource group the policy exemption was applied at.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/authorization/policy-exemption/resource-group/main.json b/modules/authorization/policy-exemption/resource-group/main.json
deleted file mode 100644
index 8672a1ff5d..0000000000
--- a/modules/authorization/policy-exemption/resource-group/main.json
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17689607806582642174"
- },
- "name": "Policy Exemptions (Resource Group scope)",
- "description": "This module deploys a Policy Exemption at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for resource group scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy exemption. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyExemptions",
- "apiVersion": "2022-07-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "exemptionCategory": "[parameters('exemptionCategory')]",
- "policyAssignmentId": "[parameters('policyAssignmentId')]",
- "policyDefinitionReferenceIds": "[if(not(empty(parameters('policyDefinitionReferenceIds'))), parameters('policyDefinitionReferenceIds'), createArray())]",
- "expiresOn": "[if(not(empty(parameters('expiresOn'))), parameters('expiresOn'), null())]",
- "assignmentScopeValidation": "[if(not(empty(parameters('assignmentScopeValidation'))), parameters('assignmentScopeValidation'), null())]",
- "resourceSelectors": "[parameters('resourceSelectors')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[resourceId('Microsoft.Authorization/policyExemptions', parameters('name'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[resourceGroup().id]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the policy exemption was applied at."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-exemption/resource-group/version.json b/modules/authorization/policy-exemption/resource-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-exemption/resource-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-exemption/subscription/README.md b/modules/authorization/policy-exemption/subscription/README.md
deleted file mode 100644
index 3240cff663..0000000000
--- a/modules/authorization/policy-exemption/subscription/README.md
+++ /dev/null
@@ -1,162 +0,0 @@
-# Policy Exemptions (Subscription scope) `[Microsoft.Authorization/policyExemptions]`
-
-This module deploys a Policy Exemption at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyExemptions` | [2022-07-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-07-01-preview/policyExemptions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy exemption. Maximum length is 64 characters for subscription scope. |
-| [`policyAssignmentId`](#parameter-policyassignmentid) | string | The resource ID of the policy assignment that is being exempted. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`assignmentScopeValidation`](#parameter-assignmentscopevalidation) | string | The option whether validate the exemption is at or under the assignment scope. |
-| [`description`](#parameter-description) | string | The description of the policy exemption. |
-| [`displayName`](#parameter-displayname) | string | The display name of the policy exemption. Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exemptionCategory`](#parameter-exemptioncategory) | string | The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated. |
-| [`expiresOn`](#parameter-expireson) | string | The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z. |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`metadata`](#parameter-metadata) | object | The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`policyDefinitionReferenceIds`](#parameter-policydefinitionreferenceids) | array | The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition. |
-| [`resourceSelectors`](#parameter-resourceselectors) | array | The resource selector list to filter policies by resource properties. |
-
-### Parameter: `name`
-
-Specifies the name of the policy exemption. Maximum length is 64 characters for subscription scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyAssignmentId`
-
-The resource ID of the policy assignment that is being exempted.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `assignmentScopeValidation`
-
-The option whether validate the exemption is at or under the assignment scope.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Default'
- 'DoNotValidate'
- ]
- ```
-
-### Parameter: `description`
-
-The description of the policy exemption.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the policy exemption. Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exemptionCategory`
-
-The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.
-
-- Required: No
-- Type: string
-- Default: `'Mitigated'`
-- Allowed:
- ```Bicep
- [
- 'Mitigated'
- 'Waiver'
- ]
- ```
-
-### Parameter: `expiresOn`
-
-The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionReferenceIds`
-
-The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `resourceSelectors`
-
-The resource selector list to filter policies by resource properties.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Exemption Name. |
-| `resourceId` | string | Policy Exemption resource ID. |
-| `scope` | string | Policy Exemption Scope. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-exemption/subscription/main.bicep b/modules/authorization/policy-exemption/subscription/main.bicep
deleted file mode 100644
index 2b96396e4b..0000000000
--- a/modules/authorization/policy-exemption/subscription/main.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-metadata name = 'Policy Exemptions (Subscription scope)'
-metadata description = 'This module deploys a Policy Exemption at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@sys.description('Required. Specifies the name of the policy exemption. Maximum length is 64 characters for subscription scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the policy exemption. Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description of the policy exemption.')
-param description string = ''
-
-@sys.description('Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated.')
-@allowed([
- 'Mitigated'
- 'Waiver'
-])
-param exemptionCategory string = 'Mitigated'
-
-@sys.description('Required. The resource ID of the policy assignment that is being exempted.')
-param policyAssignmentId string
-
-@sys.description('Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.')
-param policyDefinitionReferenceIds array = []
-
-@sys.description('Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z.')
-param expiresOn string = ''
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. The option whether validate the exemption is at or under the assignment scope.')
-@allowed([
- ''
- 'Default'
- 'DoNotValidate'
-])
-param assignmentScopeValidation string = ''
-
-@sys.description('Optional. The resource selector list to filter policies by resource properties.')
-param resourceSelectors array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policyExemption 'Microsoft.Authorization/policyExemptions@2022-07-01-preview' = {
- name: name
- properties: {
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- exemptionCategory: exemptionCategory
- policyAssignmentId: policyAssignmentId
- policyDefinitionReferenceIds: !empty(policyDefinitionReferenceIds) ? policyDefinitionReferenceIds : []
- expiresOn: !empty(expiresOn) ? expiresOn : null
- assignmentScopeValidation: !empty(assignmentScopeValidation) ? assignmentScopeValidation : null
- resourceSelectors: resourceSelectors
- }
-}
-
-@sys.description('Policy Exemption Name.')
-output name string = policyExemption.name
-
-@sys.description('Policy Exemption resource ID.')
-output resourceId string = policyExemption.id
-
-@sys.description('Policy Exemption Scope.')
-output scope string = subscription().id
diff --git a/modules/authorization/policy-exemption/subscription/main.json b/modules/authorization/policy-exemption/subscription/main.json
deleted file mode 100644
index b9bce72b18..0000000000
--- a/modules/authorization/policy-exemption/subscription/main.json
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10613705515536903891"
- },
- "name": "Policy Exemptions (Subscription scope)",
- "description": "This module deploys a Policy Exemption at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy exemption. Maximum length is 64 characters for subscription scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the policy exemption. Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy exemption."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The policy exemption metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "exemptionCategory": {
- "type": "string",
- "defaultValue": "Mitigated",
- "allowedValues": [
- "Mitigated",
- "Waiver"
- ],
- "metadata": {
- "description": "Optional. The policy exemption category. Possible values are Waiver and Mitigated. Default is Mitigated."
- }
- },
- "policyAssignmentId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the policy assignment that is being exempted."
- }
- },
- "policyDefinitionReferenceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition."
- }
- },
- "expiresOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption. e.g. 2021-10-02T03:57:00.000Z."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "assignmentScopeValidation": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Default",
- "DoNotValidate"
- ],
- "metadata": {
- "description": "Optional. The option whether validate the exemption is at or under the assignment scope."
- }
- },
- "resourceSelectors": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource selector list to filter policies by resource properties."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policyExemptions",
- "apiVersion": "2022-07-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "exemptionCategory": "[parameters('exemptionCategory')]",
- "policyAssignmentId": "[parameters('policyAssignmentId')]",
- "policyDefinitionReferenceIds": "[if(not(empty(parameters('policyDefinitionReferenceIds'))), parameters('policyDefinitionReferenceIds'), createArray())]",
- "expiresOn": "[if(not(empty(parameters('expiresOn'))), parameters('expiresOn'), null())]",
- "assignmentScopeValidation": "[if(not(empty(parameters('assignmentScopeValidation'))), parameters('assignmentScopeValidation'), null())]",
- "resourceSelectors": "[parameters('resourceSelectors')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policyExemptions', parameters('name'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "Policy Exemption Scope."
- },
- "value": "[subscription().id]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-exemption/subscription/version.json b/modules/authorization/policy-exemption/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-exemption/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-exemption/tests/e2e/mg.common/main.test.bicep b/modules/authorization/policy-exemption/tests/e2e/mg.common/main.test.bicep
deleted file mode 100644
index 4832fa018c..0000000000
--- a/modules/authorization/policy-exemption/tests/e2e/mg.common/main.test.bicep
+++ /dev/null
@@ -1,115 +0,0 @@
-targetScope = 'managementGroup'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@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 = 'apemgcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-
-resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
- name: 'dep-${namePrefix}-polDef-AuditKvlt-${serviceShort}'
- properties: {
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- parameters: {
- effect: {
- allowedValues: [
- 'Audit'
- ]
- defaultValue: 'Audit'
- type: 'String'
- }
- }
- }
-}
-
-resource policySet 'Microsoft.Authorization/policySetDefinitions@2021-06-01' = {
- name: 'dep-${namePrefix}-polSet-${serviceShort}'
- properties: {
- policyDefinitions: [
- {
- parameters: {
- effect: {
- value: 'Audit'
- }
- }
- policyDefinitionId: policyDefinition.id
- policyDefinitionReferenceId: policyDefinition.name
- }
- ]
- }
-}
-
-resource policySetAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
- name: 'dep-${namePrefix}-psa-${serviceShort}'
- location: location
- properties: {
- displayName: 'Test case assignment'
- policyDefinitionId: policySet.id
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyAssignmentId: policySetAssignment.id
- displayName: '[Display Name] policy exempt (management group scope)'
- exemptionCategory: 'Waiver'
- expiresOn: '2025-10-02T03:57:00Z'
- metadata: {
- category: 'Security'
- }
- assignmentScopeValidation: 'Default'
- description: 'My description'
- resourceSelectors: [
- {
- name: 'TemporaryMitigation'
- selectors: [
- {
- kind: 'resourceLocation'
- in: [
- 'westcentralus'
- ]
- }
- ]
- }
- ]
- policyDefinitionReferenceIds: [
- policySet.properties.policyDefinitions[0].policyDefinitionReferenceId
- ]
- }
-}
diff --git a/modules/authorization/policy-exemption/tests/e2e/mg.min/main.test.bicep b/modules/authorization/policy-exemption/tests/e2e/mg.min/main.test.bicep
deleted file mode 100644
index d34ab40cdb..0000000000
--- a/modules/authorization/policy-exemption/tests/e2e/mg.min/main.test.bicep
+++ /dev/null
@@ -1,45 +0,0 @@
-targetScope = 'managementGroup'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@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 = 'apemgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource policyAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
- name: 'dep-${namePrefix}-${serviceShort}-rgloc'
- location: location
- properties: {
- displayName: '[Depedency] Audit resource location matches resource group location (management group scope)'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyAssignmentId: policyAssignment.id
- }
-}
diff --git a/modules/authorization/policy-exemption/tests/e2e/rg.common/main.test.bicep b/modules/authorization/policy-exemption/tests/e2e/rg.common/main.test.bicep
deleted file mode 100644
index 650cefa0b3..0000000000
--- a/modules/authorization/policy-exemption/tests/e2e/rg.common/main.test.bicep
+++ /dev/null
@@ -1,124 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.policyexemptions-${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 = 'apergcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
- name: 'dep-${namePrefix}-polDef-AuditKvlt-${serviceShort}'
- properties: {
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- parameters: {
- effect: {
- allowedValues: [
- 'Audit'
- ]
- defaultValue: 'Audit'
- type: 'String'
- }
- }
- }
-}
-
-resource policySet 'Microsoft.Authorization/policySetDefinitions@2021-06-01' = {
- name: 'dep-${namePrefix}-polSet-${serviceShort}'
- properties: {
- policyDefinitions: [
- {
- parameters: {
- effect: {
- value: 'Audit'
- }
- }
- policyDefinitionId: policyDefinition.id
- policyDefinitionReferenceId: policyDefinition.name
- }
- ]
- }
-}
-
-resource policySetAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
- name: 'dep-${namePrefix}-psa-${serviceShort}'
- location: location
- properties: {
- displayName: 'Test case assignment'
- policyDefinitionId: policySet.id
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyAssignmentId: policySetAssignment.id
- displayName: '[Display Name] policy exempt (resource group scope)'
- exemptionCategory: 'Waiver'
- expiresOn: '2025-10-02T03:57:00Z'
- metadata: {
- category: 'Security'
- }
- assignmentScopeValidation: 'Default'
- description: 'My description'
- resourceSelectors: [
- {
- name: 'TemporaryMitigation'
- selectors: [
- {
- kind: 'resourceLocation'
- in: [
- 'westcentralus'
- ]
- }
- ]
- }
- ]
- policyDefinitionReferenceIds: [
- policySet.properties.policyDefinitions[0].policyDefinitionReferenceId
- ]
- }
-}
diff --git a/modules/authorization/policy-exemption/tests/e2e/rg.min/main.test.bicep b/modules/authorization/policy-exemption/tests/e2e/rg.min/main.test.bicep
deleted file mode 100644
index 49828f611d..0000000000
--- a/modules/authorization/policy-exemption/tests/e2e/rg.min/main.test.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.policyexemptions-${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 = 'apergmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-resource policyAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
- name: 'dep-${namePrefix}-${serviceShort}-rgloc'
- location: location
- properties: {
- displayName: '[Depedency] Audit resource location matches resource group location (management group scope)'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyAssignmentId: policyAssignment.id
- }
-}
diff --git a/modules/authorization/policy-exemption/tests/e2e/sub.common/main.test.bicep b/modules/authorization/policy-exemption/tests/e2e/sub.common/main.test.bicep
deleted file mode 100644
index ac0f4d16eb..0000000000
--- a/modules/authorization/policy-exemption/tests/e2e/sub.common/main.test.bicep
+++ /dev/null
@@ -1,114 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@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 = 'apesubcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
- name: 'dep-${namePrefix}-polDef-AuditKvlt-${serviceShort}'
- properties: {
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- parameters: {
- effect: {
- allowedValues: [
- 'Audit'
- ]
- defaultValue: 'Audit'
- type: 'String'
- }
- }
- }
-}
-
-resource policySet 'Microsoft.Authorization/policySetDefinitions@2021-06-01' = {
- name: 'dep-${namePrefix}-polSet-${serviceShort}'
- properties: {
- policyDefinitions: [
- {
- parameters: {
- effect: {
- value: 'Audit'
- }
- }
- policyDefinitionId: policyDefinition.id
- policyDefinitionReferenceId: policyDefinition.name
- }
- ]
- }
-}
-
-resource policySetAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
- name: 'dep-${namePrefix}-psa-${serviceShort}'
- location: location
- properties: {
- displayName: 'Test case assignment'
- policyDefinitionId: policySet.id
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyAssignmentId: policySetAssignment.id
- displayName: '[Display Name] policy exempt (subscription scope)'
- exemptionCategory: 'Waiver'
- expiresOn: '2025-10-02T03:57:00Z'
- metadata: {
- category: 'Security'
- }
- assignmentScopeValidation: 'Default'
- description: 'My description'
- resourceSelectors: [
- {
- name: 'TemporaryMitigation'
- selectors: [
- {
- kind: 'resourceLocation'
- in: [
- 'westcentralus'
- ]
- }
- ]
- }
- ]
- policyDefinitionReferenceIds: [
- policySet.properties.policyDefinitions[0].policyDefinitionReferenceId
- ]
- }
-}
diff --git a/modules/authorization/policy-exemption/tests/e2e/sub.min/main.test.bicep b/modules/authorization/policy-exemption/tests/e2e/sub.min/main.test.bicep
deleted file mode 100644
index c3a5b57b44..0000000000
--- a/modules/authorization/policy-exemption/tests/e2e/sub.min/main.test.bicep
+++ /dev/null
@@ -1,45 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@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 = 'apesubmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource policyAssignment 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
- name: 'dep-${namePrefix}-${serviceShort}-rgloc'
- location: location
- properties: {
- displayName: '[Depedency] Audit resource location matches resource group location (management group scope)'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyAssignmentId: policyAssignment.id
- }
-}
diff --git a/modules/authorization/policy-exemption/version.json b/modules/authorization/policy-exemption/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-exemption/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-set-definition/README.md b/modules/authorization/policy-set-definition/README.md
index 7cca9b5479..7d85c3e0b9 100644
--- a/modules/authorization/policy-set-definition/README.md
+++ b/modules/authorization/policy-set-definition/README.md
@@ -1,663 +1,7 @@
-# Policy Set Definitions (Initiatives) (All scopes) `[Microsoft.Authorization/policySetDefinitions]`
+
-
-
-
-### Example 2: _Mg.Min_
-
-
-
-
-
-### Example 3: _Sub.Common_
-
-
-
-
-
-### Example 4: _Sub.Min_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy Set Definition (Initiative). |
-| [`policyDefinitions`](#parameter-policydefinitions) | array | The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The description name of the Set Definition (Initiative). |
-| [`displayName`](#parameter-displayname) | string | The display name of the Set Definition (Initiative). Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment. |
-| [`metadata`](#parameter-metadata) | object | The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`parameters`](#parameter-parameters) | object | The Set Definition (Initiative) parameters that can be used in policy definition references. |
-| [`policyDefinitionGroups`](#parameter-policydefinitiongroups) | array | The metadata describing groups of policy definition references within the Policy Set Definition (Initiative). |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The subscription ID of the subscription (Scope). Cannot be used with managementGroupId. |
-
-### Parameter: `name`
-
-Specifies the name of the policy Set Definition (Initiative).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitions`
-
-The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `description`
-
-The description name of the Set Definition (Initiative).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the Set Definition (Initiative). Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `metadata`
-
-The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `parameters`
-
-The Set Definition (Initiative) parameters that can be used in policy definition references.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionGroups`
-
-The metadata describing groups of policy definition references within the Policy Set Definition (Initiative).
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `subscriptionId`
-
-The subscription ID of the subscription (Scope). Cannot be used with managementGroupId.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Set Definition Name. |
-| `resourceId` | string | Policy Set Definition resource ID. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Module Usage Guidance
-
-In general, most of the resources under the `Microsoft.Authorization` namespace allows deploying resources at multiple scopes (management groups, subscriptions, resource groups). The `main.bicep` root module is simply an orchestrator module that targets sub-modules for different scopes as seen in the parameter usage section. All sub-modules for this namespace have folders that represent the target scope. For example, if the orchestrator module in the [root](main.bicep) needs to target 'subscription' level scopes. It will look at the relative path ['/subscription/main.bicep'](./subscription/main.bicep) and use this sub-module for the actual deployment, while still passing the same parameters from the root module.
-
-The above method is useful when you want to use a single point to interact with the module but rely on parameter combinations to achieve the target scope. But what if you want to incorporate this module in other modules with lower scopes? This would force you to deploy the module in scope `managementGroup` regardless and further require you to provide its ID with it. If you do not set the scope to management group, this would be the error that you can expect to face:
-
-```bicep
-Error BCP134: Scope "subscription" is not valid for this module. Permitted scopes: "managementGroup"
-```
-
-The solution is to have the option of directly targeting the sub-module that achieves the required scope. For example, if you have your own Bicep file wanting to create resources at the subscription level, and also use some of the modules from the `Microsoft.Authorization` namespace, then you can directly use the sub-module ['/subscription/main.bicep'](./subscription/main.bicep) as a path within your repository, or reference that same published module from the bicep registry. CARML also published the sub-modules so you would be able to reference it like the following:
-
-**Bicep Registry Reference**
-```bicep
-module policysetdefinition 'br:bicepregistry.azurecr.io/bicep/modules/authorization.policy-set-definition.subscription:version' = {}
-```
-**Local Path Reference**
-```bicep
-module policysetdefinition 'yourpath/module/authorization/policy-set-definition/subscription/main.bicep' = {}
-```
-
-### Parameter Usage: `managementGroupId`
-
-To deploy resource to a Management Group, provide the `managementGroupId` as an input parameter to the module.
-
-
-
-
-> `managementGroupId` is an optional parameter. If not provided, the deployment will use the management group defined in the current deployment scope (i.e. `managementGroup().name`).
-
-### Parameter Usage: `subscriptionId`
-
-To deploy resource to an Azure Subscription, provide the `subscriptionId` as an input parameter to the module. **Example**:
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/policy-set-definition/main.bicep b/modules/authorization/policy-set-definition/main.bicep
deleted file mode 100644
index c011271cdc..0000000000
--- a/modules/authorization/policy-set-definition/main.bicep
+++ /dev/null
@@ -1,93 +0,0 @@
-metadata name = 'Policy Set Definitions (Initiatives) (All scopes)'
-metadata description = 'This module deploys a Policy Set Definition (Initiative) at a Management Group or Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy Set Definition (Initiative).')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description name of the Set Definition (Initiative).')
-param description string = ''
-
-@sys.description('Optional. The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The subscription ID of the subscription (Scope). Cannot be used with managementGroupId.')
-param subscriptionId string = ''
-
-@sys.description('Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters.')
-param policyDefinitions array
-
-@sys.description('Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative).')
-param policyDefinitionGroups array = []
-
-@sys.description('Optional. The Set Definition (Initiative) parameters that can be used in policy definition references.')
-param parameters object = {}
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module policySetDefinition_mg 'management-group/main.bicep' = if (empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-PolicySetDefinition-MG-Module'
- scope: managementGroup(managementGroupId)
- params: {
- name: name
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- metadata: !empty(metadata) ? metadata : {}
- parameters: !empty(parameters) ? parameters : {}
- policyDefinitions: policyDefinitions
- policyDefinitionGroups: !empty(policyDefinitionGroups) ? policyDefinitionGroups : []
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module policySetDefinition_sub 'subscription/main.bicep' = if (!empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-PolicySetDefinition-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- name: name
- displayName: !empty(displayName) ? displayName : ''
- description: !empty(description) ? description : ''
- metadata: !empty(metadata) ? metadata : {}
- parameters: !empty(parameters) ? parameters : {}
- policyDefinitions: policyDefinitions
- policyDefinitionGroups: !empty(policyDefinitionGroups) ? policyDefinitionGroups : []
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@sys.description('Policy Set Definition Name.')
-output name string = empty(subscriptionId) ? policySetDefinition_mg.outputs.name : policySetDefinition_sub.outputs.name
-
-@sys.description('Policy Set Definition resource ID.')
-output resourceId string = empty(subscriptionId) ? policySetDefinition_mg.outputs.resourceId : policySetDefinition_sub.outputs.resourceId
diff --git a/modules/authorization/policy-set-definition/main.json b/modules/authorization/policy-set-definition/main.json
deleted file mode 100644
index d0051bf41a..0000000000
--- a/modules/authorization/policy-set-definition/main.json
+++ /dev/null
@@ -1,447 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "9153336425223705834"
- },
- "name": "Policy Set Definitions (Initiatives) (All scopes)",
- "description": "This module deploys a Policy Set Definition (Initiative) at a Management Group or Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy Set Definition (Initiative)."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description name of the Set Definition (Initiative)."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The group ID of the Management Group (Scope). If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The subscription ID of the subscription (Scope). Cannot be used with managementGroupId."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "policyDefinitions": {
- "type": "array",
- "metadata": {
- "description": "Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters."
- }
- },
- "policyDefinitionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative)."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) parameters that can be used in policy definition references."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[empty(parameters('subscriptionId'))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicySetDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))]",
- "scope": "[format('Microsoft.Management/managementGroups/{0}', parameters('managementGroupId'))]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "policyDefinitions": {
- "value": "[parameters('policyDefinitions')]"
- },
- "policyDefinitionGroups": "[if(not(empty(parameters('policyDefinitionGroups'))), createObject('value', parameters('policyDefinitionGroups')), createObject('value', createArray()))]",
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13574874097410910980"
- },
- "name": "Policy Set Definitions (Initiatives) (Management Group scope)",
- "description": "This module deploys a Policy Set Definition (Initiative) at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy Set Definition (Initiative)."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description name of the Set Definition (Initiative)."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "policyDefinitions": {
- "type": "array",
- "metadata": {
- "description": "Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters."
- }
- },
- "policyDefinitionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative)."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) parameters that can be used in policy definition references."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policySetDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyDefinitions": "[parameters('policyDefinitions')]",
- "policyDefinitionGroups": "[if(not(empty(parameters('policyDefinitionGroups'))), parameters('policyDefinitionGroups'), createArray())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policySetDefinitions', parameters('name'))]"
- }
- }
- }
- }
- },
- {
- "condition": "[not(empty(parameters('subscriptionId')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PolicySetDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('name')]"
- },
- "displayName": "[if(not(empty(parameters('displayName'))), createObject('value', parameters('displayName')), createObject('value', ''))]",
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "metadata": "[if(not(empty(parameters('metadata'))), createObject('value', parameters('metadata')), createObject('value', createObject()))]",
- "parameters": "[if(not(empty(parameters('parameters'))), createObject('value', parameters('parameters')), createObject('value', createObject()))]",
- "policyDefinitions": {
- "value": "[parameters('policyDefinitions')]"
- },
- "policyDefinitionGroups": "[if(not(empty(parameters('policyDefinitionGroups'))), createObject('value', parameters('policyDefinitionGroups')), createObject('value', createArray()))]",
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "566743094418434146"
- },
- "name": "Policy Set Definitions (Initiatives) (Subscription scope)",
- "description": "This module deploys a Policy Set Definition (Initiative) at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy Set Definition (Initiative). Maximum length is 64 characters for subscription scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description name of the Set Definition (Initiative)."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "policyDefinitions": {
- "type": "array",
- "metadata": {
- "description": "Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters."
- }
- },
- "policyDefinitionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative)."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) parameters that can be used in policy definition references."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policySetDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyDefinitions": "[parameters('policyDefinitions')]",
- "policyDefinitionGroups": "[if(not(empty(parameters('policyDefinitionGroups'))), parameters('policyDefinitionGroups'), createArray())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policySetDefinitions', parameters('name'))]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition Name."
- },
- "value": "[if(empty(parameters('subscriptionId')), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicySetDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicySetDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value)]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition resource ID."
- },
- "value": "[if(empty(parameters('subscriptionId')), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-PolicySetDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-PolicySetDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value)]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-set-definition/management-group/README.md b/modules/authorization/policy-set-definition/management-group/README.md
deleted file mode 100644
index b34845fcab..0000000000
--- a/modules/authorization/policy-set-definition/management-group/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Policy Set Definitions (Initiatives) (Management Group scope) `[Microsoft.Authorization/policySetDefinitions]`
-
-This module deploys a Policy Set Definition (Initiative) at a Management Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policySetDefinitions` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-06-01/policySetDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy Set Definition (Initiative). |
-| [`policyDefinitions`](#parameter-policydefinitions) | array | The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The description name of the Set Definition (Initiative). |
-| [`displayName`](#parameter-displayname) | string | The display name of the Set Definition (Initiative). Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`metadata`](#parameter-metadata) | object | The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`parameters`](#parameter-parameters) | object | The Set Definition (Initiative) parameters that can be used in policy definition references. |
-| [`policyDefinitionGroups`](#parameter-policydefinitiongroups) | array | The metadata describing groups of policy definition references within the Policy Set Definition (Initiative). |
-
-### Parameter: `name`
-
-Specifies the name of the policy Set Definition (Initiative).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitions`
-
-The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `description`
-
-The description name of the Set Definition (Initiative).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the Set Definition (Initiative). Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `parameters`
-
-The Set Definition (Initiative) parameters that can be used in policy definition references.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionGroups`
-
-The metadata describing groups of policy definition references within the Policy Set Definition (Initiative).
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Set Definition Name. |
-| `resourceId` | string | Policy Set Definition resource ID. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-set-definition/management-group/main.bicep b/modules/authorization/policy-set-definition/management-group/main.bicep
deleted file mode 100644
index 29f7971392..0000000000
--- a/modules/authorization/policy-set-definition/management-group/main.bicep
+++ /dev/null
@@ -1,66 +0,0 @@
-metadata name = 'Policy Set Definitions (Initiatives) (Management Group scope)'
-metadata description = 'This module deploys a Policy Set Definition (Initiative) at a Management Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Specifies the name of the policy Set Definition (Initiative).')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description name of the Set Definition (Initiative).')
-param description string = ''
-
-@sys.description('Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters.')
-param policyDefinitions array
-
-@sys.description('Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative).')
-param policyDefinitionGroups array = []
-
-@sys.description('Optional. The Set Definition (Initiative) parameters that can be used in policy definition references.')
-param parameters object = {}
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policySetDefinition 'Microsoft.Authorization/policySetDefinitions@2021-06-01' = {
- name: name
- properties: {
- policyType: 'Custom'
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- parameters: !empty(parameters) ? parameters : null
- policyDefinitions: policyDefinitions
- policyDefinitionGroups: !empty(policyDefinitionGroups) ? policyDefinitionGroups : []
- }
-}
-
-@sys.description('Policy Set Definition Name.')
-output name string = policySetDefinition.name
-
-@sys.description('Policy Set Definition resource ID.')
-output resourceId string = policySetDefinition.id
diff --git a/modules/authorization/policy-set-definition/management-group/main.json b/modules/authorization/policy-set-definition/management-group/main.json
deleted file mode 100644
index 9b627357b6..0000000000
--- a/modules/authorization/policy-set-definition/management-group/main.json
+++ /dev/null
@@ -1,126 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13574874097410910980"
- },
- "name": "Policy Set Definitions (Initiatives) (Management Group scope)",
- "description": "This module deploys a Policy Set Definition (Initiative) at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy Set Definition (Initiative)."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description name of the Set Definition (Initiative)."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "policyDefinitions": {
- "type": "array",
- "metadata": {
- "description": "Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters."
- }
- },
- "policyDefinitionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative)."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) parameters that can be used in policy definition references."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policySetDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyDefinitions": "[parameters('policyDefinitions')]",
- "policyDefinitionGroups": "[if(not(empty(parameters('policyDefinitionGroups'))), parameters('policyDefinitionGroups'), createArray())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition resource ID."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/policySetDefinitions', parameters('name'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-set-definition/management-group/version.json b/modules/authorization/policy-set-definition/management-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-set-definition/management-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-set-definition/subscription/README.md b/modules/authorization/policy-set-definition/subscription/README.md
deleted file mode 100644
index 1b567eeea5..0000000000
--- a/modules/authorization/policy-set-definition/subscription/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Policy Set Definitions (Initiatives) (Subscription scope) `[Microsoft.Authorization/policySetDefinitions]`
-
-This module deploys a Policy Set Definition (Initiative) at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policySetDefinitions` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-06-01/policySetDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the policy Set Definition (Initiative). Maximum length is 64 characters for subscription scope. |
-| [`policyDefinitions`](#parameter-policydefinitions) | array | The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The description name of the Set Definition (Initiative). |
-| [`displayName`](#parameter-displayname) | string | The display name of the Set Definition (Initiative). Maximum length is 128 characters. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`metadata`](#parameter-metadata) | object | The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs. |
-| [`parameters`](#parameter-parameters) | object | The Set Definition (Initiative) parameters that can be used in policy definition references. |
-| [`policyDefinitionGroups`](#parameter-policydefinitiongroups) | array | The metadata describing groups of policy definition references within the Policy Set Definition (Initiative). |
-
-### Parameter: `name`
-
-Specifies the name of the policy Set Definition (Initiative). Maximum length is 64 characters for subscription scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `policyDefinitions`
-
-The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `description`
-
-The description name of the Set Definition (Initiative).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The display name of the Set Definition (Initiative). Maximum length is 128 characters.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `metadata`
-
-The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `parameters`
-
-The Set Definition (Initiative) parameters that can be used in policy definition references.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policyDefinitionGroups`
-
-The metadata describing groups of policy definition references within the Policy Set Definition (Initiative).
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | Policy Set Definition Name. |
-| `resourceId` | string | Policy Set Definition resource ID. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/policy-set-definition/subscription/main.bicep b/modules/authorization/policy-set-definition/subscription/main.bicep
deleted file mode 100644
index 0442dc4946..0000000000
--- a/modules/authorization/policy-set-definition/subscription/main.bicep
+++ /dev/null
@@ -1,66 +0,0 @@
-metadata name = 'Policy Set Definitions (Initiatives) (Subscription scope)'
-metadata description = 'This module deploys a Policy Set Definition (Initiative) at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@sys.description('Required. Specifies the name of the policy Set Definition (Initiative). Maximum length is 64 characters for subscription scope.')
-@maxLength(64)
-param name string
-
-@sys.description('Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters.')
-@maxLength(128)
-param displayName string = ''
-
-@sys.description('Optional. The description name of the Set Definition (Initiative).')
-param description string = ''
-
-@sys.description('Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs.')
-param metadata object = {}
-
-@sys.description('Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters.')
-param policyDefinitions array
-
-@sys.description('Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative).')
-param policyDefinitionGroups array = []
-
-@sys.description('Optional. The Set Definition (Initiative) parameters that can be used in policy definition references.')
-param parameters object = {}
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource policySetDefinition 'Microsoft.Authorization/policySetDefinitions@2021-06-01' = {
- name: name
- properties: {
- policyType: 'Custom'
- displayName: !empty(displayName) ? displayName : null
- description: !empty(description) ? description : null
- metadata: !empty(metadata) ? metadata : null
- parameters: !empty(parameters) ? parameters : null
- policyDefinitions: policyDefinitions
- policyDefinitionGroups: !empty(policyDefinitionGroups) ? policyDefinitionGroups : []
- }
-}
-
-@sys.description('Policy Set Definition Name.')
-output name string = policySetDefinition.name
-
-@sys.description('Policy Set Definition resource ID.')
-output resourceId string = policySetDefinition.id
diff --git a/modules/authorization/policy-set-definition/subscription/main.json b/modules/authorization/policy-set-definition/subscription/main.json
deleted file mode 100644
index 4f8ea43907..0000000000
--- a/modules/authorization/policy-set-definition/subscription/main.json
+++ /dev/null
@@ -1,126 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "566743094418434146"
- },
- "name": "Policy Set Definitions (Initiatives) (Subscription scope)",
- "description": "This module deploys a Policy Set Definition (Initiative) at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 64,
- "metadata": {
- "description": "Required. Specifies the name of the policy Set Definition (Initiative). Maximum length is 64 characters for subscription scope."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "",
- "maxLength": 128,
- "metadata": {
- "description": "Optional. The display name of the Set Definition (Initiative). Maximum length is 128 characters."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description name of the Set Definition (Initiative)."
- }
- },
- "metadata": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) metadata. Metadata is an open ended object and is typically a collection of key-value pairs."
- }
- },
- "policyDefinitions": {
- "type": "array",
- "metadata": {
- "description": "Required. The array of Policy definitions object to include for this policy set. Each object must include the Policy definition ID, and optionally other properties like parameters."
- }
- },
- "policyDefinitionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The metadata describing groups of policy definition references within the Policy Set Definition (Initiative)."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The Set Definition (Initiative) parameters that can be used in policy definition references."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/policySetDefinitions",
- "apiVersion": "2021-06-01",
- "name": "[parameters('name')]",
- "properties": {
- "policyType": "Custom",
- "displayName": "[if(not(empty(parameters('displayName'))), parameters('displayName'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "metadata": "[if(not(empty(parameters('metadata'))), parameters('metadata'), null())]",
- "parameters": "[if(not(empty(parameters('parameters'))), parameters('parameters'), null())]",
- "policyDefinitions": "[parameters('policyDefinitions')]",
- "policyDefinitionGroups": "[if(not(empty(parameters('policyDefinitionGroups'))), parameters('policyDefinitionGroups'), createArray())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition Name."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "Policy Set Definition resource ID."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/policySetDefinitions', parameters('name'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/policy-set-definition/subscription/version.json b/modules/authorization/policy-set-definition/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-set-definition/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/policy-set-definition/tests/e2e/mg.common/main.test.bicep b/modules/authorization/policy-set-definition/tests/e2e/mg.common/main.test.bicep
deleted file mode 100644
index 0f5653cc1f..0000000000
--- a/modules/authorization/policy-set-definition/tests/e2e/mg.common/main.test.bicep
+++ /dev/null
@@ -1,71 +0,0 @@
-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 = 'apsdmgcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${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'
- metadata: {
- category: 'Security'
- version: '1'
- }
- policyDefinitionGroups: [
- {
- name: 'Network'
- }
- {
- name: 'ARM'
- }
- ]
- }
-}
diff --git a/modules/authorization/policy-set-definition/tests/e2e/mg.min/main.test.bicep b/modules/authorization/policy-set-definition/tests/e2e/mg.min/main.test.bicep
deleted file mode 100644
index 8ad45325f9..0000000000
--- a/modules/authorization/policy-set-definition/tests/e2e/mg.min/main.test.bicep
+++ /dev/null
@@ -1,38 +0,0 @@
-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'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitions: [
- {
- parameters: {
- listOfAllowedLocations: {
- value: [
- 'australiaeast'
- ]
- }
- }
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
- }
- ]
- }
-}
diff --git a/modules/authorization/policy-set-definition/tests/e2e/sub.common/main.test.bicep b/modules/authorization/policy-set-definition/tests/e2e/sub.common/main.test.bicep
deleted file mode 100644
index dfe66dba51..0000000000
--- a/modules/authorization/policy-set-definition/tests/e2e/sub.common/main.test.bicep
+++ /dev/null
@@ -1,71 +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 = 'apsdsubcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${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'
- }
- ]
- }
-}
diff --git a/modules/authorization/policy-set-definition/tests/e2e/sub.min/main.test.bicep b/modules/authorization/policy-set-definition/tests/e2e/sub.min/main.test.bicep
deleted file mode 100644
index 9057a849b5..0000000000
--- a/modules/authorization/policy-set-definition/tests/e2e/sub.min/main.test.bicep
+++ /dev/null
@@ -1,38 +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 = 'apsdsubmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policyDefinitions: [
- {
- parameters: {
- listOfAllowedLocations: {
- value: [
- 'australiaeast'
- ]
- }
- }
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
- }
- ]
- }
-}
diff --git a/modules/authorization/policy-set-definition/version.json b/modules/authorization/policy-set-definition/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/policy-set-definition/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-assignment/README.md b/modules/authorization/role-assignment/README.md
index f71f9cf46a..6027b0c16e 100644
--- a/modules/authorization/role-assignment/README.md
+++ b/modules/authorization/role-assignment/README.md
@@ -1,655 +1,7 @@
-# Role Assignments (All scopes) `[Microsoft.Authorization/roleAssignments]`
+
-
-
-
-### Example 2: _Mg.Min_
-
-
-
-
-
-### Example 3: _Rg.Common_
-
-
-
-
-
-### Example 4: _Rg.Min_
-
-
-
-
-
-### Example 5: _Sub.Common_
-
-
-
-
-
-### Example 6: _Sub.Min_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-principalid) | string | The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity). |
-| [`roleDefinitionIdOrName`](#parameter-roledefinitionidorname) | string | You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-condition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. |
-| [`conditionVersion`](#parameter-conditionversion) | string | Version of the condition. Currently accepted value is "2.0". |
-| [`delegatedManagedIdentityResourceId`](#parameter-delegatedmanagedidentityresourceid) | string | ID of the delegated managed identity resource. |
-| [`description`](#parameter-description) | string | The description of the role assignment. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment. |
-| [`principalType`](#parameter-principaltype) | string | The principal type of the assigned principal ID. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | Name of the Resource Group to assign the RBAC role to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided RBAC role to the resource group. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | Subscription ID of the subscription to assign the RBAC role to. If no Resource Group name is provided, the module deploys at subscription level, therefore assigns the provided RBAC role to the subscription. |
-
-### Parameter: `principalId`
-
-The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleDefinitionIdOrName`
-
-You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `conditionVersion`
-
-Version of the condition. Currently accepted value is "2.0".
-
-- Required: No
-- Type: string
-- Default: `'2.0'`
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `delegatedManagedIdentityResourceId`
-
-ID of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `resourceGroupName`
-
-Name of the Resource Group to assign the RBAC role to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided RBAC role to the resource group.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subscriptionId`
-
-Subscription ID of the subscription to assign the RBAC role to. If no Resource Group name is provided, the module deploys at subscription level, therefore assigns the provided RBAC role to the subscription.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Assignment. |
-| `resourceId` | string | The resource ID of the Role Assignment. |
-| `scope` | string | The scope this Role Assignment applies to. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Module Usage Guidance
-
-In general, most of the resources under the `Microsoft.Authorization` namespace allows deploying resources at multiple scopes (management groups, subscriptions, resource groups). The `main.bicep` root module is simply an orchestrator module that targets sub-modules for different scopes as seen in the parameter usage section. All sub-modules for this namespace have folders that represent the target scope. For example, if the orchestrator module in the [root](main.bicep) needs to target 'subscription' level scopes. It will look at the relative path ['/subscription/main.bicep'](./subscription/main.bicep) and use this sub-module for the actual deployment, while still passing the same parameters from the root module.
-
-The above method is useful when you want to use a single point to interact with the module but rely on parameter combinations to achieve the target scope. But what if you want to incorporate this module in other modules with lower scopes? This would force you to deploy the module in scope `managementGroup` regardless and further require you to provide its ID with it. If you do not set the scope to management group, this would be the error that you can expect to face:
-
-```bicep
-Error BCP134: Scope "subscription" is not valid for this module. Permitted scopes: "managementGroup"
-```
-
-The solution is to have the option of directly targeting the sub-module that achieves the required scope. For example, if you have your own Bicep file wanting to create resources at the subscription level, and also use some of the modules from the `Microsoft.Authorization` namespace, then you can directly use the sub-module ['/subscription/main.bicep'](./subscription/main.bicep) as a path within your repository, or reference that same published module from the bicep registry. CARML also published the sub-modules so you would be able to reference it like the following:
-
-**Bicep Registry Reference**
-```bicep
-module roleassignment 'br:bicepregistry.azurecr.io/bicep/modules/authorization.role-assignment.subscription:version' = {}
-```
-**Local Path Reference**
-```bicep
-module roleassignment 'yourpath/module/authorization/role-assignment/subscription/main.bicep' = {}
-```
-
-### Parameter Usage: `managementGroupId`
-
-To deploy resource to a Management Group, provide the `managementGroupId` as an input parameter to the module.
-
-
-
-
-> `managementGroupId` is an optional parameter. If not provided, the deployment will use the management group defined in the current deployment scope (i.e. `managementGroup().name`).
-
-### Parameter Usage: `subscriptionId`
-
-To deploy resource to an Azure Subscription, provide the `subscriptionId` as an input parameter to the module. **Example**:
-
-
-
-### Parameter Usage: `resourceGroupName`
-
-To deploy resource to a Resource Group, provide the `subscriptionId` and `resourceGroupName` as an input parameter to the module. **Example**:
-
-
-
-> The `subscriptionId` is used to enable deployment to a Resource Group Scope, allowing the use of the `resourceGroup()` function from a Management Group Scope. [Additional Details](https://github.com/Azure/bicep/pull/1420).
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/role-assignment/main.bicep b/modules/authorization/role-assignment/main.bicep
deleted file mode 100644
index 829c6f4267..0000000000
--- a/modules/authorization/role-assignment/main.bicep
+++ /dev/null
@@ -1,127 +0,0 @@
-metadata name = 'Role Assignments (All scopes)'
-metadata description = 'This module deploys a Role Assignment at a Management Group, Subscription or Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleDefinitionIdOrName string
-
-@sys.description('Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).')
-param principalId string
-
-@sys.description('Optional. Name of the Resource Group to assign the RBAC role to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided RBAC role to the resource group.')
-param resourceGroupName string = ''
-
-@sys.description('Optional. Subscription ID of the subscription to assign the RBAC role to. If no Resource Group name is provided, the module deploys at subscription level, therefore assigns the provided RBAC role to the subscription.')
-param subscriptionId string = ''
-
-@sys.description('Optional. Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. The description of the role assignment.')
-param description string = ''
-
-@sys.description('Optional. ID of the delegated managed identity resource.')
-param delegatedManagedIdentityResourceId string = ''
-
-@sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to.')
-param condition string = ''
-
-@sys.description('Optional. Version of the condition. Currently accepted value is "2.0".')
-@allowed([
- '2.0'
-])
-param conditionVersion string = '2.0'
-
-@sys.description('Optional. The principal type of the assigned principal ID.')
-@allowed([
- 'ServicePrincipal'
- 'Group'
- 'User'
- 'ForeignGroup'
- 'Device'
- ''
-])
-param principalType string = ''
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module roleAssignment_mg 'management-group/main.bicep' = if (empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-RoleAssignment-MG-Module'
- scope: managementGroup(managementGroupId)
- params: {
- roleDefinitionIdOrName: roleDefinitionIdOrName
- principalId: principalId
- managementGroupId: managementGroupId
- description: !empty(description) ? description : ''
- principalType: !empty(principalType) ? principalType : ''
- delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : ''
- conditionVersion: conditionVersion
- condition: !empty(condition) ? condition : ''
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module roleAssignment_sub 'subscription/main.bicep' = if (!empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-RoleAssignment-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- roleDefinitionIdOrName: roleDefinitionIdOrName
- principalId: principalId
- subscriptionId: subscriptionId
- description: !empty(description) ? description : ''
- principalType: !empty(principalType) ? principalType : ''
- delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : ''
- conditionVersion: conditionVersion
- condition: !empty(condition) ? condition : ''
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module roleAssignment_rg 'resource-group/main.bicep' = if (!empty(resourceGroupName) && !empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-RoleAssignment-RG-Module'
- scope: resourceGroup(subscriptionId, resourceGroupName)
- params: {
- roleDefinitionIdOrName: roleDefinitionIdOrName
- principalId: principalId
- subscriptionId: subscriptionId
- resourceGroupName: resourceGroupName
- description: !empty(description) ? description : ''
- principalType: !empty(principalType) ? principalType : ''
- delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : ''
- conditionVersion: conditionVersion
- condition: !empty(condition) ? condition : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@sys.description('The GUID of the Role Assignment.')
-output name string = empty(subscriptionId) && empty(resourceGroupName) ? roleAssignment_mg.outputs.name : (!empty(subscriptionId) && empty(resourceGroupName) ? roleAssignment_sub.outputs.name : roleAssignment_rg.outputs.name)
-
-@sys.description('The resource ID of the Role Assignment.')
-output resourceId string = empty(subscriptionId) && empty(resourceGroupName) ? roleAssignment_mg.outputs.resourceId : (!empty(subscriptionId) && empty(resourceGroupName) ? roleAssignment_sub.outputs.resourceId : roleAssignment_rg.outputs.resourceId)
-
-@sys.description('The scope this Role Assignment applies to.')
-output scope string = empty(subscriptionId) && empty(resourceGroupName) ? roleAssignment_mg.outputs.scope : (!empty(subscriptionId) && empty(resourceGroupName) ? roleAssignment_sub.outputs.scope : roleAssignment_rg.outputs.scope)
diff --git a/modules/authorization/role-assignment/main.json b/modules/authorization/role-assignment/main.json
deleted file mode 100644
index 6311a9275b..0000000000
--- a/modules/authorization/role-assignment/main.json
+++ /dev/null
@@ -1,750 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2040051567998498237"
- },
- "name": "Role Assignments (All scopes)",
- "description": "This module deploys a Role Assignment at a Management Group, Subscription or Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of the Resource Group to assign the RBAC role to. If Resource Group name is provided, and Subscription ID is provided, the module deploys at resource group level, therefore assigns the provided RBAC role to the resource group."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Subscription ID of the subscription to assign the RBAC role to. If no Resource Group name is provided, the module deploys at subscription level, therefore assigns the provided RBAC role to the subscription."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RoleAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))]",
- "scope": "[format('Microsoft.Management/managementGroups/{0}', parameters('managementGroupId'))]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "roleDefinitionIdOrName": {
- "value": "[parameters('roleDefinitionIdOrName')]"
- },
- "principalId": {
- "value": "[parameters('principalId')]"
- },
- "managementGroupId": {
- "value": "[parameters('managementGroupId')]"
- },
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "principalType": "[if(not(empty(parameters('principalType'))), createObject('value', parameters('principalType')), createObject('value', ''))]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), createObject('value', parameters('delegatedManagedIdentityResourceId')), createObject('value', ''))]",
- "conditionVersion": {
- "value": "[parameters('conditionVersion')]"
- },
- "condition": "[if(not(empty(parameters('condition'))), createObject('value', parameters('condition')), createObject('value', ''))]",
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1817613308362702007"
- },
- "name": "Role Assignments (Management Group scope)",
- "description": "This module deploys a Role Assignment at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Resource Policy Contributor": "/providers/Microsoft.Authorization/roleDefinitions/36243c78-bf99-498c-9df9-86d9f8d28608",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- },
- "roleDefinitionIdVar": "[if(contains(variables('builtInRoleNames'), parameters('roleDefinitionIdOrName')), variables('builtInRoleNames')[parameters('roleDefinitionIdOrName')], parameters('roleDefinitionIdOrName'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('managementGroupId'), variables('roleDefinitionIdVar'), parameters('principalId'))]",
- "properties": {
- "roleDefinitionId": "[variables('roleDefinitionIdVar')]",
- "principalId": "[parameters('principalId')]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "principalType": "[if(not(empty(parameters('principalType'))), parameters('principalType'), null())]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), parameters('delegatedManagedIdentityResourceId'), null())]",
- "conditionVersion": "[if(and(not(empty(parameters('conditionVersion'))), not(empty(parameters('condition')))), parameters('conditionVersion'), null())]",
- "condition": "[if(not(empty(parameters('condition'))), parameters('condition'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[guid(parameters('managementGroupId'), variables('roleDefinitionIdVar'), parameters('principalId'))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/roleAssignments', guid(parameters('managementGroupId'), variables('roleDefinitionIdVar'), parameters('principalId')))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[resourceId('Microsoft.Management/managementGroups', parameters('managementGroupId'))]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RoleAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "roleDefinitionIdOrName": {
- "value": "[parameters('roleDefinitionIdOrName')]"
- },
- "principalId": {
- "value": "[parameters('principalId')]"
- },
- "subscriptionId": {
- "value": "[parameters('subscriptionId')]"
- },
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "principalType": "[if(not(empty(parameters('principalType'))), createObject('value', parameters('principalType')), createObject('value', ''))]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), createObject('value', parameters('delegatedManagedIdentityResourceId')), createObject('value', ''))]",
- "conditionVersion": {
- "value": "[parameters('conditionVersion')]"
- },
- "condition": "[if(not(empty(parameters('condition'))), createObject('value', parameters('condition')), createObject('value', ''))]",
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "4243689736369983310"
- },
- "name": "Role Assignments (Subscription scope)",
- "description": "This module deploys a Role Assignment at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- },
- "roleDefinitionIdVar": "[if(contains(variables('builtInRoleNames'), parameters('roleDefinitionIdOrName')), variables('builtInRoleNames')[parameters('roleDefinitionIdOrName')], parameters('roleDefinitionIdOrName'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), variables('roleDefinitionIdVar'), parameters('principalId'))]",
- "properties": {
- "roleDefinitionId": "[variables('roleDefinitionIdVar')]",
- "principalId": "[parameters('principalId')]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "principalType": "[if(not(empty(parameters('principalType'))), parameters('principalType'), null())]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), parameters('delegatedManagedIdentityResourceId'), null())]",
- "conditionVersion": "[if(and(not(empty(parameters('conditionVersion'))), not(empty(parameters('condition')))), parameters('conditionVersion'), null())]",
- "condition": "[if(not(empty(parameters('condition'))), parameters('condition'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[guid(parameters('subscriptionId'), variables('roleDefinitionIdVar'), parameters('principalId'))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/roleAssignments', guid(parameters('subscriptionId'), variables('roleDefinitionIdVar'), parameters('principalId')))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[subscription().id]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId'))))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RoleAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "resourceGroup": "[parameters('resourceGroupName')]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "roleDefinitionIdOrName": {
- "value": "[parameters('roleDefinitionIdOrName')]"
- },
- "principalId": {
- "value": "[parameters('principalId')]"
- },
- "subscriptionId": {
- "value": "[parameters('subscriptionId')]"
- },
- "resourceGroupName": {
- "value": "[parameters('resourceGroupName')]"
- },
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "principalType": "[if(not(empty(parameters('principalType'))), createObject('value', parameters('principalType')), createObject('value', ''))]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), createObject('value', parameters('delegatedManagedIdentityResourceId')), createObject('value', ''))]",
- "conditionVersion": {
- "value": "[parameters('conditionVersion')]"
- },
- "condition": "[if(not(empty(parameters('condition'))), createObject('value', parameters('condition')), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1089537449035070857"
- },
- "name": "Role Assignments (Resource Group scope)",
- "description": "This module deploys a Role Assignment at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. Name of the Resource Group to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- },
- "roleDefinitionIdVar": "[if(contains(variables('builtInRoleNames'), parameters('roleDefinitionIdOrName')), variables('builtInRoleNames')[parameters('roleDefinitionIdOrName')], parameters('roleDefinitionIdOrName'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), parameters('resourceGroupName'), variables('roleDefinitionIdVar'), parameters('principalId'))]",
- "properties": {
- "roleDefinitionId": "[variables('roleDefinitionIdVar')]",
- "principalId": "[parameters('principalId')]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "principalType": "[if(not(empty(parameters('principalType'))), parameters('principalType'), null())]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), parameters('delegatedManagedIdentityResourceId'), null())]",
- "conditionVersion": "[if(and(not(empty(parameters('conditionVersion'))), not(empty(parameters('condition')))), parameters('conditionVersion'), null())]",
- "condition": "[if(not(empty(parameters('condition'))), parameters('condition'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[guid(parameters('subscriptionId'), parameters('resourceGroupName'), variables('roleDefinitionIdVar'), parameters('principalId'))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[resourceId('Microsoft.Authorization/roleAssignments', guid(parameters('subscriptionId'), parameters('resourceGroupName'), variables('roleDefinitionIdVar'), parameters('principalId')))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the role assignment was applied at."
- },
- "value": "[resourceGroup().name]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[resourceGroup().id]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-RoleAssignment-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-assignment/management-group/README.md b/modules/authorization/role-assignment/management-group/README.md
deleted file mode 100644
index e021e05271..0000000000
--- a/modules/authorization/role-assignment/management-group/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# Role Assignments (Management Group scope) `[Microsoft.Authorization/roleAssignments]`
-
-This module deploys a Role Assignment at a Management Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-principalid) | string | The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity). |
-| [`roleDefinitionIdOrName`](#parameter-roledefinitionidorname) | string | You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-condition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. |
-| [`conditionVersion`](#parameter-conditionversion) | string | Version of the condition. Currently accepted value is "2.0". |
-| [`delegatedManagedIdentityResourceId`](#parameter-delegatedmanagedidentityresourceid) | string | ID of the delegated managed identity resource. |
-| [`description`](#parameter-description) | string | The description of the role assignment. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment. |
-| [`principalType`](#parameter-principaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `principalId`
-
-The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleDefinitionIdOrName`
-
-You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `conditionVersion`
-
-Version of the condition. Currently accepted value is "2.0".
-
-- Required: No
-- Type: string
-- Default: `'2.0'`
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `delegatedManagedIdentityResourceId`
-
-ID of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Assignment. |
-| `resourceId` | string | The resource ID of the Role Assignment. |
-| `scope` | string | The scope this Role Assignment applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/role-assignment/management-group/main.bicep b/modules/authorization/role-assignment/management-group/main.bicep
deleted file mode 100644
index 382599a094..0000000000
--- a/modules/authorization/role-assignment/management-group/main.bicep
+++ /dev/null
@@ -1,92 +0,0 @@
-metadata name = 'Role Assignments (Management Group scope)'
-metadata description = 'This module deploys a Role Assignment at a Management Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleDefinitionIdOrName string
-
-@sys.description('Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).')
-param principalId string
-
-@sys.description('Optional. Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The description of the role assignment.')
-param description string = ''
-
-@sys.description('Optional. ID of the delegated managed identity resource.')
-param delegatedManagedIdentityResourceId string = ''
-
-@sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to.')
-param condition string = ''
-
-@sys.description('Optional. Version of the condition. Currently accepted value is "2.0".')
-@allowed([
- '2.0'
-])
-param conditionVersion string = '2.0'
-
-@sys.description('Optional. The principal type of the assigned principal ID.')
-@allowed([
- 'ServicePrincipal'
- 'Group'
- 'User'
- 'ForeignGroup'
- 'Device'
- ''
-])
-param principalType string = ''
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Resource Policy Contributor': '/providers/Microsoft.Authorization/roleDefinitions/36243c78-bf99-498c-9df9-86d9f8d28608'
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-var roleDefinitionIdVar = (contains(builtInRoleNames, roleDefinitionIdOrName) ? builtInRoleNames[roleDefinitionIdOrName] : roleDefinitionIdOrName)
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(managementGroupId, roleDefinitionIdVar, principalId)
- properties: {
- roleDefinitionId: roleDefinitionIdVar
- principalId: principalId
- description: !empty(description) ? description : null
- principalType: !empty(principalType) ? any(principalType) : null
- delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : null
- conditionVersion: !empty(conditionVersion) && !empty(condition) ? conditionVersion : null
- condition: !empty(condition) ? condition : null
- }
-}
-
-@sys.description('The GUID of the Role Assignment.')
-output name string = roleAssignment.name
-
-@sys.description('The resource ID of the Role Assignment.')
-output resourceId string = roleAssignment.id
-
-@sys.description('The scope this Role Assignment applies to.')
-output scope string = az.resourceId('Microsoft.Management/managementGroups', managementGroupId)
diff --git a/modules/authorization/role-assignment/management-group/main.json b/modules/authorization/role-assignment/management-group/main.json
deleted file mode 100644
index ed5c032329..0000000000
--- a/modules/authorization/role-assignment/management-group/main.json
+++ /dev/null
@@ -1,160 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1817613308362702007"
- },
- "name": "Role Assignments (Management Group scope)",
- "description": "This module deploys a Role Assignment at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. Group ID of the Management Group to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Resource Policy Contributor": "/providers/Microsoft.Authorization/roleDefinitions/36243c78-bf99-498c-9df9-86d9f8d28608",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- },
- "roleDefinitionIdVar": "[if(contains(variables('builtInRoleNames'), parameters('roleDefinitionIdOrName')), variables('builtInRoleNames')[parameters('roleDefinitionIdOrName')], parameters('roleDefinitionIdOrName'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('managementGroupId'), variables('roleDefinitionIdVar'), parameters('principalId'))]",
- "properties": {
- "roleDefinitionId": "[variables('roleDefinitionIdVar')]",
- "principalId": "[parameters('principalId')]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "principalType": "[if(not(empty(parameters('principalType'))), parameters('principalType'), null())]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), parameters('delegatedManagedIdentityResourceId'), null())]",
- "conditionVersion": "[if(and(not(empty(parameters('conditionVersion'))), not(empty(parameters('condition')))), parameters('conditionVersion'), null())]",
- "condition": "[if(not(empty(parameters('condition'))), parameters('condition'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[guid(parameters('managementGroupId'), variables('roleDefinitionIdVar'), parameters('principalId'))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/roleAssignments', guid(parameters('managementGroupId'), variables('roleDefinitionIdVar'), parameters('principalId')))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[resourceId('Microsoft.Management/managementGroups', parameters('managementGroupId'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-assignment/management-group/version.json b/modules/authorization/role-assignment/management-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-assignment/management-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-assignment/resource-group/README.md b/modules/authorization/role-assignment/resource-group/README.md
deleted file mode 100644
index 1a09562d67..0000000000
--- a/modules/authorization/role-assignment/resource-group/README.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# Role Assignments (Resource Group scope) `[Microsoft.Authorization/roleAssignments]`
-
-This module deploys a Role Assignment at a Resource Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-principalid) | string | The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity). |
-| [`roleDefinitionIdOrName`](#parameter-roledefinitionidorname) | string | You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-condition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. |
-| [`conditionVersion`](#parameter-conditionversion) | string | Version of the condition. Currently accepted value is "2.0". |
-| [`delegatedManagedIdentityResourceId`](#parameter-delegatedmanagedidentityresourceid) | string | ID of the delegated managed identity resource. |
-| [`description`](#parameter-description) | string | The description of the role assignment. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`principalType`](#parameter-principaltype) | string | The principal type of the assigned principal ID. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | Name of the Resource Group to assign the RBAC role to. If not provided, will use the current scope for deployment. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment. |
-
-### Parameter: `principalId`
-
-The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleDefinitionIdOrName`
-
-You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `conditionVersion`
-
-Version of the condition. Currently accepted value is "2.0".
-
-- Required: No
-- Type: string
-- Default: `'2.0'`
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `delegatedManagedIdentityResourceId`
-
-ID of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `resourceGroupName`
-
-Name of the Resource Group to assign the RBAC role to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().name]`
-
-### Parameter: `subscriptionId`
-
-Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[subscription().subscriptionId]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Assignment. |
-| `resourceGroupName` | string | The name of the resource group the role assignment was applied at. |
-| `resourceId` | string | The resource ID of the Role Assignment. |
-| `scope` | string | The scope this Role Assignment applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/role-assignment/resource-group/main.bicep b/modules/authorization/role-assignment/resource-group/main.bicep
deleted file mode 100644
index 4382d3694d..0000000000
--- a/modules/authorization/role-assignment/resource-group/main.bicep
+++ /dev/null
@@ -1,93 +0,0 @@
-metadata name = 'Role Assignments (Resource Group scope)'
-metadata description = 'This module deploys a Role Assignment at a Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'resourceGroup'
-
-@sys.description('Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleDefinitionIdOrName string
-
-@sys.description('Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).')
-param principalId string
-
-@sys.description('Optional. Name of the Resource Group to assign the RBAC role to. If not provided, will use the current scope for deployment.')
-param resourceGroupName string = resourceGroup().name
-
-@sys.description('Optional. Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment.')
-param subscriptionId string = subscription().subscriptionId
-
-@sys.description('Optional. The description of the role assignment.')
-param description string = ''
-
-@sys.description('Optional. ID of the delegated managed identity resource.')
-param delegatedManagedIdentityResourceId string = ''
-
-@sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to.')
-param condition string = ''
-
-@sys.description('Optional. Version of the condition. Currently accepted value is "2.0".')
-@allowed([
- '2.0'
-])
-param conditionVersion string = '2.0'
-
-@sys.description('Optional. The principal type of the assigned principal ID.')
-@allowed([
- 'ServicePrincipal'
- 'Group'
- 'User'
- 'ForeignGroup'
- 'Device'
- ''
-])
-param principalType string = ''
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-var roleDefinitionIdVar = (contains(builtInRoleNames, roleDefinitionIdOrName) ? builtInRoleNames[roleDefinitionIdOrName] : roleDefinitionIdOrName)
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(subscriptionId, resourceGroupName, roleDefinitionIdVar, principalId)
- properties: {
- roleDefinitionId: roleDefinitionIdVar
- principalId: principalId
- description: !empty(description) ? description : null
- principalType: !empty(principalType) ? any(principalType) : null
- delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : null
- conditionVersion: !empty(conditionVersion) && !empty(condition) ? conditionVersion : null
- condition: !empty(condition) ? condition : null
- }
-}
-
-@sys.description('The GUID of the Role Assignment.')
-output name string = roleAssignment.name
-
-@sys.description('The resource ID of the Role Assignment.')
-output resourceId string = roleAssignment.id
-
-@sys.description('The name of the resource group the role assignment was applied at.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The scope this Role Assignment applies to.')
-output scope string = resourceGroup().id
diff --git a/modules/authorization/role-assignment/resource-group/main.json b/modules/authorization/role-assignment/resource-group/main.json
deleted file mode 100644
index 48d6001058..0000000000
--- a/modules/authorization/role-assignment/resource-group/main.json
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1089537449035070857"
- },
- "name": "Role Assignments (Resource Group scope)",
- "description": "This module deploys a Role Assignment at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. Name of the Resource Group to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- },
- "roleDefinitionIdVar": "[if(contains(variables('builtInRoleNames'), parameters('roleDefinitionIdOrName')), variables('builtInRoleNames')[parameters('roleDefinitionIdOrName')], parameters('roleDefinitionIdOrName'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), parameters('resourceGroupName'), variables('roleDefinitionIdVar'), parameters('principalId'))]",
- "properties": {
- "roleDefinitionId": "[variables('roleDefinitionIdVar')]",
- "principalId": "[parameters('principalId')]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "principalType": "[if(not(empty(parameters('principalType'))), parameters('principalType'), null())]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), parameters('delegatedManagedIdentityResourceId'), null())]",
- "conditionVersion": "[if(and(not(empty(parameters('conditionVersion'))), not(empty(parameters('condition')))), parameters('conditionVersion'), null())]",
- "condition": "[if(not(empty(parameters('condition'))), parameters('condition'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[guid(parameters('subscriptionId'), parameters('resourceGroupName'), variables('roleDefinitionIdVar'), parameters('principalId'))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[resourceId('Microsoft.Authorization/roleAssignments', guid(parameters('subscriptionId'), parameters('resourceGroupName'), variables('roleDefinitionIdVar'), parameters('principalId')))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the role assignment was applied at."
- },
- "value": "[resourceGroup().name]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[resourceGroup().id]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-assignment/resource-group/version.json b/modules/authorization/role-assignment/resource-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-assignment/resource-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-assignment/subscription/README.md b/modules/authorization/role-assignment/subscription/README.md
deleted file mode 100644
index 7f0b4ada16..0000000000
--- a/modules/authorization/role-assignment/subscription/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# Role Assignments (Subscription scope) `[Microsoft.Authorization/roleAssignments]`
-
-This module deploys a Role Assignment at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-principalid) | string | The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity). |
-| [`roleDefinitionIdOrName`](#parameter-roledefinitionidorname) | string | You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-condition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. |
-| [`conditionVersion`](#parameter-conditionversion) | string | Version of the condition. Currently accepted value is "2.0". |
-| [`delegatedManagedIdentityResourceId`](#parameter-delegatedmanagedidentityresourceid) | string | ID of the delegated managed identity resource. |
-| [`description`](#parameter-description) | string | The description of the role assignment. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`principalType`](#parameter-principaltype) | string | The principal type of the assigned principal ID. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment. |
-
-### Parameter: `principalId`
-
-The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleDefinitionIdOrName`
-
-You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `conditionVersion`
-
-Version of the condition. Currently accepted value is "2.0".
-
-- Required: No
-- Type: string
-- Default: `'2.0'`
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `delegatedManagedIdentityResourceId`
-
-ID of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `subscriptionId`
-
-Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[subscription().subscriptionId]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Assignment. |
-| `resourceId` | string | The resource ID of the Role Assignment. |
-| `scope` | string | The scope this Role Assignment applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/role-assignment/subscription/main.bicep b/modules/authorization/role-assignment/subscription/main.bicep
deleted file mode 100644
index 277e9c2a15..0000000000
--- a/modules/authorization/role-assignment/subscription/main.bicep
+++ /dev/null
@@ -1,90 +0,0 @@
-metadata name = 'Role Assignments (Subscription scope)'
-metadata description = 'This module deploys a Role Assignment at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@sys.description('Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleDefinitionIdOrName string
-
-@sys.description('Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity).')
-param principalId string
-
-@sys.description('Optional. Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment.')
-param subscriptionId string = subscription().subscriptionId
-
-@sys.description('Optional. The description of the role assignment.')
-param description string = ''
-
-@sys.description('Optional. ID of the delegated managed identity resource.')
-param delegatedManagedIdentityResourceId string = ''
-
-@sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to.')
-param condition string = ''
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Version of the condition. Currently accepted value is "2.0".')
-@allowed([
- '2.0'
-])
-param conditionVersion string = '2.0'
-
-@sys.description('Optional. The principal type of the assigned principal ID.')
-@allowed([
- 'ServicePrincipal'
- 'Group'
- 'User'
- 'ForeignGroup'
- 'Device'
- ''
-])
-param principalType string = ''
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-var roleDefinitionIdVar = (contains(builtInRoleNames, roleDefinitionIdOrName) ? builtInRoleNames[roleDefinitionIdOrName] : roleDefinitionIdOrName)
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(subscriptionId, roleDefinitionIdVar, principalId)
- properties: {
- roleDefinitionId: roleDefinitionIdVar
- principalId: principalId
- description: !empty(description) ? description : null
- principalType: !empty(principalType) ? any(principalType) : null
- delegatedManagedIdentityResourceId: !empty(delegatedManagedIdentityResourceId) ? delegatedManagedIdentityResourceId : null
- conditionVersion: !empty(conditionVersion) && !empty(condition) ? conditionVersion : null
- condition: !empty(condition) ? condition : null
- }
-}
-
-@sys.description('The GUID of the Role Assignment.')
-output name string = roleAssignment.name
-
-@sys.description('The resource ID of the Role Assignment.')
-output resourceId string = roleAssignment.id
-@sys.description('The scope this Role Assignment applies to.')
-output scope string = subscription().id
diff --git a/modules/authorization/role-assignment/subscription/main.json b/modules/authorization/role-assignment/subscription/main.json
deleted file mode 100644
index 5557d18578..0000000000
--- a/modules/authorization/role-assignment/subscription/main.json
+++ /dev/null
@@ -1,159 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "4243689736369983310"
- },
- "name": "Role Assignments (Subscription scope)",
- "description": "This module deploys a Role Assignment at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. You can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Principal or Object ID of the Security Principal (User, Group, Service Principal, Managed Identity)."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. Subscription ID of the subscription to assign the RBAC role to. If not provided, will use the current scope for deployment."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the delegated managed identity resource."
- }
- },
- "condition": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "conditionVersion": {
- "type": "string",
- "defaultValue": "2.0",
- "allowedValues": [
- "2.0"
- ],
- "metadata": {
- "description": "Optional. Version of the condition. Currently accepted value is \"2.0\"."
- }
- },
- "principalType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "ServicePrincipal",
- "Group",
- "User",
- "ForeignGroup",
- "Device",
- ""
- ],
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- },
- "roleDefinitionIdVar": "[if(contains(variables('builtInRoleNames'), parameters('roleDefinitionIdOrName')), variables('builtInRoleNames')[parameters('roleDefinitionIdOrName')], parameters('roleDefinitionIdOrName'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('subscriptionId'), variables('roleDefinitionIdVar'), parameters('principalId'))]",
- "properties": {
- "roleDefinitionId": "[variables('roleDefinitionIdVar')]",
- "principalId": "[parameters('principalId')]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "principalType": "[if(not(empty(parameters('principalType'))), parameters('principalType'), null())]",
- "delegatedManagedIdentityResourceId": "[if(not(empty(parameters('delegatedManagedIdentityResourceId'))), parameters('delegatedManagedIdentityResourceId'), null())]",
- "conditionVersion": "[if(and(not(empty(parameters('conditionVersion'))), not(empty(parameters('condition')))), parameters('conditionVersion'), null())]",
- "condition": "[if(not(empty(parameters('condition'))), parameters('condition'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Assignment."
- },
- "value": "[guid(parameters('subscriptionId'), variables('roleDefinitionIdVar'), parameters('principalId'))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Assignment."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/roleAssignments', guid(parameters('subscriptionId'), variables('roleDefinitionIdVar'), parameters('principalId')))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Assignment applies to."
- },
- "value": "[subscription().id]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-assignment/subscription/version.json b/modules/authorization/role-assignment/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-assignment/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-assignment/tests/e2e/mg.common/dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/mg.common/dependencies.bicep
deleted file mode 100644
index d367770432..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/mg.common/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/authorization/role-assignment/tests/e2e/mg.common/interim.dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/mg.common/interim.dependencies.bicep
deleted file mode 100644
index b6b3cef622..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/mg.common/interim.dependencies.bicep
+++ /dev/null
@@ -1,27 +0,0 @@
-targetScope = 'subscription'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Required. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: managedIdentityName
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = nestedDependencies.outputs.managedIdentityPrincipalId
diff --git a/modules/authorization/role-assignment/tests/e2e/mg.common/main.test.bicep b/modules/authorization/role-assignment/tests/e2e/mg.common/main.test.bicep
deleted file mode 100644
index 336f3cd4bd..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/mg.common/main.test.bicep
+++ /dev/null
@@ -1,53 +0,0 @@
-targetScope = 'managementGroup'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roleassignments-${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 = 'aramgcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-module nestedDependencies 'interim.dependencies.bicep' = {
- scope: subscription('[[subscriptionId]]')
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- resourceGroupName: resourceGroupName
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Backup Reader'
- description: 'Role Assignment (management group scope)'
- managementGroupId: last(split(managementGroup().id, '/'))
- principalType: 'ServicePrincipal'
- }
-}
diff --git a/modules/authorization/role-assignment/tests/e2e/mg.min/dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/mg.min/dependencies.bicep
deleted file mode 100644
index d367770432..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/mg.min/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/authorization/role-assignment/tests/e2e/mg.min/interim.dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/mg.min/interim.dependencies.bicep
deleted file mode 100644
index b6b3cef622..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/mg.min/interim.dependencies.bicep
+++ /dev/null
@@ -1,27 +0,0 @@
-targetScope = 'subscription'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Required. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: managedIdentityName
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = nestedDependencies.outputs.managedIdentityPrincipalId
diff --git a/modules/authorization/role-assignment/tests/e2e/mg.min/main.test.bicep b/modules/authorization/role-assignment/tests/e2e/mg.min/main.test.bicep
deleted file mode 100644
index 62cc16085c..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/mg.min/main.test.bicep
+++ /dev/null
@@ -1,51 +0,0 @@
-targetScope = 'managementGroup'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roleassignments-${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 = 'aramgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-module nestedDependencies 'interim.dependencies.bicep' = {
- scope: subscription('[[subscriptionId]]')
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- resourceGroupName: resourceGroupName
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Storage Queue Data Reader'
- principalType: 'ServicePrincipal'
- }
-}
diff --git a/modules/authorization/role-assignment/tests/e2e/rg.common/dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/rg.common/dependencies.bicep
deleted file mode 100644
index 5681a89989..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/rg.common/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/authorization/role-assignment/tests/e2e/rg.common/main.test.bicep b/modules/authorization/role-assignment/tests/e2e/rg.common/main.test.bicep
deleted file mode 100644
index c4a6b7ea07..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/rg.common/main.test.bicep
+++ /dev/null
@@ -1,58 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roleassignments-${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 = 'arargcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Backup Reader'
- description: 'Role Assignment (resource group scope)'
- principalType: 'ServicePrincipal'
- resourceGroupName: resourceGroup.name
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/role-assignment/tests/e2e/rg.min/dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/rg.min/dependencies.bicep
deleted file mode 100644
index 5681a89989..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/rg.min/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/authorization/role-assignment/tests/e2e/rg.min/main.test.bicep b/modules/authorization/role-assignment/tests/e2e/rg.min/main.test.bicep
deleted file mode 100644
index ca2f37a9ab..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/rg.min/main.test.bicep
+++ /dev/null
@@ -1,57 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roleassignments-${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 = 'arargmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Storage Queue Data Reader'
- principalType: 'ServicePrincipal'
- resourceGroupName: resourceGroup.name
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/role-assignment/tests/e2e/sub.common/dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/sub.common/dependencies.bicep
deleted file mode 100644
index 5681a89989..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/sub.common/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/authorization/role-assignment/tests/e2e/sub.common/main.test.bicep b/modules/authorization/role-assignment/tests/e2e/sub.common/main.test.bicep
deleted file mode 100644
index 77a6b7883c..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/sub.common/main.test.bicep
+++ /dev/null
@@ -1,56 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roleassignments-${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 = 'arasubcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Backup Reader'
- description: 'Role Assignment (subscription scope)'
- principalType: 'ServicePrincipal'
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/role-assignment/tests/e2e/sub.min/dependencies.bicep b/modules/authorization/role-assignment/tests/e2e/sub.min/dependencies.bicep
deleted file mode 100644
index 5681a89989..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/sub.min/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/authorization/role-assignment/tests/e2e/sub.min/main.test.bicep b/modules/authorization/role-assignment/tests/e2e/sub.min/main.test.bicep
deleted file mode 100644
index 90242be1d0..0000000000
--- a/modules/authorization/role-assignment/tests/e2e/sub.min/main.test.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roleassignments-${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 = 'arasubmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Storage Queue Data Reader'
- principalType: 'ServicePrincipal'
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/role-assignment/version.json b/modules/authorization/role-assignment/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-assignment/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-definition/README.md b/modules/authorization/role-definition/README.md
index 626454d49c..0f890cee33 100644
--- a/modules/authorization/role-definition/README.md
+++ b/modules/authorization/role-definition/README.md
@@ -1,719 +1,7 @@
-# Role Definitions (All scopes) `[Microsoft.Authorization/roleDefinitions]`
+
-
-
-
-### Example 2: _Mg.Min_
-
-
-
-
-
-### Example 3: _Rg.Common_
-
-
-
-
-
-### Example 4: _Rg.Min_
-
-
-
-
-
-### Example 5: _Sub.Common_
-
-
-
-
-
-### Example 6: _Sub.Min_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`roleName`](#parameter-rolename) | string | Name of the custom RBAC role to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | List of allowed actions. |
-| [`assignableScopes`](#parameter-assignablescopes) | array | Role definition assignable scopes. If not provided, will use the current scope provided. |
-| [`dataActions`](#parameter-dataactions) | array | List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes. |
-| [`description`](#parameter-description) | string | Description of the custom RBAC role to be created. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment. |
-| [`notActions`](#parameter-notactions) | array | List of denied actions. |
-| [`notDataActions`](#parameter-notdataactions) | array | List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | The name of the Resource Group where the Role Definition and Target Scope will be applied to. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The subscription ID where the Role Definition and Target Scope will be applied to. Use for both Subscription level and Resource Group Level. |
-
-### Parameter: `roleName`
-
-Name of the custom RBAC role to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actions`
-
-List of allowed actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `assignableScopes`
-
-Role definition assignable scopes. If not provided, will use the current scope provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dataActions`
-
-List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-Description of the custom RBAC role to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `notActions`
-
-List of denied actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notDataActions`
-
-List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `resourceGroupName`
-
-The name of the Resource Group where the Role Definition and Target Scope will be applied to.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subscriptionId`
-
-The subscription ID where the Role Definition and Target Scope will be applied to. Use for both Subscription level and Resource Group Level.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Definition. |
-| `resourceId` | string | The resource ID of the Role Definition. |
-| `scope` | string | The scope this Role Definition applies to. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Module Usage Guidance
-
-In general, most of the resources under the `Microsoft.Authorization` namespace allows deploying resources at multiple scopes (management groups, subscriptions, resource groups). The `main.bicep` root module is simply an orchestrator module that targets sub-modules for different scopes as seen in the parameter usage section. All sub-modules for this namespace have folders that represent the target scope. For example, if the orchestrator module in the [root](main.bicep) needs to target 'subscription' level scopes. It will look at the relative path ['/subscription/main.bicep'](./subscription/main.bicep) and use this sub-module for the actual deployment, while still passing the same parameters from the root module.
-
-The above method is useful when you want to use a single point to interact with the module but rely on parameter combinations to achieve the target scope. But what if you want to incorporate this module in other modules with lower scopes? This would force you to deploy the module in scope `managementGroup` regardless and further require you to provide its ID with it. If you do not set the scope to management group, this would be the error that you can expect to face:
-
-```bicep
-Error BCP134: Scope "subscription" is not valid for this module. Permitted scopes: "managementGroup"
-```
-
-The solution is to have the option of directly targeting the sub-module that achieves the required scope. For example, if you have your own Bicep file wanting to create resources at the subscription level, and also use some of the modules from the `Microsoft.Authorization` namespace, then you can directly use the sub-module ['/subscription/main.bicep'](./subscription/main.bicep) as a path within your repository, or reference that same published module from the bicep registry. CARML also published the sub-modules so you would be able to reference it like the following:
-
-**Bicep Registry Reference**
-```bicep
-module roledefinition 'br:bicepregistry.azurecr.io/bicep/modules/authorization.role-definition.subscription:version' = {}
-```
-**Local Path Reference**
-```bicep
-module roledefinition 'yourpath/module/authorization/role-definition/subscription/main.bicep' = {}
-```
-
-### Parameter Usage: `managementGroupId`
-
-To deploy resource to a Management Group, provide the `managementGroupId` as an input parameter to the module.
-
-
-
-> `managementGroupId` is an optional parameter. If not provided, the deployment will use the management group defined in the current deployment scope (i.e. `managementGroup().name`).
-
-### Parameter Usage: `subscriptionId`
-
-To deploy resource to an Azure Subscription, provide the `subscriptionId` as an input parameter to the module. **Example**:
-
-
-
-
-### Parameter Usage: `resourceGroupName`
-
-To deploy resource to a Resource Group, provide the `subscriptionId` and `resourceGroupName` as an input parameter to the module. **Example**:
-
-
-
-> The `subscriptionId` is used to enable deployment to a Resource Group Scope, allowing the use of the `resourceGroup()` function from a Management Group Scope. [Additional Details](https://github.com/Azure/bicep/pull/1420).
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/authorization/role-definition/main.bicep b/modules/authorization/role-definition/main.bicep
deleted file mode 100644
index 2e9db282b8..0000000000
--- a/modules/authorization/role-definition/main.bicep
+++ /dev/null
@@ -1,114 +0,0 @@
-metadata name = 'Role Definitions (All scopes)'
-metadata description = 'This module deploys a Role Definition at a Management Group, Subscription or Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Name of the custom RBAC role to be created.')
-param roleName string
-
-@sys.description('Optional. Description of the custom RBAC role to be created.')
-param description string = ''
-
-@sys.description('Optional. List of allowed actions.')
-param actions array = []
-
-@sys.description('Optional. List of denied actions.')
-param notActions array = []
-
-@sys.description('Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes.')
-param dataActions array = []
-
-@sys.description('Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes.')
-param notDataActions array = []
-
-@sys.description('Optional. The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. The subscription ID where the Role Definition and Target Scope will be applied to. Use for both Subscription level and Resource Group Level.')
-param subscriptionId string = ''
-
-@sys.description('Optional. The name of the Resource Group where the Role Definition and Target Scope will be applied to.')
-param resourceGroupName string = ''
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Role definition assignable scopes. If not provided, will use the current scope provided.')
-param assignableScopes array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module roleDefinition_mg 'management-group/main.bicep' = if (empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-RoleDefinition-MG-Module'
- scope: managementGroup(managementGroupId)
- params: {
- roleName: roleName
- description: !empty(description) ? description : ''
- actions: !empty(actions) ? actions : []
- notActions: !empty(notActions) ? notActions : []
- assignableScopes: !empty(assignableScopes) ? assignableScopes : []
- managementGroupId: managementGroupId
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module roleDefinition_sub 'subscription/main.bicep' = if (!empty(subscriptionId) && empty(resourceGroupName)) {
- name: '${uniqueString(deployment().name, location)}-RoleDefinition-Sub-Module'
- scope: subscription(subscriptionId)
- params: {
- roleName: roleName
- description: !empty(description) ? description : ''
- actions: !empty(actions) ? actions : []
- notActions: !empty(notActions) ? notActions : []
- dataActions: !empty(dataActions) ? dataActions : []
- notDataActions: !empty(notDataActions) ? notDataActions : []
- assignableScopes: !empty(assignableScopes) ? assignableScopes : []
- subscriptionId: subscriptionId
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module roleDefinition_rg 'resource-group/main.bicep' = if (!empty(resourceGroupName) && !empty(subscriptionId)) {
- name: '${uniqueString(deployment().name, location)}-RoleDefinition-RG-Module'
- scope: resourceGroup(subscriptionId, resourceGroupName)
- params: {
- roleName: roleName
- description: !empty(description) ? description : ''
- actions: !empty(actions) ? actions : []
- notActions: !empty(notActions) ? notActions : []
- dataActions: !empty(dataActions) ? dataActions : []
- notDataActions: !empty(notDataActions) ? notDataActions : []
- assignableScopes: !empty(assignableScopes) ? assignableScopes : []
- subscriptionId: subscriptionId
- resourceGroupName: resourceGroupName
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-@sys.description('The GUID of the Role Definition.')
-output name string = empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_mg.outputs.name : (!empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_sub.outputs.name : roleDefinition_rg.outputs.name)
-
-@sys.description('The resource ID of the Role Definition.')
-output resourceId string = empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_mg.outputs.resourceId : (!empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_sub.outputs.resourceId : roleDefinition_rg.outputs.resourceId)
-
-@sys.description('The scope this Role Definition applies to.')
-output scope string = empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_mg.outputs.scope : (!empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_sub.outputs.scope : roleDefinition_rg.outputs.scope)
diff --git a/modules/authorization/role-definition/main.json b/modules/authorization/role-definition/main.json
deleted file mode 100644
index 51ac23254d..0000000000
--- a/modules/authorization/role-definition/main.json
+++ /dev/null
@@ -1,664 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16702773762135222765"
- },
- "name": "Role Definitions (All scopes)",
- "description": "This module deploys a Role Definition at a Management Group, Subscription or Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "dataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "notDataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The subscription ID where the Role Definition and Target Scope will be applied to. Use for both Subscription level and Resource Group Level."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the Resource Group where the Role Definition and Target Scope will be applied to."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "condition": "[and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RoleDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))]",
- "scope": "[format('Microsoft.Management/managementGroups/{0}', parameters('managementGroupId'))]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "roleName": {
- "value": "[parameters('roleName')]"
- },
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "actions": "[if(not(empty(parameters('actions'))), createObject('value', parameters('actions')), createObject('value', createArray()))]",
- "notActions": "[if(not(empty(parameters('notActions'))), createObject('value', parameters('notActions')), createObject('value', createArray()))]",
- "assignableScopes": "[if(not(empty(parameters('assignableScopes'))), createObject('value', parameters('assignableScopes')), createObject('value', createArray()))]",
- "managementGroupId": {
- "value": "[parameters('managementGroupId')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5277764931156995532"
- },
- "name": "Role Definitions (Management Group scope)",
- "description": "This module deploys a Role Definition at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleDefinitions",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('roleName'), parameters('managementGroupId'))]",
- "properties": {
- "roleName": "[parameters('roleName')]",
- "description": "[parameters('description')]",
- "type": "customRole",
- "permissions": [
- {
- "actions": "[parameters('actions')]",
- "notActions": "[parameters('notActions')]"
- }
- ],
- "assignableScopes": "[if(equals(parameters('assignableScopes'), createArray()), array(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId'))), parameters('assignableScopes'))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[guid(parameters('roleName'), parameters('managementGroupId'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[managementGroup().id]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/roleDefinitions', guid(parameters('roleName'), parameters('managementGroupId')))]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RoleDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "location": "[deployment().location]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "roleName": {
- "value": "[parameters('roleName')]"
- },
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "actions": "[if(not(empty(parameters('actions'))), createObject('value', parameters('actions')), createObject('value', createArray()))]",
- "notActions": "[if(not(empty(parameters('notActions'))), createObject('value', parameters('notActions')), createObject('value', createArray()))]",
- "dataActions": "[if(not(empty(parameters('dataActions'))), createObject('value', parameters('dataActions')), createObject('value', createArray()))]",
- "notDataActions": "[if(not(empty(parameters('notDataActions'))), createObject('value', parameters('notDataActions')), createObject('value', createArray()))]",
- "assignableScopes": "[if(not(empty(parameters('assignableScopes'))), createObject('value', parameters('assignableScopes')), createObject('value', createArray()))]",
- "subscriptionId": {
- "value": "[parameters('subscriptionId')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5911596219403447648"
- },
- "name": "Role Definitions (Subscription scope)",
- "description": "This module deploys a Role Definition at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "dataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "notDataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleDefinitions",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('roleName'), parameters('subscriptionId'))]",
- "properties": {
- "roleName": "[parameters('roleName')]",
- "description": "[parameters('description')]",
- "type": "customRole",
- "permissions": [
- {
- "actions": "[parameters('actions')]",
- "notActions": "[parameters('notActions')]",
- "dataActions": "[parameters('dataActions')]",
- "notDataActions": "[parameters('notDataActions')]"
- }
- ],
- "assignableScopes": "[if(not(empty(parameters('assignableScopes'))), parameters('assignableScopes'), array(subscription().id))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[guid(parameters('roleName'), parameters('subscriptionId'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[subscription().id]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', guid(parameters('roleName'), parameters('subscriptionId')))]"
- }
- }
- }
- }
- },
- {
- "condition": "[and(not(empty(parameters('resourceGroupName'))), not(empty(parameters('subscriptionId'))))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RoleDefinition-RG-Module', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[parameters('subscriptionId')]",
- "resourceGroup": "[parameters('resourceGroupName')]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "roleName": {
- "value": "[parameters('roleName')]"
- },
- "description": "[if(not(empty(parameters('description'))), createObject('value', parameters('description')), createObject('value', ''))]",
- "actions": "[if(not(empty(parameters('actions'))), createObject('value', parameters('actions')), createObject('value', createArray()))]",
- "notActions": "[if(not(empty(parameters('notActions'))), createObject('value', parameters('notActions')), createObject('value', createArray()))]",
- "dataActions": "[if(not(empty(parameters('dataActions'))), createObject('value', parameters('dataActions')), createObject('value', createArray()))]",
- "notDataActions": "[if(not(empty(parameters('notDataActions'))), createObject('value', parameters('notDataActions')), createObject('value', createArray()))]",
- "assignableScopes": "[if(not(empty(parameters('assignableScopes'))), createObject('value', parameters('assignableScopes')), createObject('value', createArray()))]",
- "subscriptionId": {
- "value": "[parameters('subscriptionId')]"
- },
- "resourceGroupName": {
- "value": "[parameters('resourceGroupName')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15123790149450958610"
- },
- "name": "Role Definitions (Resource Group scope)",
- "description": "This module deploys a Role Definition at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "dataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "notDataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. The name of the Resource Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleDefinitions",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('roleName'), parameters('subscriptionId'), parameters('resourceGroupName'))]",
- "properties": {
- "roleName": "[parameters('roleName')]",
- "description": "[parameters('description')]",
- "type": "customRole",
- "permissions": [
- {
- "actions": "[parameters('actions')]",
- "notActions": "[parameters('notActions')]",
- "dataActions": "[parameters('dataActions')]",
- "notDataActions": "[parameters('notDataActions')]"
- }
- ],
- "assignableScopes": "[if(equals(parameters('assignableScopes'), createArray()), array(resourceGroup().id), parameters('assignableScopes'))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[guid(parameters('roleName'), parameters('subscriptionId'), parameters('resourceGroupName'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[resourceGroup().id]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[resourceId('Microsoft.Authorization/roleDefinitions', guid(parameters('roleName'), parameters('subscriptionId'), parameters('resourceGroupName')))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the role definition was created at."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.name.value))]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.resourceId.value))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[if(and(empty(parameters('subscriptionId')), empty(parameters('resourceGroupName'))), reference(extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId')), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-MG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, if(and(not(empty(parameters('subscriptionId'))), empty(parameters('resourceGroupName'))), reference(subscriptionResourceId(parameters('subscriptionId'), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-Sub-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', parameters('subscriptionId'), parameters('resourceGroupName')), 'Microsoft.Resources/deployments', format('{0}-RoleDefinition-RG-Module', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.scope.value))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-definition/management-group/README.md b/modules/authorization/role-definition/management-group/README.md
deleted file mode 100644
index 0c9b29c7a5..0000000000
--- a/modules/authorization/role-definition/management-group/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# Role Definitions (Management Group scope) `[Microsoft.Authorization/roleDefinitions]`
-
-This module deploys a Role Definition at a Management Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleDefinitions` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`roleName`](#parameter-rolename) | string | Name of the custom RBAC role to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | List of allowed actions. |
-| [`assignableScopes`](#parameter-assignablescopes) | array | Role definition assignable scopes. If not provided, will use the current scope provided. |
-| [`description`](#parameter-description) | string | Description of the custom RBAC role to be created. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`managementGroupId`](#parameter-managementgroupid) | string | The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment. |
-| [`notActions`](#parameter-notactions) | array | List of denied actions. |
-
-### Parameter: `roleName`
-
-Name of the custom RBAC role to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actions`
-
-List of allowed actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `assignableScopes`
-
-Role definition assignable scopes. If not provided, will use the current scope provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-Description of the custom RBAC role to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `managementGroupId`
-
-The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[managementGroup().name]`
-
-### Parameter: `notActions`
-
-List of denied actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Definition. |
-| `resourceId` | string | The resource ID of the Role Definition. |
-| `scope` | string | The scope this Role Definition applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/role-definition/management-group/main.bicep b/modules/authorization/role-definition/management-group/main.bicep
deleted file mode 100644
index 0a382f224f..0000000000
--- a/modules/authorization/role-definition/management-group/main.bicep
+++ /dev/null
@@ -1,67 +0,0 @@
-metadata name = 'Role Definitions (Management Group scope)'
-metadata description = 'This module deploys a Role Definition at a Management Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'managementGroup'
-
-@sys.description('Required. Name of the custom RBAC role to be created.')
-param roleName string
-
-@sys.description('Optional. Description of the custom RBAC role to be created.')
-param description string = ''
-
-@sys.description('Optional. List of allowed actions.')
-param actions array = []
-
-@sys.description('Optional. List of denied actions.')
-param notActions array = []
-
-@sys.description('Optional. The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.')
-param managementGroupId string = managementGroup().name
-
-@sys.description('Optional. Role definition assignable scopes. If not provided, will use the current scope provided.')
-param assignableScopes array = []
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource roleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' = {
- name: guid(roleName, managementGroupId)
- properties: {
- roleName: roleName
- description: description
- type: 'customRole'
- permissions: [
- {
- actions: actions
- notActions: notActions
- }
- ]
- assignableScopes: assignableScopes == [] ? array(tenantResourceId('Microsoft.Management/managementGroups', managementGroupId)) : assignableScopes
- }
-}
-
-@sys.description('The GUID of the Role Definition.')
-output name string = roleDefinition.name
-
-@sys.description('The scope this Role Definition applies to.')
-output scope string = managementGroup().id
-
-@sys.description('The resource ID of the Role Definition.')
-output resourceId string = roleDefinition.id
diff --git a/modules/authorization/role-definition/management-group/main.json b/modules/authorization/role-definition/management-group/main.json
deleted file mode 100644
index 00d197b4e8..0000000000
--- a/modules/authorization/role-definition/management-group/main.json
+++ /dev/null
@@ -1,128 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5277764931156995532"
- },
- "name": "Role Definitions (Management Group scope)",
- "description": "This module deploys a Role Definition at a Management Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "managementGroupId": {
- "type": "string",
- "defaultValue": "[managementGroup().name]",
- "metadata": {
- "description": "Optional. The group ID of the Management Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleDefinitions",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('roleName'), parameters('managementGroupId'))]",
- "properties": {
- "roleName": "[parameters('roleName')]",
- "description": "[parameters('description')]",
- "type": "customRole",
- "permissions": [
- {
- "actions": "[parameters('actions')]",
- "notActions": "[parameters('notActions')]"
- }
- ],
- "assignableScopes": "[if(equals(parameters('assignableScopes'), createArray()), array(tenantResourceId('Microsoft.Management/managementGroups', parameters('managementGroupId'))), parameters('assignableScopes'))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[guid(parameters('roleName'), parameters('managementGroupId'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[managementGroup().id]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[extensionResourceId(managementGroup().id, 'Microsoft.Authorization/roleDefinitions', guid(parameters('roleName'), parameters('managementGroupId')))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-definition/management-group/version.json b/modules/authorization/role-definition/management-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-definition/management-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-definition/resource-group/README.md b/modules/authorization/role-definition/resource-group/README.md
deleted file mode 100644
index f8a299f434..0000000000
--- a/modules/authorization/role-definition/resource-group/README.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Role Definitions (Resource Group scope) `[Microsoft.Authorization/roleDefinitions]`
-
-This module deploys a Role Definition at a Resource Group scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleDefinitions` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`roleName`](#parameter-rolename) | string | Name of the custom RBAC role to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | List of allowed actions. |
-| [`assignableScopes`](#parameter-assignablescopes) | array | Role definition assignable scopes. If not provided, will use the current scope provided. |
-| [`dataActions`](#parameter-dataactions) | array | List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes. |
-| [`description`](#parameter-description) | string | Description of the custom RBAC role to be created. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`notActions`](#parameter-notactions) | array | List of denied actions. |
-| [`notDataActions`](#parameter-notdataactions) | array | List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes. |
-| [`resourceGroupName`](#parameter-resourcegroupname) | string | The name of the Resource Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment. |
-
-### Parameter: `roleName`
-
-Name of the custom RBAC role to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actions`
-
-List of allowed actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `assignableScopes`
-
-Role definition assignable scopes. If not provided, will use the current scope provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dataActions`
-
-List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-Description of the custom RBAC role to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `notActions`
-
-List of denied actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notDataActions`
-
-List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `resourceGroupName`
-
-The name of the Resource Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().name]`
-
-### Parameter: `subscriptionId`
-
-The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[subscription().subscriptionId]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Definition. |
-| `resourceGroupName` | string | The name of the resource group the role definition was created at. |
-| `resourceId` | string | The resource ID of the Role Definition. |
-| `scope` | string | The scope this Role Definition applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/role-definition/resource-group/main.bicep b/modules/authorization/role-definition/resource-group/main.bicep
deleted file mode 100644
index c79207c1c5..0000000000
--- a/modules/authorization/role-definition/resource-group/main.bicep
+++ /dev/null
@@ -1,77 +0,0 @@
-metadata name = 'Role Definitions (Resource Group scope)'
-metadata description = 'This module deploys a Role Definition at a Resource Group scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'resourceGroup'
-
-@sys.description('Required. Name of the custom RBAC role to be created.')
-param roleName string
-
-@sys.description('Optional. Description of the custom RBAC role to be created.')
-param description string = ''
-
-@sys.description('Optional. List of allowed actions.')
-param actions array = []
-
-@sys.description('Optional. List of denied actions.')
-param notActions array = []
-
-@sys.description('Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes.')
-param dataActions array = []
-
-@sys.description('Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes.')
-param notDataActions array = []
-
-@sys.description('Optional. The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.')
-param subscriptionId string = subscription().subscriptionId
-
-@sys.description('Optional. The name of the Resource Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.')
-param resourceGroupName string = resourceGroup().name
-
-@sys.description('Optional. Role definition assignable scopes. If not provided, will use the current scope provided.')
-param assignableScopes array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource roleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' = {
- name: guid(roleName, subscriptionId, resourceGroupName)
- properties: {
- roleName: roleName
- description: description
- type: 'customRole'
- permissions: [
- {
- actions: actions
- notActions: notActions
- dataActions: dataActions
- notDataActions: notDataActions
- }
- ]
- assignableScopes: assignableScopes == [] ? array(resourceGroup().id) : assignableScopes
- }
-}
-
-@sys.description('The GUID of the Role Definition.')
-output name string = roleDefinition.name
-
-@sys.description('The scope this Role Definition applies to.')
-output scope string = resourceGroup().id
-
-@sys.description('The resource ID of the Role Definition.')
-output resourceId string = roleDefinition.id
-
-@sys.description('The name of the resource group the role definition was created at.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/authorization/role-definition/resource-group/main.json b/modules/authorization/role-definition/resource-group/main.json
deleted file mode 100644
index c10d685cc7..0000000000
--- a/modules/authorization/role-definition/resource-group/main.json
+++ /dev/null
@@ -1,150 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15123790149450958610"
- },
- "name": "Role Definitions (Resource Group scope)",
- "description": "This module deploys a Role Definition at a Resource Group scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "dataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "notDataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "resourceGroupName": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. The name of the Resource Group where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleDefinitions",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('roleName'), parameters('subscriptionId'), parameters('resourceGroupName'))]",
- "properties": {
- "roleName": "[parameters('roleName')]",
- "description": "[parameters('description')]",
- "type": "customRole",
- "permissions": [
- {
- "actions": "[parameters('actions')]",
- "notActions": "[parameters('notActions')]",
- "dataActions": "[parameters('dataActions')]",
- "notDataActions": "[parameters('notDataActions')]"
- }
- ],
- "assignableScopes": "[if(equals(parameters('assignableScopes'), createArray()), array(resourceGroup().id), parameters('assignableScopes'))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[guid(parameters('roleName'), parameters('subscriptionId'), parameters('resourceGroupName'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[resourceGroup().id]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[resourceId('Microsoft.Authorization/roleDefinitions', guid(parameters('roleName'), parameters('subscriptionId'), parameters('resourceGroupName')))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the role definition was created at."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-definition/resource-group/version.json b/modules/authorization/role-definition/resource-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-definition/resource-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-definition/subscription/README.md b/modules/authorization/role-definition/subscription/README.md
deleted file mode 100644
index 5737fd2aff..0000000000
--- a/modules/authorization/role-definition/subscription/README.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# Role Definitions (Subscription scope) `[Microsoft.Authorization/roleDefinitions]`
-
-This module deploys a Role Definition at a Subscription scope.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleDefinitions` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleDefinitions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`roleName`](#parameter-rolename) | string | Name of the custom RBAC role to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | List of allowed actions. |
-| [`assignableScopes`](#parameter-assignablescopes) | array | Role definition assignable scopes. If not provided, will use the current scope provided. |
-| [`dataActions`](#parameter-dataactions) | array | List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes. |
-| [`description`](#parameter-description) | string | Description of the custom RBAC role to be created. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`notActions`](#parameter-notactions) | array | List of denied actions. |
-| [`notDataActions`](#parameter-notdataactions) | array | List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes. |
-| [`subscriptionId`](#parameter-subscriptionid) | string | The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment. |
-
-### Parameter: `roleName`
-
-Name of the custom RBAC role to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actions`
-
-List of allowed actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `assignableScopes`
-
-Role definition assignable scopes. If not provided, will use the current scope provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dataActions`
-
-List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-Description of the custom RBAC role to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `notActions`
-
-List of denied actions.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `notDataActions`
-
-List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `subscriptionId`
-
-The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.
-
-- Required: No
-- Type: string
-- Default: `[subscription().subscriptionId]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The GUID of the Role Definition. |
-| `resourceId` | string | The resource ID of the Role Definition. |
-| `scope` | string | The scope this Role Definition applies to. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/authorization/role-definition/subscription/main.bicep b/modules/authorization/role-definition/subscription/main.bicep
deleted file mode 100644
index 928e32e41b..0000000000
--- a/modules/authorization/role-definition/subscription/main.bicep
+++ /dev/null
@@ -1,75 +0,0 @@
-metadata name = 'Role Definitions (Subscription scope)'
-metadata description = 'This module deploys a Role Definition at a Subscription scope.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@sys.description('Required. Name of the custom RBAC role to be created.')
-param roleName string
-
-@sys.description('Optional. Description of the custom RBAC role to be created.')
-param description string = ''
-
-@sys.description('Optional. List of allowed actions.')
-param actions array = []
-
-@sys.description('Optional. List of denied actions.')
-param notActions array = []
-
-@sys.description('Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes.')
-param dataActions array = []
-
-@sys.description('Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes.')
-param notDataActions array = []
-
-@sys.description('Optional. The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment.')
-param subscriptionId string = subscription().subscriptionId
-
-@sys.description('Optional. Role definition assignable scopes. If not provided, will use the current scope provided.')
-param assignableScopes array = []
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource roleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' = {
- name: guid(roleName, subscriptionId)
- properties: {
- roleName: roleName
- description: description
- type: 'customRole'
- permissions: [
- {
- actions: actions
- notActions: notActions
- dataActions: dataActions
- notDataActions: notDataActions
- }
- ]
- assignableScopes: !empty(assignableScopes) ? assignableScopes : array(subscription().id)
- }
-}
-
-@sys.description('The GUID of the Role Definition.')
-output name string = roleDefinition.name
-
-@sys.description('The scope this Role Definition applies to.')
-output scope string = subscription().id
-
-@sys.description('The resource ID of the Role Definition.')
-output resourceId string = roleDefinition.id
diff --git a/modules/authorization/role-definition/subscription/main.json b/modules/authorization/role-definition/subscription/main.json
deleted file mode 100644
index ab79f1d69a..0000000000
--- a/modules/authorization/role-definition/subscription/main.json
+++ /dev/null
@@ -1,144 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5911596219403447648"
- },
- "name": "Role Definitions (Subscription scope)",
- "description": "This module deploys a Role Definition at a Subscription scope.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "roleName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the custom RBAC role to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the custom RBAC role to be created."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed actions."
- }
- },
- "notActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied actions."
- }
- },
- "dataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "notDataActions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of denied data actions. This is not supported if the assignableScopes contains Management Group Scopes."
- }
- },
- "subscriptionId": {
- "type": "string",
- "defaultValue": "[subscription().subscriptionId]",
- "metadata": {
- "description": "Optional. The subscription ID where the Role Definition and Target Scope will be applied to. If not provided, will use the current scope for deployment."
- }
- },
- "assignableScopes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Role definition assignable scopes. If not provided, will use the current scope provided."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Authorization/roleDefinitions",
- "apiVersion": "2022-04-01",
- "name": "[guid(parameters('roleName'), parameters('subscriptionId'))]",
- "properties": {
- "roleName": "[parameters('roleName')]",
- "description": "[parameters('description')]",
- "type": "customRole",
- "permissions": [
- {
- "actions": "[parameters('actions')]",
- "notActions": "[parameters('notActions')]",
- "dataActions": "[parameters('dataActions')]",
- "notDataActions": "[parameters('notDataActions')]"
- }
- ],
- "assignableScopes": "[if(not(empty(parameters('assignableScopes'))), parameters('assignableScopes'), array(subscription().id))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The GUID of the Role Definition."
- },
- "value": "[guid(parameters('roleName'), parameters('subscriptionId'))]"
- },
- "scope": {
- "type": "string",
- "metadata": {
- "description": "The scope this Role Definition applies to."
- },
- "value": "[subscription().id]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Role Definition."
- },
- "value": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', guid(parameters('roleName'), parameters('subscriptionId')))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/authorization/role-definition/subscription/version.json b/modules/authorization/role-definition/subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-definition/subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/authorization/role-definition/tests/e2e/mg.common/main.test.bicep b/modules/authorization/role-definition/tests/e2e/mg.common/main.test.bicep
deleted file mode 100644
index 4a11b95b59..0000000000
--- a/modules/authorization/role-definition/tests/e2e/mg.common/main.test.bicep
+++ /dev/null
@@ -1,39 +0,0 @@
-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 = 'ardmgcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- roleName: '${namePrefix}-testRole-${serviceShort}'
- actions: [
- 'Microsoft.Compute/galleries/*'
- 'Microsoft.Network/virtualNetworks/read'
- ]
- assignableScopes: [
- managementGroup().id
- ]
- description: 'Test Custom Role Definition Standard (management group scope)'
- notActions: [
- 'Microsoft.Compute/images/delete'
- 'Microsoft.Compute/images/write'
- 'Microsoft.Network/virtualNetworks/subnets/join/action'
- ]
- }
-}
diff --git a/modules/authorization/role-definition/tests/e2e/mg.min/main.test.bicep b/modules/authorization/role-definition/tests/e2e/mg.min/main.test.bicep
deleted file mode 100644
index 67848fd6db..0000000000
--- a/modules/authorization/role-definition/tests/e2e/mg.min/main.test.bicep
+++ /dev/null
@@ -1,30 +0,0 @@
-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 = 'ardmgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../management-group/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- roleName: '${namePrefix}-testRole-${serviceShort}'
- actions: [
- 'Microsoft.Compute/galleries/images/read'
- 'Microsoft.Compute/galleries/read'
- ]
- }
-}
diff --git a/modules/authorization/role-definition/tests/e2e/rg.common/main.test.bicep b/modules/authorization/role-definition/tests/e2e/rg.common/main.test.bicep
deleted file mode 100644
index b4f16419dc..0000000000
--- a/modules/authorization/role-definition/tests/e2e/rg.common/main.test.bicep
+++ /dev/null
@@ -1,64 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roledefinitions-${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 = 'ardrgcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- roleName: '${namePrefix}-testRole-${serviceShort}'
- actions: [
- 'Microsoft.Compute/galleries/*'
- 'Microsoft.Network/virtualNetworks/read'
- ]
- assignableScopes: [
- resourceGroup.id
- ]
- dataActions: [
- 'Microsoft.Storage/storageAccounts/blobServices/*/read'
- ]
- description: 'Test Custom Role Definition Standard (resource group scope)'
- notActions: [
- 'Microsoft.Compute/images/delete'
- 'Microsoft.Compute/images/write'
- 'Microsoft.Network/virtualNetworks/subnets/join/action'
- ]
- notDataActions: [
- 'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read'
- ]
- }
-}
diff --git a/modules/authorization/role-definition/tests/e2e/rg.min/main.test.bicep b/modules/authorization/role-definition/tests/e2e/rg.min/main.test.bicep
deleted file mode 100644
index 632a73d713..0000000000
--- a/modules/authorization/role-definition/tests/e2e/rg.min/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-authorization.roledefinitions-${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 = 'ardrgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../resource-group/main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- roleName: '${namePrefix}-testRole-${serviceShort}'
- actions: [
- 'Microsoft.Compute/galleries/images/read'
- 'Microsoft.Compute/galleries/read'
- ]
- }
-}
diff --git a/modules/authorization/role-definition/tests/e2e/sub.common/main.test.bicep b/modules/authorization/role-definition/tests/e2e/sub.common/main.test.bicep
deleted file mode 100644
index 9e7bdf1096..0000000000
--- a/modules/authorization/role-definition/tests/e2e/sub.common/main.test.bicep
+++ /dev/null
@@ -1,45 +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 = 'ardsubcom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- roleName: '${namePrefix}-testRole-${serviceShort}'
- actions: [
- 'Microsoft.Compute/galleries/*'
- 'Microsoft.Network/virtualNetworks/read'
- ]
- assignableScopes: [
- subscription().id
- ]
- dataActions: [
- 'Microsoft.Storage/storageAccounts/blobServices/*/read'
- ]
- description: 'Test Custom Role Definition Standard (subscription scope)'
- notActions: [
- 'Microsoft.Compute/images/delete'
- 'Microsoft.Compute/images/write'
- 'Microsoft.Network/virtualNetworks/subnets/join/action'
- ]
- notDataActions: [
- 'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read'
- ]
- }
-}
diff --git a/modules/authorization/role-definition/tests/e2e/sub.min/main.test.bicep b/modules/authorization/role-definition/tests/e2e/sub.min/main.test.bicep
deleted file mode 100644
index e03ba0142c..0000000000
--- a/modules/authorization/role-definition/tests/e2e/sub.min/main.test.bicep
+++ /dev/null
@@ -1,31 +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 = 'ardsubmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../subscription/main.bicep' = {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- roleName: '${namePrefix}-testRole-${serviceShort}'
- actions: [
- 'Microsoft.Compute/galleries/images/read'
- 'Microsoft.Compute/galleries/read'
- ]
- subscriptionId: subscription().subscriptionId
- }
-}
diff --git a/modules/authorization/role-definition/version.json b/modules/authorization/role-definition/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/authorization/role-definition/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/README.md b/modules/automation/automation-account/README.md
index c4be8ef65e..dffc5391a8 100644
--- a/modules/automation/automation-account/README.md
+++ b/modules/automation/automation-account/README.md
@@ -1,1805 +1,7 @@
-# Automation Accounts `[Microsoft.Automation/automationAccounts]`
+
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Automation Account. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableLocalAuth`](#parameter-disablelocalauth) | bool | Disable local authentication profile used within the resource. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`gallerySolutions`](#parameter-gallerysolutions) | array | List of gallerySolutions to be created in the linked log analytics workspace. |
-| [`jobSchedules`](#parameter-jobschedules) | array | List of jobSchedules to be created in the automation account. |
-| [`linkedWorkspaceResourceId`](#parameter-linkedworkspaceresourceid) | string | ID of the log analytics workspace to be linked to the deployed automation account. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`modules`](#parameter-modules) | array | List of modules to be created in the automation account. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`runbooks`](#parameter-runbooks) | array | List of runbooks to be created in the automation account. |
-| [`schedules`](#parameter-schedules) | array | List of schedules to be created in the automation account. |
-| [`skuName`](#parameter-skuname) | string | SKU name of the account. |
-| [`softwareUpdateConfigurations`](#parameter-softwareupdateconfigurations) | array | List of softwareUpdateConfigurations to be created in the automation account. |
-| [`tags`](#parameter-tags) | object | Tags of the Automation Account resource. |
-| [`variables`](#parameter-variables) | array | List of variables to be created in the automation account. |
-
-### Parameter: `name`
-
-Name of the Automation Account.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableLocalAuth`
-
-Disable local authentication profile used within the resource.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `gallerySolutions`
-
-List of gallerySolutions to be created in the linked log analytics workspace.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `jobSchedules`
-
-List of jobSchedules to be created in the automation account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `linkedWorkspaceResourceId`
-
-ID of the log analytics workspace to be linked to the deployed automation account.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `modules`
-
-List of modules to be created in the automation account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `runbooks`
-
-List of runbooks to be created in the automation account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `schedules`
-
-List of schedules to be created in the automation account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `skuName`
-
-SKU name of the account.
-
-- Required: No
-- Type: string
-- Default: `'Basic'`
-- Allowed:
- ```Bicep
- [
- 'Basic'
- 'Free'
- ]
- ```
-
-### Parameter: `softwareUpdateConfigurations`
-
-List of softwareUpdateConfigurations to be created in the automation account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Tags of the Automation Account resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `variables`
-
-List of variables to be created in the automation account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed automation account. |
-| `resourceGroupName` | string | The resource group of the deployed automation account. |
-| `resourceId` | string | The resource ID of the deployed automation account. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
-| `modules/operational-insights/workspace/linked-service` | Local reference |
-| `modules/operations-management/solution` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/automation/automation-account/job-schedule/README.md b/modules/automation/automation-account/job-schedule/README.md
deleted file mode 100644
index 05dd4ccf1e..0000000000
--- a/modules/automation/automation-account/job-schedule/README.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Automation Account Job Schedules `[Microsoft.Automation/automationAccounts/jobSchedules]`
-
-This module deploys an Azure Automation Account Job Schedule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Automation/automationAccounts/jobSchedules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/jobSchedules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`runbookName`](#parameter-runbookname) | string | The runbook property associated with the entity. |
-| [`scheduleName`](#parameter-schedulename) | string | The schedule property associated with the entity. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automationAccountName`](#parameter-automationaccountname) | string | The name of the parent Automation Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`parameters`](#parameter-parameters) | object | List of job properties. |
-| [`runOn`](#parameter-runon) | string | The hybrid worker group that the scheduled job should run on. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Automation Account job schedule. Must be a GUID and is autogenerated. No need to provide this value. |
-
-### Parameter: `runbookName`
-
-The runbook property associated with the entity.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `scheduleName`
-
-The schedule property associated with the entity.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `automationAccountName`
-
-The name of the parent Automation Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `parameters`
-
-List of job properties.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `runOn`
-
-The hybrid worker group that the scheduled job should run on.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `name`
-
-Name of the Automation Account job schedule. Must be a GUID and is autogenerated. No need to provide this value.
-
-- Required: No
-- Type: string
-- Default: `[newGuid()]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed job schedule. |
-| `resourceGroupName` | string | The resource group of the deployed job schedule. |
-| `resourceId` | string | The resource ID of the deployed job schedule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/automation/automation-account/job-schedule/main.bicep b/modules/automation/automation-account/job-schedule/main.bicep
deleted file mode 100644
index 4ef7162b08..0000000000
--- a/modules/automation/automation-account/job-schedule/main.bicep
+++ /dev/null
@@ -1,66 +0,0 @@
-metadata name = 'Automation Account Job Schedules'
-metadata description = 'This module deploys an Azure Automation Account Job Schedule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Generated. Name of the Automation Account job schedule. Must be a GUID and is autogenerated. No need to provide this value.')
-param name string = newGuid()
-
-@description('Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment.')
-param automationAccountName string
-
-@description('Required. The runbook property associated with the entity.')
-param runbookName string
-
-@description('Required. The schedule property associated with the entity.')
-param scheduleName string
-
-@description('Optional. List of job properties.')
-param parameters object = {}
-
-@description('Optional. The hybrid worker group that the scheduled job should run on.')
-param runOn string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' existing = {
- name: automationAccountName
-}
-
-resource jobSchedule 'Microsoft.Automation/automationAccounts/jobSchedules@2022-08-08' = {
- // For each job schedule deployed with an ARM template, the GUID must be unique. Even if you're rescheduling an existing schedule, you'll need to change the GUID. This applies even if you've previously deleted an existing job schedule that was created with the same template. Reusing the same GUID results in a failed deployment.
- #disable-next-line use-stable-resource-identifiers
- name: name
- parent: automationAccount
- properties: {
- parameters: parameters
- runbook: {
- name: runbookName
- }
- runOn: !empty(runOn) ? runOn : null
- schedule: {
- name: scheduleName
- }
- }
-}
-
-@description('The name of the deployed job schedule.')
-output name string = jobSchedule.name
-
-@description('The resource ID of the deployed job schedule.')
-output resourceId string = jobSchedule.id
-
-@description('The resource group of the deployed job schedule.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/automation/automation-account/job-schedule/main.json b/modules/automation/automation-account/job-schedule/main.json
deleted file mode 100644
index bb8ec2e35b..0000000000
--- a/modules/automation/automation-account/job-schedule/main.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "7560418296837405700"
- },
- "name": "Automation Account Job Schedules",
- "description": "This module deploys an Azure Automation Account Job Schedule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[newGuid()]",
- "metadata": {
- "description": "Generated. Name of the Automation Account job schedule. Must be a GUID and is autogenerated. No need to provide this value."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "runbookName": {
- "type": "string",
- "metadata": {
- "description": "Required. The runbook property associated with the entity."
- }
- },
- "scheduleName": {
- "type": "string",
- "metadata": {
- "description": "Required. The schedule property associated with the entity."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. List of job properties."
- }
- },
- "runOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The hybrid worker group that the scheduled job should run on."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/jobSchedules",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "parameters": "[parameters('parameters')]",
- "runbook": {
- "name": "[parameters('runbookName')]"
- },
- "runOn": "[if(not(empty(parameters('runOn'))), parameters('runOn'), null())]",
- "schedule": {
- "name": "[parameters('scheduleName')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed job schedule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed job schedule."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/jobSchedules', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed job schedule."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/job-schedule/version.json b/modules/automation/automation-account/job-schedule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/job-schedule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/main.bicep b/modules/automation/automation-account/main.bicep
deleted file mode 100644
index a2dfa7b527..0000000000
--- a/modules/automation/automation-account/main.bicep
+++ /dev/null
@@ -1,551 +0,0 @@
-metadata name = 'Automation Accounts'
-metadata description = 'This module deploys an Azure Automation Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Automation Account.')
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. SKU name of the account.')
-@allowed([
- 'Free'
- 'Basic'
-])
-param skuName string = 'Basic'
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. List of modules to be created in the automation account.')
-param modules array = []
-
-@description('Optional. List of runbooks to be created in the automation account.')
-param runbooks array = []
-
-@description('Optional. List of schedules to be created in the automation account.')
-param schedules array = []
-
-@description('Optional. List of jobSchedules to be created in the automation account.')
-param jobSchedules array = []
-
-@description('Optional. List of variables to be created in the automation account.')
-param variables array = []
-
-@description('Optional. ID of the log analytics workspace to be linked to the deployed automation account.')
-param linkedWorkspaceResourceId string = ''
-
-@description('Optional. List of gallerySolutions to be created in the linked log analytics workspace.')
-param gallerySolutions array = []
-
-@description('Optional. List of softwareUpdateConfigurations to be created in the automation account.')
-param softwareUpdateConfigurations array = []
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. Disable local authentication profile used within the resource.')
-param disableLocalAuth bool = true
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the Automation Account resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- 'Automation Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f353d9bd-d4a6-484e-a77a-8050b599b867')
- 'Automation Job Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4fe576fe-1146-4730-92eb-48519fa6bf9f')
- 'Automation Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd3881f73-407a-4167-8283-e981cbba0404')
- 'Automation Runbook Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5fb5aef8-1081-4b8e-bb16-9d5d0385bab5')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' = {
- name: name
- location: location
- tags: tags
- identity: identity
- properties: {
- sku: {
- name: skuName
- }
- encryption: !empty(customerManagedKey) ? {
- keySource: 'Microsoft.KeyVault'
- identity: !empty(customerManagedKey.?userAssignedIdentityResourceId) ? {
- userAssignedIdentity: cMKUserAssignedIdentity.id
- } : null
- keyVaultProperties: {
- keyName: customerManagedKey!.keyName
- keyVaultUri: cMKKeyVault.properties.vaultUri
- keyVersion: !empty(customerManagedKey.?keyVersion ?? '') ? customerManagedKey!.keyVersion : last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- }
- } : null
- publicNetworkAccess: !empty(publicNetworkAccess) ? (publicNetworkAccess == 'Disabled' ? false : true) : (!empty(privateEndpoints) ? false : null)
- disableLocalAuth: disableLocalAuth
- }
-}
-
-module automationAccount_modules 'module/main.bicep' = [for (module, index) in modules: {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-Module-${index}'
- params: {
- name: module.name
- automationAccountName: automationAccount.name
- version: module.version
- uri: module.uri
- location: location
- tags: module.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module automationAccount_schedules 'schedule/main.bicep' = [for (schedule, index) in schedules: {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-Schedule-${index}'
- params: {
- name: schedule.name
- automationAccountName: automationAccount.name
- advancedSchedule: contains(schedule, 'advancedSchedule') ? schedule.advancedSchedule : null
- description: contains(schedule, 'description') ? schedule.description : ''
- expiryTime: contains(schedule, 'expiryTime') ? schedule.expiryTime : ''
- frequency: contains(schedule, 'frequency') ? schedule.frequency : 'OneTime'
- interval: contains(schedule, 'interval') ? schedule.interval : 0
- startTime: contains(schedule, 'startTime') ? schedule.startTime : ''
- timeZone: contains(schedule, 'timeZone') ? schedule.timeZone : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module automationAccount_runbooks 'runbook/main.bicep' = [for (runbook, index) in runbooks: {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-Runbook-${index}'
- params: {
- name: runbook.name
- automationAccountName: automationAccount.name
- type: runbook.type
- description: contains(runbook, 'description') ? runbook.description : ''
- uri: contains(runbook, 'uri') ? runbook.uri : ''
- version: contains(runbook, 'version') ? runbook.version : ''
- sasTokenValidityLength: runbook.?sasTokenValidityLength
- scriptStorageAccountResourceId: runbook.?scriptStorageAccountResourceId
- location: location
- tags: runbook.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module automationAccount_jobSchedules 'job-schedule/main.bicep' = [for (jobSchedule, index) in jobSchedules: {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-JobSchedule-${index}'
- params: {
- automationAccountName: automationAccount.name
- runbookName: jobSchedule.runbookName
- scheduleName: jobSchedule.scheduleName
- parameters: contains(jobSchedule, 'parameters') ? jobSchedule.parameters : {}
- runOn: contains(jobSchedule, 'runOn') ? jobSchedule.runOn : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- automationAccount_schedules
- automationAccount_runbooks
- ]
-}]
-
-module automationAccount_variables 'variable/main.bicep' = [for (variable, index) in variables: {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-Variable-${index}'
- params: {
- automationAccountName: automationAccount.name
- name: variable.name
- description: contains(variable, 'description') ? variable.description : ''
- value: variable.value
- isEncrypted: contains(variable, 'isEncrypted') ? variable.isEncrypted : true
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module automationAccount_linkedService '../../operational-insights/workspace/linked-service/main.bicep' = if (!empty(linkedWorkspaceResourceId)) {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-LinkedService'
- params: {
- name: 'automation'
- logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/'))!
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- resourceId: automationAccount.id
- tags: tags
- }
- // This is to support linked services to law in different subscription and resource group than the automation account.
- // The current scope is used by default if no linked service is intended to be created.
- scope: resourceGroup((!empty(linkedWorkspaceResourceId) ? (split((!empty(linkedWorkspaceResourceId) ? linkedWorkspaceResourceId : '//'), '/')[2]) : subscription().subscriptionId), !empty(linkedWorkspaceResourceId) ? (split((!empty(linkedWorkspaceResourceId) ? linkedWorkspaceResourceId : '////'), '/')[4]) : resourceGroup().name)
-}
-
-module automationAccount_solutions '../../operations-management/solution/main.bicep' = [for (gallerySolution, index) in gallerySolutions: if (!empty(linkedWorkspaceResourceId)) {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-Solution-${index}'
- params: {
- name: gallerySolution.name
- location: location
- logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/'))!
- product: contains(gallerySolution, 'product') ? gallerySolution.product : 'OMSGallery'
- publisher: contains(gallerySolution, 'publisher') ? gallerySolution.publisher : 'Microsoft'
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- // This is to support solution to law in different subscription and resource group than the automation account.
- // The current scope is used by default if no linked service is intended to be created.
- scope: resourceGroup((!empty(linkedWorkspaceResourceId) ? (split((!empty(linkedWorkspaceResourceId) ? linkedWorkspaceResourceId : '//'), '/')[2]) : subscription().subscriptionId), !empty(linkedWorkspaceResourceId) ? (split((!empty(linkedWorkspaceResourceId) ? linkedWorkspaceResourceId : '////'), '/')[4]) : resourceGroup().name)
- dependsOn: [
- automationAccount_linkedService
- ]
-}]
-
-module automationAccount_softwareUpdateConfigurations 'software-update-configuration/main.bicep' = [for (softwareUpdateConfiguration, index) in softwareUpdateConfigurations: {
- name: '${uniqueString(deployment().name, location)}-AutoAccount-SwUpdateConfig-${index}'
- params: {
- name: softwareUpdateConfiguration.name
- automationAccountName: automationAccount.name
- frequency: softwareUpdateConfiguration.frequency
- operatingSystem: softwareUpdateConfiguration.operatingSystem
- rebootSetting: softwareUpdateConfiguration.rebootSetting
- azureVirtualMachines: contains(softwareUpdateConfiguration, 'azureVirtualMachines') ? softwareUpdateConfiguration.azureVirtualMachines : []
- excludeUpdates: contains(softwareUpdateConfiguration, 'excludeUpdates') ? softwareUpdateConfiguration.excludeUpdates : []
- expiryTime: contains(softwareUpdateConfiguration, 'expiryTime') ? softwareUpdateConfiguration.expiryTime : ''
- expiryTimeOffsetMinutes: contains(softwareUpdateConfiguration, 'expiryTimeOffsetMinutes') ? softwareUpdateConfiguration.expiryTimeOffsetMinute : 0
- includeUpdates: contains(softwareUpdateConfiguration, 'includeUpdates') ? softwareUpdateConfiguration.includeUpdates : []
- interval: contains(softwareUpdateConfiguration, 'interval') ? softwareUpdateConfiguration.interval : 1
- isEnabled: contains(softwareUpdateConfiguration, 'isEnabled') ? softwareUpdateConfiguration.isEnabled : true
- maintenanceWindow: contains(softwareUpdateConfiguration, 'maintenanceWindow') ? softwareUpdateConfiguration.maintenanceWindow : 'PT2H'
- monthDays: contains(softwareUpdateConfiguration, 'monthDays') ? softwareUpdateConfiguration.monthDays : []
- monthlyOccurrences: contains(softwareUpdateConfiguration, 'monthlyOccurrences') ? softwareUpdateConfiguration.monthlyOccurrences : []
- nextRun: contains(softwareUpdateConfiguration, 'nextRun') ? softwareUpdateConfiguration.nextRun : ''
- nextRunOffsetMinutes: contains(softwareUpdateConfiguration, 'nextRunOffsetMinutes') ? softwareUpdateConfiguration.nextRunOffsetMinutes : 0
- nonAzureComputerNames: contains(softwareUpdateConfiguration, 'nonAzureComputerNames') ? softwareUpdateConfiguration.nonAzureComputerNames : []
- nonAzureQueries: contains(softwareUpdateConfiguration, 'nonAzureQueries') ? softwareUpdateConfiguration.nonAzureQueries : []
- postTaskParameters: contains(softwareUpdateConfiguration, 'postTaskParameters') ? softwareUpdateConfiguration.postTaskParameters : {}
- postTaskSource: contains(softwareUpdateConfiguration, 'postTaskSource') ? softwareUpdateConfiguration.postTaskSource : ''
- preTaskParameters: contains(softwareUpdateConfiguration, 'preTaskParameters') ? softwareUpdateConfiguration.preTaskParameters : {}
- preTaskSource: contains(softwareUpdateConfiguration, 'preTaskSource') ? softwareUpdateConfiguration.preTaskSource : ''
- scheduleDescription: contains(softwareUpdateConfiguration, 'scheduleDescription') ? softwareUpdateConfiguration.scheduleDescription : ''
- scopeByLocations: contains(softwareUpdateConfiguration, 'scopeByLocations') ? softwareUpdateConfiguration.scopeByLocations : []
- scopeByResources: contains(softwareUpdateConfiguration, 'scopeByResources') ? softwareUpdateConfiguration.scopeByResources : [
- subscription().id
- ]
- scopeByTags: contains(softwareUpdateConfiguration, 'scopeByTags') ? softwareUpdateConfiguration.scopeByTags : {}
- scopeByTagsOperation: contains(softwareUpdateConfiguration, 'scopeByTagsOperation') ? softwareUpdateConfiguration.scopeByTagsOperation : 'All'
- startTime: contains(softwareUpdateConfiguration, 'startTime') ? softwareUpdateConfiguration.startTime : ''
- timeZone: contains(softwareUpdateConfiguration, 'timeZone') ? softwareUpdateConfiguration.timeZone : 'UTC'
- updateClassifications: contains(softwareUpdateConfiguration, 'updateClassifications') ? softwareUpdateConfiguration.updateClassifications : [
- 'Critical'
- 'Security'
- ]
- weekDays: contains(softwareUpdateConfiguration, 'weekDays') ? softwareUpdateConfiguration.weekDays : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- automationAccount_solutions
- ]
-}]
-
-resource automationAccount_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: automationAccount
-}
-
-resource automationAccount_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: automationAccount
-}]
-
-module automationAccount_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-automationAccount-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.service
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(automationAccount.id, '/'))}-${privateEndpoint.?service ?? privateEndpoint.service}-${index}'
- serviceResourceId: automationAccount.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource automationAccount_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(automationAccount.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: automationAccount
-}]
-
-@description('The name of the deployed automation account.')
-output name string = automationAccount.name
-
-@description('The resource ID of the deployed automation account.')
-output resourceId string = automationAccount.id
-
-@description('The resource group of the deployed automation account.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(automationAccount.identity, 'principalId') ? automationAccount.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = automationAccount.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Required. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/automation/automation-account/main.json b/modules/automation/automation-account/main.json
deleted file mode 100644
index 369cf74eb5..0000000000
--- a/modules/automation/automation-account/main.json
+++ /dev/null
@@ -1,3078 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15622091278066868534"
- },
- "name": "Automation Accounts",
- "description": "This module deploys an Azure Automation Account.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "metadata": {
- "description": "Required. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "Basic",
- "allowedValues": [
- "Free",
- "Basic"
- ],
- "metadata": {
- "description": "Optional. SKU name of the account."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "modules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of modules to be created in the automation account."
- }
- },
- "runbooks": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of runbooks to be created in the automation account."
- }
- },
- "schedules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of schedules to be created in the automation account."
- }
- },
- "jobSchedules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of jobSchedules to be created in the automation account."
- }
- },
- "variables": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of variables to be created in the automation account."
- }
- },
- "linkedWorkspaceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ID of the log analytics workspace to be linked to the deployed automation account."
- }
- },
- "gallerySolutions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of gallerySolutions to be created in the linked log analytics workspace."
- }
- },
- "softwareUpdateConfigurations": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of softwareUpdateConfigurations to be created in the automation account."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- },
- "disableLocalAuth": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Disable local authentication profile used within the resource."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Automation Account resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Automation Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f353d9bd-d4a6-484e-a77a-8050b599b867')]",
- "Automation Job Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4fe576fe-1146-4730-92eb-48519fa6bf9f')]",
- "Automation Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd3881f73-407a-4167-8283-e981cbba0404')]",
- "Automation Runbook Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5fb5aef8-1081-4b8e-bb16-9d5d0385bab5')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "automationAccount": {
- "type": "Microsoft.Automation/automationAccounts",
- "apiVersion": "2022-08-08",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "sku": {
- "name": "[parameters('skuName')]"
- },
- "encryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('keySource', 'Microsoft.KeyVault', 'identity', if(not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'))), createObject('userAssignedIdentity', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/')))), null()), 'keyVaultProperties', createObject('keyName', parameters('customerManagedKey').keyName, 'keyVaultUri', reference('cMKKeyVault').vaultUri, 'keyVersion', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), parameters('customerManagedKey').keyVersion, last(split(reference('cMKKeyVault::cMKKey').keyUriWithVersion, '/'))))), null())]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), if(equals(parameters('publicNetworkAccess'), 'Disabled'), false(), true()), if(not(empty(parameters('privateEndpoints'))), false(), null()))]",
- "disableLocalAuth": "[parameters('disableLocalAuth')]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "automationAccount_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Automation/automationAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_diagnosticSettings": {
- "copy": {
- "name": "automationAccount_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Automation/automationAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_roleAssignments": {
- "copy": {
- "name": "automationAccount_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Automation/automationAccounts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Automation/automationAccounts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_modules": {
- "copy": {
- "name": "automationAccount_modules",
- "count": "[length(parameters('modules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-Module-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('modules')[copyIndex()].name]"
- },
- "automationAccountName": {
- "value": "[parameters('name')]"
- },
- "version": {
- "value": "[parameters('modules')[copyIndex()].version]"
- },
- "uri": {
- "value": "[parameters('modules')[copyIndex()].uri]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('modules')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6971821068699927304"
- },
- "name": "Automation Account Modules",
- "description": "This module deploys an Azure Automation Account Module.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account module."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "uri": {
- "type": "string",
- "metadata": {
- "description": "Required. Module package URI, e.g. https://www.powershellgallery.com/api/v2/package."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "latest",
- "metadata": {
- "description": "Optional. Module version or specify latest to get the latest version."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Automation Account resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "automationAccount": {
- "existing": true,
- "type": "Microsoft.Automation/automationAccounts",
- "apiVersion": "2022-08-08",
- "name": "[parameters('automationAccountName')]"
- },
- "module": {
- "type": "Microsoft.Automation/automationAccounts/modules",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "contentLink": {
- "uri": "[if(not(equals(parameters('version'), 'latest')), format('{0}/{1}/{2}', parameters('uri'), parameters('name'), parameters('version')), format('{0}/{1}', parameters('uri'), parameters('name')))]",
- "version": "[if(not(equals(parameters('version'), 'latest')), parameters('version'), null())]"
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed module."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed module."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/modules', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed module."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('module', '2022-08-08', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_schedules": {
- "copy": {
- "name": "automationAccount_schedules",
- "count": "[length(parameters('schedules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-Schedule-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('schedules')[copyIndex()].name]"
- },
- "automationAccountName": {
- "value": "[parameters('name')]"
- },
- "advancedSchedule": "[if(contains(parameters('schedules')[copyIndex()], 'advancedSchedule'), createObject('value', parameters('schedules')[copyIndex()].advancedSchedule), createObject('value', null()))]",
- "description": "[if(contains(parameters('schedules')[copyIndex()], 'description'), createObject('value', parameters('schedules')[copyIndex()].description), createObject('value', ''))]",
- "expiryTime": "[if(contains(parameters('schedules')[copyIndex()], 'expiryTime'), createObject('value', parameters('schedules')[copyIndex()].expiryTime), createObject('value', ''))]",
- "frequency": "[if(contains(parameters('schedules')[copyIndex()], 'frequency'), createObject('value', parameters('schedules')[copyIndex()].frequency), createObject('value', 'OneTime'))]",
- "interval": "[if(contains(parameters('schedules')[copyIndex()], 'interval'), createObject('value', parameters('schedules')[copyIndex()].interval), createObject('value', 0))]",
- "startTime": "[if(contains(parameters('schedules')[copyIndex()], 'startTime'), createObject('value', parameters('schedules')[copyIndex()].startTime), createObject('value', ''))]",
- "timeZone": "[if(contains(parameters('schedules')[copyIndex()], 'timeZone'), createObject('value', parameters('schedules')[copyIndex()].timeZone), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3941184452068098954"
- },
- "name": "Automation Account Schedules",
- "description": "This module deploys an Azure Automation Account Schedule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account schedule."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "advancedSchedule": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "monthDays": "Days of the month that the job should execute on. Must be between 1 and 31.",
- "monthlyOccurrences": "Occurrences of days within a month.",
- "weekDays": "Days of the week that the job should execute on.",
- "description": "Optional. The properties of the create Advanced Schedule."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the schedule."
- }
- },
- "expiryTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The end time of the schedule."
- }
- },
- "frequency": {
- "type": "string",
- "defaultValue": "OneTime",
- "allowedValues": [
- "Day",
- "Hour",
- "Minute",
- "Month",
- "OneTime",
- "Week"
- ],
- "metadata": {
- "description": "Optional. The frequency of the schedule."
- }
- },
- "interval": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Anything."
- }
- },
- "startTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The start time of the schedule."
- }
- },
- "timeZone": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The time zone of the schedule."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Time used as a basis for e.g. the schedule start date."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/schedules",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "advancedSchedule": "[if(not(empty(parameters('advancedSchedule'))), parameters('advancedSchedule'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "expiryTime": "[if(not(empty(parameters('expiryTime'))), parameters('expiryTime'), null())]",
- "frequency": "[if(not(empty(parameters('frequency'))), parameters('frequency'), 'OneTime')]",
- "interval": "[if(not(equals(parameters('interval'), 0)), parameters('interval'), null())]",
- "startTime": "[if(not(empty(parameters('startTime'))), parameters('startTime'), dateTimeAdd(parameters('baseTime'), 'PT10M'))]",
- "timeZone": "[if(not(empty(parameters('timeZone'))), parameters('timeZone'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed schedule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed schedule."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/schedules', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed schedule."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_runbooks": {
- "copy": {
- "name": "automationAccount_runbooks",
- "count": "[length(parameters('runbooks'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-Runbook-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('runbooks')[copyIndex()].name]"
- },
- "automationAccountName": {
- "value": "[parameters('name')]"
- },
- "type": {
- "value": "[parameters('runbooks')[copyIndex()].type]"
- },
- "description": "[if(contains(parameters('runbooks')[copyIndex()], 'description'), createObject('value', parameters('runbooks')[copyIndex()].description), createObject('value', ''))]",
- "uri": "[if(contains(parameters('runbooks')[copyIndex()], 'uri'), createObject('value', parameters('runbooks')[copyIndex()].uri), createObject('value', ''))]",
- "version": "[if(contains(parameters('runbooks')[copyIndex()], 'version'), createObject('value', parameters('runbooks')[copyIndex()].version), createObject('value', ''))]",
- "sasTokenValidityLength": {
- "value": "[tryGet(parameters('runbooks')[copyIndex()], 'sasTokenValidityLength')]"
- },
- "scriptStorageAccountResourceId": {
- "value": "[tryGet(parameters('runbooks')[copyIndex()], 'scriptStorageAccountResourceId')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('runbooks')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3054091660106074138"
- },
- "name": "Automation Account Runbooks",
- "description": "This module deploys an Azure Automation Account Runbook.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account runbook."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "type": {
- "type": "string",
- "allowedValues": [
- "Graph",
- "GraphPowerShell",
- "GraphPowerShellWorkflow",
- "PowerShell",
- "PowerShellWorkflow"
- ],
- "metadata": {
- "description": "Required. The type of the runbook."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the runbook."
- }
- },
- "uri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The uri of the runbook content."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The version of the runbook content."
- }
- },
- "scriptStorageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource Id of the runbook storage account."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Time used as a basis for e.g. the schedule start date."
- }
- },
- "sasTokenValidityLength": {
- "type": "string",
- "defaultValue": "PT8H",
- "metadata": {
- "description": "Optional. SAS token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Automation Account resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "accountSasProperties": {
- "signedServices": "b",
- "signedPermission": "r",
- "signedExpiry": "[dateTimeAdd(parameters('baseTime'), parameters('sasTokenValidityLength'))]",
- "signedResourceTypes": "o",
- "signedProtocol": "https"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "automationAccount": {
- "existing": true,
- "type": "Microsoft.Automation/automationAccounts",
- "apiVersion": "2022-08-08",
- "name": "[parameters('automationAccountName')]"
- },
- "storageAccount": {
- "condition": "[not(empty(parameters('scriptStorageAccountResourceId')))]",
- "existing": true,
- "type": "Microsoft.Storage/storageAccounts",
- "apiVersion": "2022-09-01",
- "subscriptionId": "[split(coalesce(parameters('scriptStorageAccountResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(parameters('scriptStorageAccountResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(parameters('scriptStorageAccountResourceId'), 'dummyVault'), '/'))]"
- },
- "runbook": {
- "type": "Microsoft.Automation/automationAccounts/runbooks",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "runbookType": "[parameters('type')]",
- "description": "[parameters('description')]",
- "publishContentLink": "[if(not(empty(parameters('uri'))), if(empty(parameters('uri')), null(), createObject('uri', if(not(empty(parameters('uri'))), if(empty(parameters('scriptStorageAccountResourceId')), parameters('uri'), format('{0}?{1}', parameters('uri'), listAccountSas(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(parameters('scriptStorageAccountResourceId'), '//'), '/')[2], split(coalesce(parameters('scriptStorageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(coalesce(parameters('scriptStorageAccountResourceId'), 'dummyVault'), '/'))), '2021-04-01', variables('accountSasProperties')).accountSasToken)), null()), 'version', if(not(empty(parameters('version'))), parameters('version'), null()))), null())]"
- },
- "dependsOn": [
- "automationAccount",
- "storageAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed runbook."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed runbook."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/runbooks', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed runbook."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('runbook', '2022-08-08', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_jobSchedules": {
- "copy": {
- "name": "automationAccount_jobSchedules",
- "count": "[length(parameters('jobSchedules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-JobSchedule-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "automationAccountName": {
- "value": "[parameters('name')]"
- },
- "runbookName": {
- "value": "[parameters('jobSchedules')[copyIndex()].runbookName]"
- },
- "scheduleName": {
- "value": "[parameters('jobSchedules')[copyIndex()].scheduleName]"
- },
- "parameters": "[if(contains(parameters('jobSchedules')[copyIndex()], 'parameters'), createObject('value', parameters('jobSchedules')[copyIndex()].parameters), createObject('value', createObject()))]",
- "runOn": "[if(contains(parameters('jobSchedules')[copyIndex()], 'runOn'), createObject('value', parameters('jobSchedules')[copyIndex()].runOn), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7940366869013991296"
- },
- "name": "Automation Account Job Schedules",
- "description": "This module deploys an Azure Automation Account Job Schedule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[newGuid()]",
- "metadata": {
- "description": "Generated. Name of the Automation Account job schedule. Must be a GUID and is autogenerated. No need to provide this value."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "runbookName": {
- "type": "string",
- "metadata": {
- "description": "Required. The runbook property associated with the entity."
- }
- },
- "scheduleName": {
- "type": "string",
- "metadata": {
- "description": "Required. The schedule property associated with the entity."
- }
- },
- "parameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. List of job properties."
- }
- },
- "runOn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The hybrid worker group that the scheduled job should run on."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/jobSchedules",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "parameters": "[parameters('parameters')]",
- "runbook": {
- "name": "[parameters('runbookName')]"
- },
- "runOn": "[if(not(empty(parameters('runOn'))), parameters('runOn'), null())]",
- "schedule": {
- "name": "[parameters('scheduleName')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed job schedule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed job schedule."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/jobSchedules', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed job schedule."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount",
- "automationAccount_runbooks",
- "automationAccount_schedules"
- ]
- },
- "automationAccount_variables": {
- "copy": {
- "name": "automationAccount_variables",
- "count": "[length(parameters('variables'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-Variable-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "automationAccountName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('variables')[copyIndex()].name]"
- },
- "description": "[if(contains(parameters('variables')[copyIndex()], 'description'), createObject('value', parameters('variables')[copyIndex()].description), createObject('value', ''))]",
- "value": {
- "value": "[parameters('variables')[copyIndex()].value]"
- },
- "isEncrypted": "[if(contains(parameters('variables')[copyIndex()], 'isEncrypted'), createObject('value', parameters('variables')[copyIndex()].isEncrypted), createObject('value', true()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13399277967950966124"
- },
- "name": "Automation Account Variables",
- "description": "This module deploys an Azure Automation Account Variable.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the variable."
- }
- },
- "value": {
- "type": "securestring",
- "metadata": {
- "description": "Required. The value of the variable. For security best practices, this value is always passed as a secure string as it could contain an encrypted value when the \"isEncrypted\" property is set to true."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the variable."
- }
- },
- "isEncrypted": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. If the variable should be encrypted. For security reasons encryption of variables should be enabled."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/variables",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "description": "[parameters('description')]",
- "isEncrypted": "[parameters('isEncrypted')]",
- "value": "[parameters('value')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed variable."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed variable."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/variables', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed variable."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_linkedService": {
- "condition": "[not(empty(parameters('linkedWorkspaceResourceId')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-LinkedService', uniqueString(deployment().name, parameters('location')))]",
- "subscriptionId": "[if(not(empty(parameters('linkedWorkspaceResourceId'))), split(if(not(empty(parameters('linkedWorkspaceResourceId'))), parameters('linkedWorkspaceResourceId'), '//'), '/')[2], subscription().subscriptionId)]",
- "resourceGroup": "[if(not(empty(parameters('linkedWorkspaceResourceId'))), split(if(not(empty(parameters('linkedWorkspaceResourceId'))), parameters('linkedWorkspaceResourceId'), '////'), '/')[4], resourceGroup().name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "automation"
- },
- "logAnalyticsWorkspaceName": {
- "value": "[last(split(parameters('linkedWorkspaceResourceId'), '/'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "resourceId": {
- "value": "[resourceId('Microsoft.Automation/automationAccounts', parameters('name'))]"
- },
- "tags": {
- "value": "[parameters('tags')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4319942183601642190"
- },
- "name": "Log Analytics Workspace Linked Services",
- "description": "This module deploys a Log Analytics Workspace Linked Service.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "logAnalyticsWorkspaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Log Analytics workspace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the link."
- }
- },
- "resourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Required. The resource ID of the resource that will be linked to the workspace. This should be used for linking resources which require read access."
- }
- },
- "writeAccessResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the resource that will be linked to the workspace. This should be used for linking resources which require write access."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to configure in the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "workspace": {
- "existing": true,
- "type": "Microsoft.OperationalInsights/workspaces",
- "apiVersion": "2022-10-01",
- "name": "[parameters('logAnalyticsWorkspaceName')]"
- },
- "linkedService": {
- "type": "Microsoft.OperationalInsights/workspaces/linkedServices",
- "apiVersion": "2020-08-01",
- "name": "[format('{0}/{1}', parameters('logAnalyticsWorkspaceName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resourceId": "[parameters('resourceId')]",
- "writeAccessResourceId": "[if(empty(parameters('writeAccessResourceId')), null(), parameters('writeAccessResourceId'))]"
- },
- "dependsOn": [
- "workspace"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed linked service."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed linked service."
- },
- "value": "[resourceId('Microsoft.OperationalInsights/workspaces/linkedServices', parameters('logAnalyticsWorkspaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group where the linked service is deployed."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- },
- "automationAccount_solutions": {
- "copy": {
- "name": "automationAccount_solutions",
- "count": "[length(parameters('gallerySolutions'))]"
- },
- "condition": "[not(empty(parameters('linkedWorkspaceResourceId')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-Solution-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "subscriptionId": "[if(not(empty(parameters('linkedWorkspaceResourceId'))), split(if(not(empty(parameters('linkedWorkspaceResourceId'))), parameters('linkedWorkspaceResourceId'), '//'), '/')[2], subscription().subscriptionId)]",
- "resourceGroup": "[if(not(empty(parameters('linkedWorkspaceResourceId'))), split(if(not(empty(parameters('linkedWorkspaceResourceId'))), parameters('linkedWorkspaceResourceId'), '////'), '/')[4], resourceGroup().name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('gallerySolutions')[copyIndex()].name]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "logAnalyticsWorkspaceName": {
- "value": "[last(split(parameters('linkedWorkspaceResourceId'), '/'))]"
- },
- "product": "[if(contains(parameters('gallerySolutions')[copyIndex()], 'product'), createObject('value', parameters('gallerySolutions')[copyIndex()].product), createObject('value', 'OMSGallery'))]",
- "publisher": "[if(contains(parameters('gallerySolutions')[copyIndex()], 'publisher'), createObject('value', parameters('gallerySolutions')[copyIndex()].publisher), createObject('value', 'Microsoft'))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6590935071601965866"
- },
- "name": "Operations Management Solutions",
- "description": "This module deploys an Operations Management Solution.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the solution. For Microsoft published gallery solution the target solution resource name will be composed as `{name}({logAnalyticsWorkspaceName})`."
- }
- },
- "logAnalyticsWorkspaceName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Log Analytics workspace where the solution will be deployed/enabled."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "product": {
- "type": "string",
- "defaultValue": "OMSGallery",
- "metadata": {
- "description": "Optional. The product of the deployed solution. For Microsoft published gallery solution it should be `OMSGallery` and the target solution resource product will be composed as `OMSGallery/{name}`. For third party solution, it can be anything. This is case sensitive."
- }
- },
- "publisher": {
- "type": "string",
- "defaultValue": "Microsoft",
- "metadata": {
- "description": "Optional. The publisher name of the deployed solution. For Microsoft published gallery solution, it is `Microsoft`."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "solutionName": "[if(equals(parameters('publisher'), 'Microsoft'), format('{0}({1})', parameters('name'), parameters('logAnalyticsWorkspaceName')), parameters('name'))]",
- "solutionProduct": "[if(equals(parameters('publisher'), 'Microsoft'), format('OMSGallery/{0}', parameters('name')), parameters('product'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.OperationsManagement/solutions",
- "apiVersion": "2015-11-01-preview",
- "name": "[variables('solutionName')]",
- "location": "[parameters('location')]",
- "properties": {
- "workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('logAnalyticsWorkspaceName'))]"
- },
- "plan": {
- "name": "[variables('solutionName')]",
- "promotionCode": "",
- "product": "[variables('solutionProduct')]",
- "publisher": "[parameters('publisher')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed solution."
- },
- "value": "[variables('solutionName')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed solution."
- },
- "value": "[resourceId('Microsoft.OperationsManagement/solutions', variables('solutionName'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group where the solution is deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.OperationsManagement/solutions', variables('solutionName')), '2015-11-01-preview', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount_linkedService"
- ]
- },
- "automationAccount_softwareUpdateConfigurations": {
- "copy": {
- "name": "automationAccount_softwareUpdateConfigurations",
- "count": "[length(parameters('softwareUpdateConfigurations'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AutoAccount-SwUpdateConfig-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('softwareUpdateConfigurations')[copyIndex()].name]"
- },
- "automationAccountName": {
- "value": "[parameters('name')]"
- },
- "frequency": {
- "value": "[parameters('softwareUpdateConfigurations')[copyIndex()].frequency]"
- },
- "operatingSystem": {
- "value": "[parameters('softwareUpdateConfigurations')[copyIndex()].operatingSystem]"
- },
- "rebootSetting": {
- "value": "[parameters('softwareUpdateConfigurations')[copyIndex()].rebootSetting]"
- },
- "azureVirtualMachines": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'azureVirtualMachines'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].azureVirtualMachines), createObject('value', createArray()))]",
- "excludeUpdates": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'excludeUpdates'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].excludeUpdates), createObject('value', createArray()))]",
- "expiryTime": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'expiryTime'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].expiryTime), createObject('value', ''))]",
- "expiryTimeOffsetMinutes": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'expiryTimeOffsetMinutes'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].expiryTimeOffsetMinute), createObject('value', 0))]",
- "includeUpdates": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'includeUpdates'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].includeUpdates), createObject('value', createArray()))]",
- "interval": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'interval'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].interval), createObject('value', 1))]",
- "isEnabled": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'isEnabled'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].isEnabled), createObject('value', true()))]",
- "maintenanceWindow": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'maintenanceWindow'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].maintenanceWindow), createObject('value', 'PT2H'))]",
- "monthDays": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'monthDays'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].monthDays), createObject('value', createArray()))]",
- "monthlyOccurrences": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'monthlyOccurrences'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].monthlyOccurrences), createObject('value', createArray()))]",
- "nextRun": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'nextRun'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].nextRun), createObject('value', ''))]",
- "nextRunOffsetMinutes": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'nextRunOffsetMinutes'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].nextRunOffsetMinutes), createObject('value', 0))]",
- "nonAzureComputerNames": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'nonAzureComputerNames'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].nonAzureComputerNames), createObject('value', createArray()))]",
- "nonAzureQueries": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'nonAzureQueries'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].nonAzureQueries), createObject('value', createArray()))]",
- "postTaskParameters": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'postTaskParameters'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].postTaskParameters), createObject('value', createObject()))]",
- "postTaskSource": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'postTaskSource'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].postTaskSource), createObject('value', ''))]",
- "preTaskParameters": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'preTaskParameters'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].preTaskParameters), createObject('value', createObject()))]",
- "preTaskSource": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'preTaskSource'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].preTaskSource), createObject('value', ''))]",
- "scheduleDescription": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'scheduleDescription'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].scheduleDescription), createObject('value', ''))]",
- "scopeByLocations": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'scopeByLocations'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].scopeByLocations), createObject('value', createArray()))]",
- "scopeByResources": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'scopeByResources'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].scopeByResources), createObject('value', createArray(subscription().id)))]",
- "scopeByTags": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'scopeByTags'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].scopeByTags), createObject('value', createObject()))]",
- "scopeByTagsOperation": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'scopeByTagsOperation'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].scopeByTagsOperation), createObject('value', 'All'))]",
- "startTime": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'startTime'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].startTime), createObject('value', ''))]",
- "timeZone": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'timeZone'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].timeZone), createObject('value', 'UTC'))]",
- "updateClassifications": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'updateClassifications'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].updateClassifications), createObject('value', createArray('Critical', 'Security')))]",
- "weekDays": "[if(contains(parameters('softwareUpdateConfigurations')[copyIndex()], 'weekDays'), createObject('value', parameters('softwareUpdateConfigurations')[copyIndex()].weekDays), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17152541334253964982"
- },
- "name": "Automation Account Software Update Configurations",
- "description": "This module deploys an Azure Automation Account Software Update Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Deployment schedule."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "operatingSystem": {
- "type": "string",
- "allowedValues": [
- "Windows",
- "Linux"
- ],
- "metadata": {
- "description": "Required. The operating system to be configured by the deployment schedule."
- }
- },
- "rebootSetting": {
- "type": "string",
- "allowedValues": [
- "IfRequired",
- "Never",
- "RebootOnly",
- "Always"
- ],
- "metadata": {
- "description": "Required. Reboot setting for the deployment schedule."
- }
- },
- "frequency": {
- "type": "string",
- "allowedValues": [
- "OneTime",
- "Hour",
- "Day",
- "Week",
- "Month"
- ],
- "metadata": {
- "description": "Required. The frequency of the deployment schedule. When using 'Hour', 'Day', 'Week' or 'Month', an interval needs to be provided."
- }
- },
- "maintenanceWindow": {
- "type": "string",
- "defaultValue": "PT2H",
- "metadata": {
- "description": "Optional. Maximum time allowed for the deployment schedule to run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601."
- }
- },
- "updateClassifications": {
- "type": "array",
- "defaultValue": [
- "Critical",
- "Security"
- ],
- "allowedValues": [
- "Critical",
- "Security",
- "UpdateRollup",
- "FeaturePack",
- "ServicePack",
- "Definition",
- "Tools",
- "Updates",
- "Other"
- ],
- "metadata": {
- "description": "Optional. Update classification included in the deployment schedule."
- }
- },
- "excludeUpdates": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. KB numbers or Linux packages excluded in the deployment schedule."
- }
- },
- "includeUpdates": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. KB numbers or Linux packages included in the deployment schedule."
- }
- },
- "scopeByResources": {
- "type": "array",
- "defaultValue": [
- "[subscription().id]"
- ],
- "metadata": {
- "description": "Optional. Specify the resources to scope the deployment schedule to."
- }
- },
- "scopeByTags": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Specify tags to which to scope the deployment schedule to."
- }
- },
- "scopeByTagsOperation": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Any"
- ],
- "metadata": {
- "description": "Optional. Enables the scopeByTags to require All (Tag A and Tag B) or Any (Tag A or Tag B)."
- }
- },
- "scopeByLocations": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify locations to which to scope the deployment schedule to."
- }
- },
- "preTaskParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters provided to the task running before the deployment schedule."
- }
- },
- "preTaskSource": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The source of the task running before the deployment schedule."
- }
- },
- "postTaskParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters provided to the task running after the deployment schedule."
- }
- },
- "postTaskSource": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The source of the task running after the deployment schedule."
- }
- },
- "interval": {
- "type": "int",
- "defaultValue": 1,
- "maxValue": 100,
- "metadata": {
- "description": "Optional. The interval of the frequency for the deployment schedule. 1 Hour is every hour, 2 Day is every second day, etc."
- }
- },
- "isEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enables the deployment schedule."
- }
- },
- "timeZone": {
- "type": "string",
- "defaultValue": "UTC",
- "metadata": {
- "description": "Optional. Time zone for the deployment schedule. IANA ID or a Windows Time Zone ID."
- }
- },
- "nonAzureQueries": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of functions from a Log Analytics workspace, used to scope the deployment schedule."
- }
- },
- "azureVirtualMachines": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of azure resource IDs for azure virtual machines in scope for the deployment schedule."
- }
- },
- "nonAzureComputerNames": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of names of non-azure machines in scope for the deployment schedule."
- }
- },
- "weekDays": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ],
- "metadata": {
- "description": "Optional. Required when used with frequency 'Week'. Specified the day of the week to run the deployment schedule."
- }
- },
- "monthDays": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 19,
- 20,
- 21,
- 22,
- 23,
- 24,
- 25,
- 26,
- 27,
- 28,
- 29,
- 30,
- 31
- ],
- "metadata": {
- "description": "Optional. Can be used with frequency 'Month'. Provides the specific days of the month to run the deployment schedule."
- }
- },
- "monthlyOccurrences": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Can be used with frequency 'Month'. Provides the pattern/cadence for running the deployment schedule in a month. Takes objects formed like this {occurance(int),day(string)}. Day is the name of the day to run the deployment schedule, the occurance specifies which occurance of that day to run the deployment schedule."
- }
- },
- "startTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The start time of the deployment schedule in ISO 8601 format. To specify a specific time use YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. For schedules where we want to start the deployment as soon as possible, specify the time segment only in 24 hour format, HH:MM, 22:00."
- }
- },
- "expiryTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The end time of the deployment schedule in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00."
- }
- },
- "expiryTimeOffsetMinutes": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. The expiry time's offset in minutes."
- }
- },
- "nextRun": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The next time the deployment schedule runs in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00."
- }
- },
- "nextRunOffsetMinutes": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. The next run's offset in minutes."
- }
- },
- "scheduleDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The schedules description."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Do not touch. Is used to provide the base time for time comparison for startTime. If startTime is specified in HH:MM format, baseTime is used to check if the provided startTime has passed, adding one day before setting the deployment schedule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "updateClassificationsVar": "[replace(replace(replace(replace(string(parameters('updateClassifications')), ',', ', '), '[', ''), ']', ''), '\"', '')]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/softwareUpdateConfigurations",
- "apiVersion": "2019-06-01",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "updateConfiguration": {
- "operatingSystem": "[parameters('operatingSystem')]",
- "duration": "[parameters('maintenanceWindow')]",
- "linux": "[if(equals(parameters('operatingSystem'), 'Linux'), createObject('excludedPackageNameMasks', parameters('excludeUpdates'), 'includedPackageNameMasks', parameters('includeUpdates'), 'includedPackageClassifications', variables('updateClassificationsVar'), 'rebootSetting', parameters('rebootSetting')), null())]",
- "windows": "[if(equals(parameters('operatingSystem'), 'Windows'), createObject('excludedKbNumbers', parameters('excludeUpdates'), 'includedKbNumbers', parameters('includeUpdates'), 'includedUpdateClassifications', variables('updateClassificationsVar'), 'rebootSetting', parameters('rebootSetting')), null())]",
- "targets": {
- "azureQueries": [
- {
- "scope": "[parameters('scopeByResources')]",
- "tagSettings": {
- "tags": "[parameters('scopeByTags')]",
- "filterOperator": "[parameters('scopeByTagsOperation')]"
- },
- "locations": "[parameters('scopeByLocations')]"
- }
- ],
- "nonAzureQueries": "[parameters('nonAzureQueries')]"
- },
- "azureVirtualMachines": "[parameters('azureVirtualMachines')]",
- "nonAzureComputerNames": "[parameters('nonAzureComputerNames')]"
- },
- "tasks": {
- "preTask": {
- "parameters": "[if(empty(parameters('preTaskParameters')), null(), parameters('preTaskParameters'))]",
- "source": "[if(empty(parameters('preTaskSource')), null(), parameters('preTaskSource'))]"
- },
- "postTask": {
- "parameters": "[if(empty(parameters('postTaskParameters')), null(), parameters('postTaskParameters'))]",
- "source": "[if(empty(parameters('postTaskSource')), null(), parameters('postTaskSource'))]"
- }
- },
- "scheduleInfo": {
- "interval": "[parameters('interval')]",
- "frequency": "[parameters('frequency')]",
- "isEnabled": "[parameters('isEnabled')]",
- "timeZone": "[parameters('timeZone')]",
- "advancedSchedule": {
- "weekDays": "[if(empty(parameters('weekDays')), null(), parameters('weekDays'))]",
- "monthDays": "[if(empty(parameters('monthDays')), null(), parameters('monthDays'))]",
- "monthlyOccurrences": "[if(empty(parameters('monthlyOccurrences')), null(), parameters('monthlyOccurrences'))]"
- },
- "startTime": "[if(empty(parameters('startTime')), dateTimeAdd(parameters('baseTime'), 'PT10M'), parameters('startTime'))]",
- "expiryTime": "[parameters('expiryTime')]",
- "expiryTimeOffsetMinutes": "[parameters('expiryTimeOffsetMinutes')]",
- "nextRun": "[parameters('nextRun')]",
- "nextRunOffsetMinutes": "[parameters('nextRunOffsetMinutes')]",
- "description": "[parameters('scheduleDescription')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed softwareUpdateConfiguration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed softwareUpdateConfiguration."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/softwareUpdateConfigurations', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed softwareUpdateConfiguration."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount",
- "automationAccount_solutions"
- ]
- },
- "automationAccount_privateEndpoints": {
- "copy": {
- "name": "automationAccount_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-automationAccount-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Automation/automationAccounts', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.Automation/automationAccounts', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed automation account."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed automation account."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed automation account."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('automationAccount', '2022-08-08', 'full').identity, 'principalId')), reference('automationAccount', '2022-08-08', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('automationAccount', '2022-08-08', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/module/README.md b/modules/automation/automation-account/module/README.md
deleted file mode 100644
index 558c759726..0000000000
--- a/modules/automation/automation-account/module/README.md
+++ /dev/null
@@ -1,106 +0,0 @@
-# Automation Account Modules `[Microsoft.Automation/automationAccounts/modules]`
-
-This module deploys an Azure Automation Account Module.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Automation/automationAccounts/modules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/modules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Automation Account module. |
-| [`uri`](#parameter-uri) | string | Module package URI, e.g. https://www.powershellgallery.com/api/v2/package. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automationAccountName`](#parameter-automationaccountname) | string | The name of the parent Automation Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`tags`](#parameter-tags) | object | Tags of the Automation Account resource. |
-| [`version`](#parameter-version) | string | Module version or specify latest to get the latest version. |
-
-### Parameter: `name`
-
-Name of the Automation Account module.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `uri`
-
-Module package URI, e.g. https://www.powershellgallery.com/api/v2/package.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `automationAccountName`
-
-The name of the parent Automation Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `tags`
-
-Tags of the Automation Account resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `version`
-
-Module version or specify latest to get the latest version.
-
-- Required: No
-- Type: string
-- Default: `'latest'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed module. |
-| `resourceGroupName` | string | The resource group of the deployed module. |
-| `resourceId` | string | The resource ID of the deployed module. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/automation/automation-account/module/main.bicep b/modules/automation/automation-account/module/main.bicep
deleted file mode 100644
index 7af6b346bc..0000000000
--- a/modules/automation/automation-account/module/main.bicep
+++ /dev/null
@@ -1,65 +0,0 @@
-metadata name = 'Automation Account Modules'
-metadata description = 'This module deploys an Azure Automation Account Module.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Automation Account module.')
-param name string
-
-@description('Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment.')
-param automationAccountName string
-
-@description('Required. Module package URI, e.g. https://www.powershellgallery.com/api/v2/package.')
-param uri string
-
-@description('Optional. Module version or specify latest to get the latest version.')
-param version string = 'latest'
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags of the Automation Account resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' existing = {
- name: automationAccountName
-}
-
-resource module 'Microsoft.Automation/automationAccounts/modules@2022-08-08' = {
- name: name
- parent: automationAccount
- location: location
- tags: tags
- properties: {
- contentLink: {
- uri: version != 'latest' ? '${uri}/${name}/${version}' : '${uri}/${name}'
- version: version != 'latest' ? version : null
- }
- }
-}
-
-@description('The name of the deployed module.')
-output name string = module.name
-
-@description('The resource ID of the deployed module.')
-output resourceId string = module.id
-
-@description('The resource group of the deployed module.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = module.location
diff --git a/modules/automation/automation-account/module/main.json b/modules/automation/automation-account/module/main.json
deleted file mode 100644
index 305926a6eb..0000000000
--- a/modules/automation/automation-account/module/main.json
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "18249732142000845439"
- },
- "name": "Automation Account Modules",
- "description": "This module deploys an Azure Automation Account Module.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account module."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "uri": {
- "type": "string",
- "metadata": {
- "description": "Required. Module package URI, e.g. https://www.powershellgallery.com/api/v2/package."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "latest",
- "metadata": {
- "description": "Optional. Module version or specify latest to get the latest version."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Automation Account resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "automationAccount": {
- "existing": true,
- "type": "Microsoft.Automation/automationAccounts",
- "apiVersion": "2022-08-08",
- "name": "[parameters('automationAccountName')]"
- },
- "module": {
- "type": "Microsoft.Automation/automationAccounts/modules",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "contentLink": {
- "uri": "[if(not(equals(parameters('version'), 'latest')), format('{0}/{1}/{2}', parameters('uri'), parameters('name'), parameters('version')), format('{0}/{1}', parameters('uri'), parameters('name')))]",
- "version": "[if(not(equals(parameters('version'), 'latest')), parameters('version'), null())]"
- }
- },
- "dependsOn": [
- "automationAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed module."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed module."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/modules', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed module."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('module', '2022-08-08', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/module/version.json b/modules/automation/automation-account/module/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/module/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/runbook/README.md b/modules/automation/automation-account/runbook/README.md
deleted file mode 100644
index 6baba0a6a7..0000000000
--- a/modules/automation/automation-account/runbook/README.md
+++ /dev/null
@@ -1,165 +0,0 @@
-# Automation Account Runbooks `[Microsoft.Automation/automationAccounts/runbooks]`
-
-This module deploys an Azure Automation Account Runbook.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Automation/automationAccounts/runbooks` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/runbooks) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Automation Account runbook. |
-| [`type`](#parameter-type) | string | The type of the runbook. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automationAccountName`](#parameter-automationaccountname) | string | The name of the parent Automation Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The description of the runbook. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`sasTokenValidityLength`](#parameter-sastokenvaliditylength) | string | SAS token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours. |
-| [`scriptStorageAccountResourceId`](#parameter-scriptstorageaccountresourceid) | string | Resource Id of the runbook storage account. |
-| [`tags`](#parameter-tags) | object | Tags of the Automation Account resource. |
-| [`uri`](#parameter-uri) | string | The uri of the runbook content. |
-| [`version`](#parameter-version) | string | The version of the runbook content. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`baseTime`](#parameter-basetime) | string | Time used as a basis for e.g. the schedule start date. |
-
-### Parameter: `name`
-
-Name of the Automation Account runbook.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `type`
-
-The type of the runbook.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Graph'
- 'GraphPowerShell'
- 'GraphPowerShellWorkflow'
- 'PowerShell'
- 'PowerShellWorkflow'
- ]
- ```
-
-### Parameter: `automationAccountName`
-
-The name of the parent Automation Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-The description of the runbook.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `sasTokenValidityLength`
-
-SAS token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours.
-
-- Required: No
-- Type: string
-- Default: `'PT8H'`
-
-### Parameter: `scriptStorageAccountResourceId`
-
-Resource Id of the runbook storage account.
-
-- Required: No
-- Type: string
-
-### Parameter: `tags`
-
-Tags of the Automation Account resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `uri`
-
-The uri of the runbook content.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `version`
-
-The version of the runbook content.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `baseTime`
-
-Time used as a basis for e.g. the schedule start date.
-
-- Required: No
-- Type: string
-- Default: `[utcNow('u')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed runbook. |
-| `resourceGroupName` | string | The resource group of the deployed runbook. |
-| `resourceId` | string | The resource ID of the deployed runbook. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/automation/automation-account/runbook/main.bicep b/modules/automation/automation-account/runbook/main.bicep
deleted file mode 100644
index 992643abe4..0000000000
--- a/modules/automation/automation-account/runbook/main.bicep
+++ /dev/null
@@ -1,104 +0,0 @@
-metadata name = 'Automation Account Runbooks'
-metadata description = 'This module deploys an Azure Automation Account Runbook.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. Name of the Automation Account runbook.')
-param name string
-
-@sys.description('Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment.')
-param automationAccountName string
-
-@allowed([
- 'Graph'
- 'GraphPowerShell'
- 'GraphPowerShellWorkflow'
- 'PowerShell'
- 'PowerShellWorkflow'
-])
-@sys.description('Required. The type of the runbook.')
-param type string
-
-@sys.description('Optional. The description of the runbook.')
-param description string = ''
-
-@sys.description('Optional. The uri of the runbook content.')
-param uri string = ''
-
-@sys.description('Optional. The version of the runbook content.')
-param version string = ''
-
-@sys.description('Optional. Resource Id of the runbook storage account.')
-param scriptStorageAccountResourceId string?
-
-@sys.description('Generated. Time used as a basis for e.g. the schedule start date.')
-param baseTime string = utcNow('u')
-
-@sys.description('Optional. SAS token validity length. Usage: \'PT8H\' - valid for 8 hours; \'P5D\' - valid for 5 days; \'P1Y\' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours.')
-param sasTokenValidityLength string = 'PT8H'
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. Tags of the Automation Account resource.')
-param tags object?
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var accountSasProperties = {
- signedServices: 'b'
- signedPermission: 'r'
- signedExpiry: dateTimeAdd(baseTime, sasTokenValidityLength)
- signedResourceTypes: 'o'
- signedProtocol: 'https'
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' existing = {
- name: automationAccountName
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = if (!empty(scriptStorageAccountResourceId)) {
- name: last(split((scriptStorageAccountResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((scriptStorageAccountResourceId ?? '//'), '/')[2], split((scriptStorageAccountResourceId ?? '////'), '/')[4])
-}
-
-var publishContentLink = empty(uri) ? null : {
- uri: !empty(uri) ? (empty(scriptStorageAccountResourceId) ? uri : '${uri}?${storageAccount.listAccountSas('2021-04-01', accountSasProperties).accountSasToken}') : null
- version: !empty(version) ? version : null
-}
-
-resource runbook 'Microsoft.Automation/automationAccounts/runbooks@2022-08-08' = {
- name: name
- parent: automationAccount
- location: location
- tags: tags
- properties: {
- runbookType: type
- description: description
- publishContentLink: !empty(uri) ? publishContentLink : null
- }
-}
-
-@sys.description('The name of the deployed runbook.')
-output name string = runbook.name
-
-@sys.description('The resource ID of the deployed runbook.')
-output resourceId string = runbook.id
-
-@sys.description('The resource group of the deployed runbook.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The location the resource was deployed into.')
-output location string = runbook.location
diff --git a/modules/automation/automation-account/runbook/main.json b/modules/automation/automation-account/runbook/main.json
deleted file mode 100644
index 9d60de1b4d..0000000000
--- a/modules/automation/automation-account/runbook/main.json
+++ /dev/null
@@ -1,191 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1833872657708381069"
- },
- "name": "Automation Account Runbooks",
- "description": "This module deploys an Azure Automation Account Runbook.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account runbook."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "type": {
- "type": "string",
- "allowedValues": [
- "Graph",
- "GraphPowerShell",
- "GraphPowerShellWorkflow",
- "PowerShell",
- "PowerShellWorkflow"
- ],
- "metadata": {
- "description": "Required. The type of the runbook."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the runbook."
- }
- },
- "uri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The uri of the runbook content."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The version of the runbook content."
- }
- },
- "scriptStorageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource Id of the runbook storage account."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Time used as a basis for e.g. the schedule start date."
- }
- },
- "sasTokenValidityLength": {
- "type": "string",
- "defaultValue": "PT8H",
- "metadata": {
- "description": "Optional. SAS token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Automation Account resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "accountSasProperties": {
- "signedServices": "b",
- "signedPermission": "r",
- "signedExpiry": "[dateTimeAdd(parameters('baseTime'), parameters('sasTokenValidityLength'))]",
- "signedResourceTypes": "o",
- "signedProtocol": "https"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "automationAccount": {
- "existing": true,
- "type": "Microsoft.Automation/automationAccounts",
- "apiVersion": "2022-08-08",
- "name": "[parameters('automationAccountName')]"
- },
- "storageAccount": {
- "condition": "[not(empty(parameters('scriptStorageAccountResourceId')))]",
- "existing": true,
- "type": "Microsoft.Storage/storageAccounts",
- "apiVersion": "2022-09-01",
- "subscriptionId": "[split(coalesce(parameters('scriptStorageAccountResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(parameters('scriptStorageAccountResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(parameters('scriptStorageAccountResourceId'), 'dummyVault'), '/'))]"
- },
- "runbook": {
- "type": "Microsoft.Automation/automationAccounts/runbooks",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "runbookType": "[parameters('type')]",
- "description": "[parameters('description')]",
- "publishContentLink": "[if(not(empty(parameters('uri'))), if(empty(parameters('uri')), null(), createObject('uri', if(not(empty(parameters('uri'))), if(empty(parameters('scriptStorageAccountResourceId')), parameters('uri'), format('{0}?{1}', parameters('uri'), listAccountSas(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(parameters('scriptStorageAccountResourceId'), '//'), '/')[2], split(coalesce(parameters('scriptStorageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(coalesce(parameters('scriptStorageAccountResourceId'), 'dummyVault'), '/'))), '2021-04-01', variables('accountSasProperties')).accountSasToken)), null()), 'version', if(not(empty(parameters('version'))), parameters('version'), null()))), null())]"
- },
- "dependsOn": [
- "automationAccount",
- "storageAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed runbook."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed runbook."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/runbooks', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed runbook."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('runbook', '2022-08-08', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/runbook/version.json b/modules/automation/automation-account/runbook/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/runbook/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/schedule/README.md b/modules/automation/automation-account/schedule/README.md
deleted file mode 100644
index c322245c12..0000000000
--- a/modules/automation/automation-account/schedule/README.md
+++ /dev/null
@@ -1,159 +0,0 @@
-# Automation Account Schedules `[Microsoft.Automation/automationAccounts/schedules]`
-
-This module deploys an Azure Automation Account Schedule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Automation/automationAccounts/schedules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/schedules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Automation Account schedule. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automationAccountName`](#parameter-automationaccountname) | string | The name of the parent Automation Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`advancedSchedule`](#parameter-advancedschedule) | object | The properties of the create Advanced Schedule. |
-| [`description`](#parameter-description) | string | The description of the schedule. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`expiryTime`](#parameter-expirytime) | string | The end time of the schedule. |
-| [`frequency`](#parameter-frequency) | string | The frequency of the schedule. |
-| [`interval`](#parameter-interval) | int | Anything. |
-| [`startTime`](#parameter-starttime) | string | The start time of the schedule. |
-| [`timeZone`](#parameter-timezone) | string | The time zone of the schedule. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`baseTime`](#parameter-basetime) | string | Time used as a basis for e.g. the schedule start date. |
-
-### Parameter: `name`
-
-Name of the Automation Account schedule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `automationAccountName`
-
-The name of the parent Automation Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `advancedSchedule`
-
-The properties of the create Advanced Schedule.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `description`
-
-The description of the schedule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `expiryTime`
-
-The end time of the schedule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `frequency`
-
-The frequency of the schedule.
-
-- Required: No
-- Type: string
-- Default: `'OneTime'`
-- Allowed:
- ```Bicep
- [
- 'Day'
- 'Hour'
- 'Minute'
- 'Month'
- 'OneTime'
- 'Week'
- ]
- ```
-
-### Parameter: `interval`
-
-Anything.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `startTime`
-
-The start time of the schedule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `timeZone`
-
-The time zone of the schedule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `baseTime`
-
-Time used as a basis for e.g. the schedule start date.
-
-- Required: No
-- Type: string
-- Default: `[utcNow('u')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed schedule. |
-| `resourceGroupName` | string | The resource group of the deployed schedule. |
-| `resourceId` | string | The resource ID of the deployed schedule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/automation/automation-account/schedule/main.bicep b/modules/automation/automation-account/schedule/main.bicep
deleted file mode 100644
index f887e3b843..0000000000
--- a/modules/automation/automation-account/schedule/main.bicep
+++ /dev/null
@@ -1,88 +0,0 @@
-metadata name = 'Automation Account Schedules'
-metadata description = 'This module deploys an Azure Automation Account Schedule.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. Name of the Automation Account schedule.')
-param name string
-
-@sys.description('Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment.')
-param automationAccountName string
-
-@sys.description('Optional. The properties of the create Advanced Schedule.')
-@metadata({
- monthDays: 'Days of the month that the job should execute on. Must be between 1 and 31.'
- monthlyOccurrences: 'Occurrences of days within a month.'
- weekDays: 'Days of the week that the job should execute on.'
-})
-param advancedSchedule object = {}
-
-@sys.description('Optional. The description of the schedule.')
-param description string = ''
-
-@sys.description('Optional. The end time of the schedule.')
-param expiryTime string = ''
-
-@allowed([
- 'Day'
- 'Hour'
- 'Minute'
- 'Month'
- 'OneTime'
- 'Week'
-])
-@sys.description('Optional. The frequency of the schedule.')
-param frequency string = 'OneTime'
-
-@sys.description('Optional. Anything.')
-param interval int = 0
-
-@sys.description('Optional. The start time of the schedule.')
-param startTime string = ''
-
-@sys.description('Optional. The time zone of the schedule.')
-param timeZone string = ''
-
-@sys.description('Generated. Time used as a basis for e.g. the schedule start date.')
-param baseTime string = utcNow('u')
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' existing = {
- name: automationAccountName
-}
-
-resource schedule 'Microsoft.Automation/automationAccounts/schedules@2022-08-08' = {
- name: name
- parent: automationAccount
- properties: {
- advancedSchedule: !empty(advancedSchedule) ? advancedSchedule : null
- description: !empty(description) ? description : null
- expiryTime: !empty(expiryTime) ? expiryTime : null
- frequency: !empty(frequency) ? frequency : 'OneTime'
- interval: (interval != 0) ? interval : null
- startTime: !empty(startTime) ? startTime : dateTimeAdd(baseTime, 'PT10M')
- timeZone: !empty(timeZone) ? timeZone : null
- }
-}
-
-@sys.description('The name of the deployed schedule.')
-output name string = schedule.name
-
-@sys.description('The resource ID of the deployed schedule.')
-output resourceId string = schedule.id
-
-@sys.description('The resource group of the deployed schedule.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/automation/automation-account/schedule/main.json b/modules/automation/automation-account/schedule/main.json
deleted file mode 100644
index 4183686e3a..0000000000
--- a/modules/automation/automation-account/schedule/main.json
+++ /dev/null
@@ -1,155 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "4119330639685982378"
- },
- "name": "Automation Account Schedules",
- "description": "This module deploys an Azure Automation Account Schedule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Automation Account schedule."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "advancedSchedule": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "monthDays": "Days of the month that the job should execute on. Must be between 1 and 31.",
- "monthlyOccurrences": "Occurrences of days within a month.",
- "weekDays": "Days of the week that the job should execute on.",
- "description": "Optional. The properties of the create Advanced Schedule."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the schedule."
- }
- },
- "expiryTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The end time of the schedule."
- }
- },
- "frequency": {
- "type": "string",
- "defaultValue": "OneTime",
- "allowedValues": [
- "Day",
- "Hour",
- "Minute",
- "Month",
- "OneTime",
- "Week"
- ],
- "metadata": {
- "description": "Optional. The frequency of the schedule."
- }
- },
- "interval": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Anything."
- }
- },
- "startTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The start time of the schedule."
- }
- },
- "timeZone": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The time zone of the schedule."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Time used as a basis for e.g. the schedule start date."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/schedules",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "advancedSchedule": "[if(not(empty(parameters('advancedSchedule'))), parameters('advancedSchedule'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]",
- "expiryTime": "[if(not(empty(parameters('expiryTime'))), parameters('expiryTime'), null())]",
- "frequency": "[if(not(empty(parameters('frequency'))), parameters('frequency'), 'OneTime')]",
- "interval": "[if(not(equals(parameters('interval'), 0)), parameters('interval'), null())]",
- "startTime": "[if(not(empty(parameters('startTime'))), parameters('startTime'), dateTimeAdd(parameters('baseTime'), 'PT10M'))]",
- "timeZone": "[if(not(empty(parameters('timeZone'))), parameters('timeZone'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed schedule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed schedule."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/schedules', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed schedule."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/schedule/version.json b/modules/automation/automation-account/schedule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/schedule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/software-update-configuration/README.md b/modules/automation/automation-account/software-update-configuration/README.md
deleted file mode 100644
index da37b18b6e..0000000000
--- a/modules/automation/automation-account/software-update-configuration/README.md
+++ /dev/null
@@ -1,557 +0,0 @@
-# Automation Account Software Update Configurations `[Microsoft.Automation/automationAccounts/softwareUpdateConfigurations]`
-
-This module deploys an Azure Automation Account Software Update Configuration.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Automation/automationAccounts/softwareUpdateConfigurations` | [2019-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2019-06-01/automationAccounts/softwareUpdateConfigurations) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`frequency`](#parameter-frequency) | string | The frequency of the deployment schedule. When using 'Hour', 'Day', 'Week' or 'Month', an interval needs to be provided. |
-| [`name`](#parameter-name) | string | The name of the Deployment schedule. |
-| [`operatingSystem`](#parameter-operatingsystem) | string | The operating system to be configured by the deployment schedule. |
-| [`rebootSetting`](#parameter-rebootsetting) | string | Reboot setting for the deployment schedule. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automationAccountName`](#parameter-automationaccountname) | string | The name of the parent Automation Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`azureVirtualMachines`](#parameter-azurevirtualmachines) | array | List of azure resource IDs for azure virtual machines in scope for the deployment schedule. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`excludeUpdates`](#parameter-excludeupdates) | array | KB numbers or Linux packages excluded in the deployment schedule. |
-| [`expiryTime`](#parameter-expirytime) | string | The end time of the deployment schedule in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. |
-| [`expiryTimeOffsetMinutes`](#parameter-expirytimeoffsetminutes) | int | The expiry time's offset in minutes. |
-| [`includeUpdates`](#parameter-includeupdates) | array | KB numbers or Linux packages included in the deployment schedule. |
-| [`interval`](#parameter-interval) | int | The interval of the frequency for the deployment schedule. 1 Hour is every hour, 2 Day is every second day, etc. |
-| [`isEnabled`](#parameter-isenabled) | bool | Enables the deployment schedule. |
-| [`maintenanceWindow`](#parameter-maintenancewindow) | string | Maximum time allowed for the deployment schedule to run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601. |
-| [`monthDays`](#parameter-monthdays) | array | Can be used with frequency 'Month'. Provides the specific days of the month to run the deployment schedule. |
-| [`monthlyOccurrences`](#parameter-monthlyoccurrences) | array | Can be used with frequency 'Month'. Provides the pattern/cadence for running the deployment schedule in a month. Takes objects formed like this {occurance(int),day(string)}. Day is the name of the day to run the deployment schedule, the occurance specifies which occurance of that day to run the deployment schedule. |
-| [`nextRun`](#parameter-nextrun) | string | The next time the deployment schedule runs in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. |
-| [`nextRunOffsetMinutes`](#parameter-nextrunoffsetminutes) | int | The next run's offset in minutes. |
-| [`nonAzureComputerNames`](#parameter-nonazurecomputernames) | array | List of names of non-azure machines in scope for the deployment schedule. |
-| [`nonAzureQueries`](#parameter-nonazurequeries) | array | Array of functions from a Log Analytics workspace, used to scope the deployment schedule. |
-| [`postTaskParameters`](#parameter-posttaskparameters) | object | Parameters provided to the task running after the deployment schedule. |
-| [`postTaskSource`](#parameter-posttasksource) | string | The source of the task running after the deployment schedule. |
-| [`preTaskParameters`](#parameter-pretaskparameters) | object | Parameters provided to the task running before the deployment schedule. |
-| [`preTaskSource`](#parameter-pretasksource) | string | The source of the task running before the deployment schedule. |
-| [`scheduleDescription`](#parameter-scheduledescription) | string | The schedules description. |
-| [`scopeByLocations`](#parameter-scopebylocations) | array | Specify locations to which to scope the deployment schedule to. |
-| [`scopeByResources`](#parameter-scopebyresources) | array | Specify the resources to scope the deployment schedule to. |
-| [`scopeByTags`](#parameter-scopebytags) | object | Specify tags to which to scope the deployment schedule to. |
-| [`scopeByTagsOperation`](#parameter-scopebytagsoperation) | string | Enables the scopeByTags to require All (Tag A and Tag B) or Any (Tag A or Tag B). |
-| [`startTime`](#parameter-starttime) | string | The start time of the deployment schedule in ISO 8601 format. To specify a specific time use YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. For schedules where we want to start the deployment as soon as possible, specify the time segment only in 24 hour format, HH:MM, 22:00. |
-| [`timeZone`](#parameter-timezone) | string | Time zone for the deployment schedule. IANA ID or a Windows Time Zone ID. |
-| [`updateClassifications`](#parameter-updateclassifications) | array | Update classification included in the deployment schedule. |
-| [`weekDays`](#parameter-weekdays) | array | Required when used with frequency 'Week'. Specified the day of the week to run the deployment schedule. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`baseTime`](#parameter-basetime) | string | Do not touch. Is used to provide the base time for time comparison for startTime. If startTime is specified in HH:MM format, baseTime is used to check if the provided startTime has passed, adding one day before setting the deployment schedule. |
-
-### Parameter: `frequency`
-
-The frequency of the deployment schedule. When using 'Hour', 'Day', 'Week' or 'Month', an interval needs to be provided.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Day'
- 'Hour'
- 'Month'
- 'OneTime'
- 'Week'
- ]
- ```
-
-### Parameter: `name`
-
-The name of the Deployment schedule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `operatingSystem`
-
-The operating system to be configured by the deployment schedule.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `rebootSetting`
-
-Reboot setting for the deployment schedule.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Always'
- 'IfRequired'
- 'Never'
- 'RebootOnly'
- ]
- ```
-
-### Parameter: `automationAccountName`
-
-The name of the parent Automation Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `azureVirtualMachines`
-
-List of azure resource IDs for azure virtual machines in scope for the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `excludeUpdates`
-
-KB numbers or Linux packages excluded in the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `expiryTime`
-
-The end time of the deployment schedule in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `expiryTimeOffsetMinutes`
-
-The expiry time's offset in minutes.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `includeUpdates`
-
-KB numbers or Linux packages included in the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `interval`
-
-The interval of the frequency for the deployment schedule. 1 Hour is every hour, 2 Day is every second day, etc.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `isEnabled`
-
-Enables the deployment schedule.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `maintenanceWindow`
-
-Maximum time allowed for the deployment schedule to run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601.
-
-- Required: No
-- Type: string
-- Default: `'PT2H'`
-
-### Parameter: `monthDays`
-
-Can be used with frequency 'Month'. Provides the specific days of the month to run the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- ]
- ```
-
-### Parameter: `monthlyOccurrences`
-
-Can be used with frequency 'Month'. Provides the pattern/cadence for running the deployment schedule in a month. Takes objects formed like this {occurance(int),day(string)}. Day is the name of the day to run the deployment schedule, the occurance specifies which occurance of that day to run the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `nextRun`
-
-The next time the deployment schedule runs in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `nextRunOffsetMinutes`
-
-The next run's offset in minutes.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `nonAzureComputerNames`
-
-List of names of non-azure machines in scope for the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `nonAzureQueries`
-
-Array of functions from a Log Analytics workspace, used to scope the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `postTaskParameters`
-
-Parameters provided to the task running after the deployment schedule.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `postTaskSource`
-
-The source of the task running after the deployment schedule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `preTaskParameters`
-
-Parameters provided to the task running before the deployment schedule.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `preTaskSource`
-
-The source of the task running before the deployment schedule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `scheduleDescription`
-
-The schedules description.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `scopeByLocations`
-
-Specify locations to which to scope the deployment schedule to.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `scopeByResources`
-
-Specify the resources to scope the deployment schedule to.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- '[subscription().id]'
- ]
- ```
-
-### Parameter: `scopeByTags`
-
-Specify tags to which to scope the deployment schedule to.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `scopeByTagsOperation`
-
-Enables the scopeByTags to require All (Tag A and Tag B) or Any (Tag A or Tag B).
-
-- Required: No
-- Type: string
-- Default: `'All'`
-- Allowed:
- ```Bicep
- [
- 'All'
- 'Any'
- ]
- ```
-
-### Parameter: `startTime`
-
-The start time of the deployment schedule in ISO 8601 format. To specify a specific time use YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. For schedules where we want to start the deployment as soon as possible, specify the time segment only in 24 hour format, HH:MM, 22:00.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `timeZone`
-
-Time zone for the deployment schedule. IANA ID or a Windows Time Zone ID.
-
-- Required: No
-- Type: string
-- Default: `'UTC'`
-
-### Parameter: `updateClassifications`
-
-Update classification included in the deployment schedule.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- 'Critical'
- 'Security'
- ]
- ```
-- Allowed:
- ```Bicep
- [
- 'Critical'
- 'Definition'
- 'FeaturePack'
- 'Other'
- 'Security'
- 'ServicePack'
- 'Tools'
- 'UpdateRollup'
- 'Updates'
- ]
- ```
-
-### Parameter: `weekDays`
-
-Required when used with frequency 'Week'. Specified the day of the week to run the deployment schedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'Friday'
- 'Monday'
- 'Saturday'
- 'Sunday'
- 'Thursday'
- 'Tuesday'
- 'Wednesday'
- ]
- ```
-
-### Parameter: `baseTime`
-
-Do not touch. Is used to provide the base time for time comparison for startTime. If startTime is specified in HH:MM format, baseTime is used to check if the provided startTime has passed, adding one day before setting the deployment schedule.
-
-- Required: No
-- Type: string
-- Default: `[utcNow('u')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed softwareUpdateConfiguration. |
-| `resourceGroupName` | string | The resource group of the deployed softwareUpdateConfiguration. |
-| `resourceId` | string | The resource ID of the deployed softwareUpdateConfiguration. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `scopeByTags`
-
-Provide tag keys, with an array of values, filtering in machines that should be included in the deployment schedule.
-
-| Property name | Type | Possible values | Description |
-| :------------ | :---- | :-------------- | :---------- |
-| \
-
-### Parameter Usage: `monthlyOccurrences`
-
-Occurrences of days within a month.
-
-| Property name | Type | Possible values | Description |
-| :------------ | :----- | :------------------------------------------------------------- | :----------------------------------------------------------------------------------- |
-| `occurance` | int | 1-5 | Occurrence of the week within the month. Must be between 1 and 5, where 5 is "last". |
-| `day` | string | Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday | Day of the occurrence. |
-
-
diff --git a/modules/automation/automation-account/software-update-configuration/main.bicep b/modules/automation/automation-account/software-update-configuration/main.bicep
deleted file mode 100644
index c7d1c57ad9..0000000000
--- a/modules/automation/automation-account/software-update-configuration/main.bicep
+++ /dev/null
@@ -1,277 +0,0 @@
-metadata name = 'Automation Account Software Update Configurations'
-metadata description = 'This module deploys an Azure Automation Account Software Update Configuration.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Deployment schedule.')
-param name string
-
-@description('Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment.')
-param automationAccountName string
-
-@description('Required. The operating system to be configured by the deployment schedule.')
-@allowed([
- 'Windows'
- 'Linux'
-])
-param operatingSystem string
-
-@description('Required. Reboot setting for the deployment schedule.')
-@allowed([
- 'IfRequired'
- 'Never'
- 'RebootOnly'
- 'Always'
-])
-param rebootSetting string
-
-@description('Required. The frequency of the deployment schedule. When using \'Hour\', \'Day\', \'Week\' or \'Month\', an interval needs to be provided.')
-@allowed([
- 'OneTime'
- 'Hour'
- 'Day'
- 'Week'
- 'Month'
-])
-param frequency string
-
-@description('Optional. Maximum time allowed for the deployment schedule to run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601.')
-param maintenanceWindow string = 'PT2H'
-
-@description('Optional. Update classification included in the deployment schedule.')
-@allowed([
- 'Critical'
- 'Security'
- 'UpdateRollup'
- 'FeaturePack'
- 'ServicePack'
- 'Definition'
- 'Tools'
- 'Updates'
- 'Other'
-])
-param updateClassifications array = [
- 'Critical'
- 'Security'
-]
-
-@description('Optional. KB numbers or Linux packages excluded in the deployment schedule.')
-param excludeUpdates array = []
-
-@description('Optional. KB numbers or Linux packages included in the deployment schedule.')
-param includeUpdates array = []
-
-@description('Optional. Specify the resources to scope the deployment schedule to.')
-param scopeByResources array = [
- subscription().id
-]
-
-@description('Optional. Specify tags to which to scope the deployment schedule to.')
-param scopeByTags object = {}
-
-@description('Optional. Enables the scopeByTags to require All (Tag A and Tag B) or Any (Tag A or Tag B).')
-@allowed([
- 'All'
- 'Any'
-])
-param scopeByTagsOperation string = 'All'
-
-@description('Optional. Specify locations to which to scope the deployment schedule to.')
-param scopeByLocations array = []
-
-@description('Optional. Parameters provided to the task running before the deployment schedule.')
-param preTaskParameters object = {}
-
-@description('Optional. The source of the task running before the deployment schedule.')
-param preTaskSource string = ''
-
-@description('Optional. Parameters provided to the task running after the deployment schedule.')
-param postTaskParameters object = {}
-
-@description('Optional. The source of the task running after the deployment schedule.')
-param postTaskSource string = ''
-
-@description('Optional. The interval of the frequency for the deployment schedule. 1 Hour is every hour, 2 Day is every second day, etc.')
-@maxValue(100)
-param interval int = 1
-
-@description('Optional. Enables the deployment schedule.')
-param isEnabled bool = true
-
-@description('Optional. Time zone for the deployment schedule. IANA ID or a Windows Time Zone ID.')
-param timeZone string = 'UTC'
-
-@description('Optional. Array of functions from a Log Analytics workspace, used to scope the deployment schedule.')
-param nonAzureQueries array = []
-
-@description('Optional. List of azure resource IDs for azure virtual machines in scope for the deployment schedule.')
-param azureVirtualMachines array = []
-
-@description('Optional. List of names of non-azure machines in scope for the deployment schedule.')
-param nonAzureComputerNames array = []
-
-@description('Optional. Required when used with frequency \'Week\'. Specified the day of the week to run the deployment schedule.')
-@allowed([
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- 'Saturday'
- 'Sunday'
-])
-param weekDays array = []
-
-@description('Optional. Can be used with frequency \'Month\'. Provides the specific days of the month to run the deployment schedule.')
-@allowed([
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
-])
-param monthDays array = []
-
-@description('Optional. Can be used with frequency \'Month\'. Provides the pattern/cadence for running the deployment schedule in a month. Takes objects formed like this {occurance(int),day(string)}. Day is the name of the day to run the deployment schedule, the occurance specifies which occurance of that day to run the deployment schedule.')
-param monthlyOccurrences array = []
-
-@description('Optional. The start time of the deployment schedule in ISO 8601 format. To specify a specific time use YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. For schedules where we want to start the deployment as soon as possible, specify the time segment only in 24 hour format, HH:MM, 22:00.')
-param startTime string = ''
-
-@description('Optional. The end time of the deployment schedule in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00.')
-param expiryTime string = ''
-
-@description('Optional. The expiry time\'s offset in minutes.')
-param expiryTimeOffsetMinutes int = 0
-
-@description('Optional. The next time the deployment schedule runs in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00.')
-param nextRun string = ''
-
-@description('Optional. The next run\'s offset in minutes.')
-param nextRunOffsetMinutes int = 0
-
-@description('Optional. The schedules description.')
-param scheduleDescription string = ''
-
-@description('Generated. Do not touch. Is used to provide the base time for time comparison for startTime. If startTime is specified in HH:MM format, baseTime is used to check if the provided startTime has passed, adding one day before setting the deployment schedule.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var updateClassificationsVar = replace(replace(replace(replace(string(updateClassifications), ',', ', '), '[', ''), ']', ''), '"', '')
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' existing = {
- name: automationAccountName
-}
-
-resource softwareUpdateConfiguration 'Microsoft.Automation/automationAccounts/softwareUpdateConfigurations@2019-06-01' = {
- name: name
- parent: automationAccount
- properties: {
- updateConfiguration: {
- operatingSystem: operatingSystem
- duration: maintenanceWindow
- linux: ((operatingSystem == 'Linux') ? {
- excludedPackageNameMasks: excludeUpdates
- includedPackageNameMasks: includeUpdates
- includedPackageClassifications: updateClassificationsVar
- rebootSetting: rebootSetting
- } : null)
- windows: ((operatingSystem == 'Windows') ? {
- excludedKbNumbers: excludeUpdates
- includedKbNumbers: includeUpdates
- includedUpdateClassifications: updateClassificationsVar
- rebootSetting: rebootSetting
- } : null)
- targets: {
- azureQueries: [
- {
- scope: scopeByResources
- tagSettings: {
- tags: scopeByTags
- filterOperator: scopeByTagsOperation
- }
- locations: scopeByLocations
- }
- ]
- nonAzureQueries: nonAzureQueries
- }
- azureVirtualMachines: azureVirtualMachines
- nonAzureComputerNames: nonAzureComputerNames
- }
- tasks: {
- preTask: {
- parameters: (empty(preTaskParameters) ? null : preTaskParameters)
- source: (empty(preTaskSource) ? null : preTaskSource)
- }
- postTask: {
- parameters: (empty(postTaskParameters) ? null : postTaskParameters)
- source: (empty(postTaskSource) ? null : postTaskSource)
- }
- }
- scheduleInfo: {
- interval: interval
- frequency: frequency
- isEnabled: isEnabled
- timeZone: timeZone
- advancedSchedule: {
- weekDays: (empty(weekDays) ? null : weekDays)
- monthDays: (empty(monthDays) ? null : monthDays)
- monthlyOccurrences: (empty(monthlyOccurrences) ? null : monthlyOccurrences)
- }
- startTime: (empty(startTime) ? dateTimeAdd(baseTime, 'PT10M') : startTime)
- expiryTime: expiryTime
- expiryTimeOffsetMinutes: expiryTimeOffsetMinutes
- nextRun: nextRun
- nextRunOffsetMinutes: nextRunOffsetMinutes
- description: scheduleDescription
- }
- }
-}
-
-@description('The name of the deployed softwareUpdateConfiguration.')
-output name string = softwareUpdateConfiguration.name
-
-@description('The resource ID of the deployed softwareUpdateConfiguration.')
-output resourceId string = softwareUpdateConfiguration.id
-
-@description('The resource group of the deployed softwareUpdateConfiguration.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/automation/automation-account/software-update-configuration/main.json b/modules/automation/automation-account/software-update-configuration/main.json
deleted file mode 100644
index 14b2d33ac1..0000000000
--- a/modules/automation/automation-account/software-update-configuration/main.json
+++ /dev/null
@@ -1,426 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10775503419002427646"
- },
- "name": "Automation Account Software Update Configurations",
- "description": "This module deploys an Azure Automation Account Software Update Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Deployment schedule."
- }
- },
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "operatingSystem": {
- "type": "string",
- "allowedValues": [
- "Windows",
- "Linux"
- ],
- "metadata": {
- "description": "Required. The operating system to be configured by the deployment schedule."
- }
- },
- "rebootSetting": {
- "type": "string",
- "allowedValues": [
- "IfRequired",
- "Never",
- "RebootOnly",
- "Always"
- ],
- "metadata": {
- "description": "Required. Reboot setting for the deployment schedule."
- }
- },
- "frequency": {
- "type": "string",
- "allowedValues": [
- "OneTime",
- "Hour",
- "Day",
- "Week",
- "Month"
- ],
- "metadata": {
- "description": "Required. The frequency of the deployment schedule. When using 'Hour', 'Day', 'Week' or 'Month', an interval needs to be provided."
- }
- },
- "maintenanceWindow": {
- "type": "string",
- "defaultValue": "PT2H",
- "metadata": {
- "description": "Optional. Maximum time allowed for the deployment schedule to run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601."
- }
- },
- "updateClassifications": {
- "type": "array",
- "defaultValue": [
- "Critical",
- "Security"
- ],
- "allowedValues": [
- "Critical",
- "Security",
- "UpdateRollup",
- "FeaturePack",
- "ServicePack",
- "Definition",
- "Tools",
- "Updates",
- "Other"
- ],
- "metadata": {
- "description": "Optional. Update classification included in the deployment schedule."
- }
- },
- "excludeUpdates": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. KB numbers or Linux packages excluded in the deployment schedule."
- }
- },
- "includeUpdates": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. KB numbers or Linux packages included in the deployment schedule."
- }
- },
- "scopeByResources": {
- "type": "array",
- "defaultValue": [
- "[subscription().id]"
- ],
- "metadata": {
- "description": "Optional. Specify the resources to scope the deployment schedule to."
- }
- },
- "scopeByTags": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Specify tags to which to scope the deployment schedule to."
- }
- },
- "scopeByTagsOperation": {
- "type": "string",
- "defaultValue": "All",
- "allowedValues": [
- "All",
- "Any"
- ],
- "metadata": {
- "description": "Optional. Enables the scopeByTags to require All (Tag A and Tag B) or Any (Tag A or Tag B)."
- }
- },
- "scopeByLocations": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify locations to which to scope the deployment schedule to."
- }
- },
- "preTaskParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters provided to the task running before the deployment schedule."
- }
- },
- "preTaskSource": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The source of the task running before the deployment schedule."
- }
- },
- "postTaskParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters provided to the task running after the deployment schedule."
- }
- },
- "postTaskSource": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The source of the task running after the deployment schedule."
- }
- },
- "interval": {
- "type": "int",
- "defaultValue": 1,
- "maxValue": 100,
- "metadata": {
- "description": "Optional. The interval of the frequency for the deployment schedule. 1 Hour is every hour, 2 Day is every second day, etc."
- }
- },
- "isEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enables the deployment schedule."
- }
- },
- "timeZone": {
- "type": "string",
- "defaultValue": "UTC",
- "metadata": {
- "description": "Optional. Time zone for the deployment schedule. IANA ID or a Windows Time Zone ID."
- }
- },
- "nonAzureQueries": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of functions from a Log Analytics workspace, used to scope the deployment schedule."
- }
- },
- "azureVirtualMachines": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of azure resource IDs for azure virtual machines in scope for the deployment schedule."
- }
- },
- "nonAzureComputerNames": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of names of non-azure machines in scope for the deployment schedule."
- }
- },
- "weekDays": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ],
- "metadata": {
- "description": "Optional. Required when used with frequency 'Week'. Specified the day of the week to run the deployment schedule."
- }
- },
- "monthDays": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 19,
- 20,
- 21,
- 22,
- 23,
- 24,
- 25,
- 26,
- 27,
- 28,
- 29,
- 30,
- 31
- ],
- "metadata": {
- "description": "Optional. Can be used with frequency 'Month'. Provides the specific days of the month to run the deployment schedule."
- }
- },
- "monthlyOccurrences": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Can be used with frequency 'Month'. Provides the pattern/cadence for running the deployment schedule in a month. Takes objects formed like this {occurance(int),day(string)}. Day is the name of the day to run the deployment schedule, the occurance specifies which occurance of that day to run the deployment schedule."
- }
- },
- "startTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The start time of the deployment schedule in ISO 8601 format. To specify a specific time use YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00. For schedules where we want to start the deployment as soon as possible, specify the time segment only in 24 hour format, HH:MM, 22:00."
- }
- },
- "expiryTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The end time of the deployment schedule in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00."
- }
- },
- "expiryTimeOffsetMinutes": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. The expiry time's offset in minutes."
- }
- },
- "nextRun": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The next time the deployment schedule runs in ISO 8601 format. YYYY-MM-DDTHH:MM:SS, 2021-12-31T23:00:00."
- }
- },
- "nextRunOffsetMinutes": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. The next run's offset in minutes."
- }
- },
- "scheduleDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The schedules description."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Do not touch. Is used to provide the base time for time comparison for startTime. If startTime is specified in HH:MM format, baseTime is used to check if the provided startTime has passed, adding one day before setting the deployment schedule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "updateClassificationsVar": "[replace(replace(replace(replace(string(parameters('updateClassifications')), ',', ', '), '[', ''), ']', ''), '\"', '')]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/softwareUpdateConfigurations",
- "apiVersion": "2019-06-01",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "updateConfiguration": {
- "operatingSystem": "[parameters('operatingSystem')]",
- "duration": "[parameters('maintenanceWindow')]",
- "linux": "[if(equals(parameters('operatingSystem'), 'Linux'), createObject('excludedPackageNameMasks', parameters('excludeUpdates'), 'includedPackageNameMasks', parameters('includeUpdates'), 'includedPackageClassifications', variables('updateClassificationsVar'), 'rebootSetting', parameters('rebootSetting')), null())]",
- "windows": "[if(equals(parameters('operatingSystem'), 'Windows'), createObject('excludedKbNumbers', parameters('excludeUpdates'), 'includedKbNumbers', parameters('includeUpdates'), 'includedUpdateClassifications', variables('updateClassificationsVar'), 'rebootSetting', parameters('rebootSetting')), null())]",
- "targets": {
- "azureQueries": [
- {
- "scope": "[parameters('scopeByResources')]",
- "tagSettings": {
- "tags": "[parameters('scopeByTags')]",
- "filterOperator": "[parameters('scopeByTagsOperation')]"
- },
- "locations": "[parameters('scopeByLocations')]"
- }
- ],
- "nonAzureQueries": "[parameters('nonAzureQueries')]"
- },
- "azureVirtualMachines": "[parameters('azureVirtualMachines')]",
- "nonAzureComputerNames": "[parameters('nonAzureComputerNames')]"
- },
- "tasks": {
- "preTask": {
- "parameters": "[if(empty(parameters('preTaskParameters')), null(), parameters('preTaskParameters'))]",
- "source": "[if(empty(parameters('preTaskSource')), null(), parameters('preTaskSource'))]"
- },
- "postTask": {
- "parameters": "[if(empty(parameters('postTaskParameters')), null(), parameters('postTaskParameters'))]",
- "source": "[if(empty(parameters('postTaskSource')), null(), parameters('postTaskSource'))]"
- }
- },
- "scheduleInfo": {
- "interval": "[parameters('interval')]",
- "frequency": "[parameters('frequency')]",
- "isEnabled": "[parameters('isEnabled')]",
- "timeZone": "[parameters('timeZone')]",
- "advancedSchedule": {
- "weekDays": "[if(empty(parameters('weekDays')), null(), parameters('weekDays'))]",
- "monthDays": "[if(empty(parameters('monthDays')), null(), parameters('monthDays'))]",
- "monthlyOccurrences": "[if(empty(parameters('monthlyOccurrences')), null(), parameters('monthlyOccurrences'))]"
- },
- "startTime": "[if(empty(parameters('startTime')), dateTimeAdd(parameters('baseTime'), 'PT10M'), parameters('startTime'))]",
- "expiryTime": "[parameters('expiryTime')]",
- "expiryTimeOffsetMinutes": "[parameters('expiryTimeOffsetMinutes')]",
- "nextRun": "[parameters('nextRun')]",
- "nextRunOffsetMinutes": "[parameters('nextRunOffsetMinutes')]",
- "description": "[parameters('scheduleDescription')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed softwareUpdateConfiguration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed softwareUpdateConfiguration."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/softwareUpdateConfigurations', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed softwareUpdateConfiguration."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/software-update-configuration/version.json b/modules/automation/automation-account/software-update-configuration/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/software-update-configuration/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/tests/e2e/defaults/main.test.bicep b/modules/automation/automation-account/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 2e93cc9a4a..0000000000
--- a/modules/automation/automation-account/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-automation.account-${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 = 'aamin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/automation/automation-account/tests/e2e/encr/dependencies.bicep b/modules/automation/automation-account/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index c0fbbed613..0000000000
--- a/modules/automation/automation-account/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,58 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- softDeleteRetentionInDays: 7
- enablePurgeProtection: true
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/automation/automation-account/tests/e2e/encr/main.test.bicep b/modules/automation/automation-account/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index ec8c934c0d..0000000000
--- a/modules/automation/automation-account/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,69 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-automation.account-${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 = 'aaencr'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- }
-}]
diff --git a/modules/automation/automation-account/tests/e2e/max/dependencies.bicep b/modules/automation/automation-account/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 3a979dc83b..0000000000
--- a/modules/automation/automation-account/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,90 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.azure-automation.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/automation/automation-account/tests/e2e/max/main.test.bicep b/modules/automation/automation-account/tests/e2e/max/main.test.bicep
deleted file mode 100644
index b77d8bbd82..0000000000
--- a/modules/automation/automation-account/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,272 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-automation.account-${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 = 'aamax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- gallerySolutions: [
- {
- name: 'Updates'
- product: 'OMSGallery'
- publisher: 'Microsoft'
- }
- ]
- jobSchedules: [
- {
- runbookName: 'TestRunbook'
- scheduleName: 'TestSchedule'
- }
- ]
- disableLocalAuth: true
- linkedWorkspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- modules: [
- {
- name: 'PSWindowsUpdate'
- uri: 'https://www.powershellgallery.com/api/v2/package'
- version: 'latest'
- }
- ]
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'Webhook'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'DSCAndHybridWorker'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- runbooks: [
- {
- description: 'Test runbook'
- name: 'TestRunbook'
- type: 'PowerShell'
- uri: 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.automation/101-automation/scripts/AzureAutomationTutorial.ps1'
- version: '1.0.0.0'
- }
- ]
- schedules: [
- {
- advancedSchedule: {}
- expiryTime: '9999-12-31T13:00'
- frequency: 'Hour'
- interval: 12
- name: 'TestSchedule'
- startTime: ''
- timeZone: 'Europe/Berlin'
- }
- ]
- softwareUpdateConfigurations: [
- {
- excludeUpdates: [
- '123456'
- ]
- frequency: 'Month'
- includeUpdates: [
- '654321'
- ]
- interval: 1
- maintenanceWindow: 'PT4H'
- monthlyOccurrences: [
- {
- day: 'Friday'
- occurrence: 3
- }
- ]
- name: 'Windows_ZeroDay'
- operatingSystem: 'Windows'
- rebootSetting: 'IfRequired'
- scopeByTags: {
- Update: [
- 'Automatic-Wave1'
- ]
- }
- startTime: '22:00'
- updateClassifications: [
- 'Critical'
- 'Definition'
- 'FeaturePack'
- 'Security'
- 'ServicePack'
- 'Tools'
- 'UpdateRollup'
- 'Updates'
- ]
- }
- {
- excludeUpdates: [
- 'icacls'
- ]
- frequency: 'OneTime'
- includeUpdates: [
- 'kernel'
- ]
- maintenanceWindow: 'PT4H'
- name: 'Linux_ZeroDay'
- operatingSystem: 'Linux'
- rebootSetting: 'IfRequired'
- startTime: '22:00'
- updateClassifications: [
- 'Critical'
- 'Other'
- 'Security'
- ]
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- variables: [
- {
- description: 'TestStringDescription'
- name: 'TestString'
- value: '\'TestString\''
- }
- {
- description: 'TestIntegerDescription'
- name: 'TestInteger'
- value: '500'
- }
- {
- description: 'TestBooleanDescription'
- name: 'TestBoolean'
- value: 'false'
- }
- {
- description: 'TestDateTimeDescription'
- isEncrypted: false
- name: 'TestDateTime'
- value: '\'\\/Date(1637934042656)\\/\''
- }
- {
- description: 'TestEncryptedDescription'
- name: 'TestEncryptedVariable'
- value: '\'TestEncryptedValue\''
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/automation/automation-account/tests/e2e/waf-aligned/dependencies.bicep b/modules/automation/automation-account/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 3a979dc83b..0000000000
--- a/modules/automation/automation-account/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,90 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.azure-automation.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep b/modules/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index e4d4913905..0000000000
--- a/modules/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,255 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-automation.account-${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 = 'aawaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- gallerySolutions: [
- {
- name: 'Updates'
- product: 'OMSGallery'
- publisher: 'Microsoft'
- }
- ]
- jobSchedules: [
- {
- runbookName: 'TestRunbook'
- scheduleName: 'TestSchedule'
- }
- ]
- disableLocalAuth: true
- linkedWorkspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- modules: [
- {
- name: 'PSWindowsUpdate'
- uri: 'https://www.powershellgallery.com/api/v2/package'
- version: 'latest'
- }
- ]
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'Webhook'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'DSCAndHybridWorker'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- runbooks: [
- {
- description: 'Test runbook'
- name: 'TestRunbook'
- type: 'PowerShell'
- uri: 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.automation/101-automation/scripts/AzureAutomationTutorial.ps1'
- version: '1.0.0.0'
- }
- ]
- schedules: [
- {
- advancedSchedule: {}
- expiryTime: '9999-12-31T13:00'
- frequency: 'Hour'
- interval: 12
- name: 'TestSchedule'
- startTime: ''
- timeZone: 'Europe/Berlin'
- }
- ]
- softwareUpdateConfigurations: [
- {
- excludeUpdates: [
- '123456'
- ]
- frequency: 'Month'
- includeUpdates: [
- '654321'
- ]
- interval: 1
- maintenanceWindow: 'PT4H'
- monthlyOccurrences: [
- {
- day: 'Friday'
- occurrence: 3
- }
- ]
- name: 'Windows_ZeroDay'
- operatingSystem: 'Windows'
- rebootSetting: 'IfRequired'
- scopeByTags: {
- Update: [
- 'Automatic-Wave1'
- ]
- }
- startTime: '22:00'
- updateClassifications: [
- 'Critical'
- 'Definition'
- 'FeaturePack'
- 'Security'
- 'ServicePack'
- 'Tools'
- 'UpdateRollup'
- 'Updates'
- ]
- }
- {
- excludeUpdates: [
- 'icacls'
- ]
- frequency: 'OneTime'
- includeUpdates: [
- 'kernel'
- ]
- maintenanceWindow: 'PT4H'
- name: 'Linux_ZeroDay'
- operatingSystem: 'Linux'
- rebootSetting: 'IfRequired'
- startTime: '22:00'
- updateClassifications: [
- 'Critical'
- 'Other'
- 'Security'
- ]
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- variables: [
- {
- description: 'TestStringDescription'
- name: 'TestString'
- value: '\'TestString\''
- }
- {
- description: 'TestIntegerDescription'
- name: 'TestInteger'
- value: '500'
- }
- {
- description: 'TestBooleanDescription'
- name: 'TestBoolean'
- value: 'false'
- }
- {
- description: 'TestDateTimeDescription'
- isEncrypted: false
- name: 'TestDateTime'
- value: '\'\\/Date(1637934042656)\\/\''
- }
- {
- description: 'TestEncryptedDescription'
- name: 'TestEncryptedVariable'
- value: '\'TestEncryptedValue\''
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/automation/automation-account/variable/README.md b/modules/automation/automation-account/variable/README.md
deleted file mode 100644
index f6b15abae7..0000000000
--- a/modules/automation/automation-account/variable/README.md
+++ /dev/null
@@ -1,152 +0,0 @@
-# Automation Account Variables `[Microsoft.Automation/automationAccounts/variables]`
-
-This module deploys an Azure Automation Account Variable.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Automation/automationAccounts/variables` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/variables) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the variable. |
-| [`value`](#parameter-value) | securestring | The value of the variable. For security best practices, this value is always passed as a secure string as it could contain an encrypted value when the "isEncrypted" property is set to true. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automationAccountName`](#parameter-automationaccountname) | string | The name of the parent Automation Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The description of the variable. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`isEncrypted`](#parameter-isencrypted) | bool | If the variable should be encrypted. For security reasons encryption of variables should be enabled. |
-
-### Parameter: `name`
-
-The name of the variable.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `value`
-
-The value of the variable. For security best practices, this value is always passed as a secure string as it could contain an encrypted value when the "isEncrypted" property is set to true.
-
-- Required: Yes
-- Type: securestring
-
-### Parameter: `automationAccountName`
-
-The name of the parent Automation Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-The description of the variable.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `isEncrypted`
-
-If the variable should be encrypted. For security reasons encryption of variables should be enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed variable. |
-| `resourceGroupName` | string | The resource group of the deployed variable. |
-| `resourceId` | string | The resource ID of the deployed variable. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-
-### Parameter Usage: `value`
-
-
diff --git a/modules/automation/automation-account/variable/main.bicep b/modules/automation/automation-account/variable/main.bicep
deleted file mode 100644
index fa22969cbc..0000000000
--- a/modules/automation/automation-account/variable/main.bicep
+++ /dev/null
@@ -1,57 +0,0 @@
-metadata name = 'Automation Account Variables'
-metadata description = 'This module deploys an Azure Automation Account Variable.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment.')
-param automationAccountName string
-
-@sys.description('Required. The name of the variable.')
-param name string
-
-@secure()
-@sys.description('Required. The value of the variable. For security best practices, this value is always passed as a secure string as it could contain an encrypted value when the "isEncrypted" property is set to true.')
-param value string
-
-@sys.description('Optional. The description of the variable.')
-param description string = ''
-
-@sys.description('Optional. If the variable should be encrypted. For security reasons encryption of variables should be enabled.')
-param isEncrypted bool = true
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' existing = {
- name: automationAccountName
-}
-
-resource variable 'Microsoft.Automation/automationAccounts/variables@2022-08-08' = {
- name: name
- parent: automationAccount
- properties: {
- description: description
- isEncrypted: isEncrypted
- value: value
- }
-}
-
-@sys.description('The name of the deployed variable.')
-output name string = variable.name
-
-@sys.description('The resource ID of the deployed variable.')
-output resourceId string = variable.id
-
-@sys.description('The resource group of the deployed variable.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/automation/automation-account/variable/main.json b/modules/automation/automation-account/variable/main.json
deleted file mode 100644
index 333cb278b4..0000000000
--- a/modules/automation/automation-account/variable/main.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17400819380217562013"
- },
- "name": "Automation Account Variables",
- "description": "This module deploys an Azure Automation Account Variable.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "automationAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Automation Account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the variable."
- }
- },
- "value": {
- "type": "securestring",
- "metadata": {
- "description": "Required. The value of the variable. For security best practices, this value is always passed as a secure string as it could contain an encrypted value when the \"isEncrypted\" property is set to true."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the variable."
- }
- },
- "isEncrypted": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. If the variable should be encrypted. For security reasons encryption of variables should be enabled."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Automation/automationAccounts/variables",
- "apiVersion": "2022-08-08",
- "name": "[format('{0}/{1}', parameters('automationAccountName'), parameters('name'))]",
- "properties": {
- "description": "[parameters('description')]",
- "isEncrypted": "[parameters('isEncrypted')]",
- "value": "[parameters('value')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed variable."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed variable."
- },
- "value": "[resourceId('Microsoft.Automation/automationAccounts/variables', parameters('automationAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed variable."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/automation/automation-account/variable/version.json b/modules/automation/automation-account/variable/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/variable/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/automation/automation-account/version.json b/modules/automation/automation-account/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/automation/automation-account/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/batch/batch-account/MOVED-TO-AVM.md b/modules/batch/batch-account/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/batch/batch-account/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/batch/batch-account/README.md b/modules/batch/batch-account/README.md
index 74a78f3d57..f9df9b2ab8 100644
--- a/modules/batch/batch-account/README.md
+++ b/modules/batch/batch-account/README.md
@@ -1,1288 +1,7 @@
-# Batch Accounts `[Microsoft.Batch/batchAccounts]`
+
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Azure Batch. |
-| [`storageAccountId`](#parameter-storageaccountid) | string | The resource ID of the storage account to be used for auto-storage account. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`cMKKeyVaultResourceId`](#parameter-cmkkeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. Required if 'cMKKeyName' is not empty. |
-| [`keyVaultReferenceResourceId`](#parameter-keyvaultreferenceresourceid) | string | The key vault to associate with the Batch account. Required if the 'poolAllocationMode' is set to 'UserSubscription' and requires the service principal 'Microsoft Azure Batch' to be granted contributor permissions on this key vault. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`allowedAuthenticationModes`](#parameter-allowedauthenticationmodes) | array | List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. |
-| [`cMKKeyName`](#parameter-cmkkeyname) | string | The name of the customer managed key to use for encryption. |
-| [`cMKKeyVersion`](#parameter-cmkkeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, the latest key version is used. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both. |
-| [`networkProfileAllowedIpRanges`](#parameter-networkprofileallowedipranges) | array | Array of IP ranges to filter client IP address. It is only applicable when publicNetworkAccess is not explicitly disabled. |
-| [`networkProfileDefaultAction`](#parameter-networkprofiledefaultaction) | string | The network profile default action for endpoint access. It is only applicable when publicNetworkAccess is not explicitly disabled. |
-| [`poolAllocationMode`](#parameter-poolallocationmode) | string | The allocation mode for creating pools in the Batch account. Determines which quota will be used. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkProfileAllowedIpRanges are not set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`storageAccessIdentity`](#parameter-storageaccessidentity) | string | The resource ID of a user assigned identity assigned to pools which have compute nodes that need access to auto-storage. |
-| [`storageAuthenticationMode`](#parameter-storageauthenticationmode) | string | The authentication mode which the Batch service will use to manage the auto-storage account. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-Name of the Azure Batch.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `storageAccountId`
-
-The resource ID of the storage account to be used for auto-storage account.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `cMKKeyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from. Required if 'cMKKeyName' is not empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `keyVaultReferenceResourceId`
-
-The key vault to associate with the Batch account. Required if the 'poolAllocationMode' is set to 'UserSubscription' and requires the service principal 'Microsoft Azure Batch' to be granted contributor permissions on this key vault.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `allowedAuthenticationModes`
-
-List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'AAD'
- 'SharedKey'
- 'TaskAuthenticationToken'
- ]
- ```
-
-### Parameter: `cMKKeyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `cMKKeyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, the latest key version is used.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `networkProfileAllowedIpRanges`
-
-Array of IP ranges to filter client IP address. It is only applicable when publicNetworkAccess is not explicitly disabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `networkProfileDefaultAction`
-
-The network profile default action for endpoint access. It is only applicable when publicNetworkAccess is not explicitly disabled.
-
-- Required: No
-- Type: string
-- Default: `'Deny'`
-- Allowed:
- ```Bicep
- [
- 'Allow'
- 'Deny'
- ]
- ```
-
-### Parameter: `poolAllocationMode`
-
-The allocation mode for creating pools in the Batch account. Determines which quota will be used.
-
-- Required: No
-- Type: string
-- Default: `'BatchService'`
-- Allowed:
- ```Bicep
- [
- 'BatchService'
- 'UserSubscription'
- ]
- ```
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkProfileAllowedIpRanges are not set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `storageAccessIdentity`
-
-The resource ID of a user assigned identity assigned to pools which have compute nodes that need access to auto-storage.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `storageAuthenticationMode`
-
-The authentication mode which the Batch service will use to manage the auto-storage account.
-
-- Required: No
-- Type: string
-- Default: `'StorageKeys'`
-- Allowed:
- ```Bicep
- [
- 'BatchAccountManagedIdentity'
- 'StorageKeys'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the batch account. |
-| `resourceGroupName` | string | The resource group the batch account was deployed into. |
-| `resourceId` | string | The resource ID of the batch account. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/batch/batch-account/main.bicep b/modules/batch/batch-account/main.bicep
deleted file mode 100644
index 476a5045a1..0000000000
--- a/modules/batch/batch-account/main.bicep
+++ /dev/null
@@ -1,407 +0,0 @@
-metadata name = 'Batch Accounts'
-metadata description = 'This module deploys a Batch Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Azure Batch.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.')
-param managedIdentities managedIdentitiesType
-
-@description('Required. The resource ID of the storage account to be used for auto-storage account.')
-param storageAccountId string
-
-@allowed([
- 'BatchAccountManagedIdentity'
- 'StorageKeys'
-])
-@description('Optional. The authentication mode which the Batch service will use to manage the auto-storage account.')
-param storageAuthenticationMode string = 'StorageKeys'
-
-@description('Optional. The resource ID of a user assigned identity assigned to pools which have compute nodes that need access to auto-storage.')
-param storageAccessIdentity string = ''
-
-@allowed([
- 'BatchService'
- 'UserSubscription'
-])
-@description('Optional. The allocation mode for creating pools in the Batch account. Determines which quota will be used.')
-param poolAllocationMode string = 'BatchService'
-
-@description('Conditional. The key vault to associate with the Batch account. Required if the \'poolAllocationMode\' is set to \'UserSubscription\' and requires the service principal \'Microsoft Azure Batch\' to be granted contributor permissions on this key vault.')
-param keyVaultReferenceResourceId string = ''
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkProfileAllowedIpRanges are not set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@allowed([
- 'Allow'
- 'Deny'
-])
-@description('Optional. The network profile default action for endpoint access. It is only applicable when publicNetworkAccess is not explicitly disabled.')
-param networkProfileDefaultAction string = 'Deny'
-
-@description('Optional. Array of IP ranges to filter client IP address. It is only applicable when publicNetworkAccess is not explicitly disabled.')
-param networkProfileAllowedIpRanges array = []
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags 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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@allowed([
- 'AAD'
- 'SharedKey'
- 'TaskAuthenticationToken'
-])
-@description('Optional. List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane.')
-param allowedAuthenticationModes array = []
-
-@description('Conditional. The resource ID of a key vault to reference a customer managed key for encryption from. Required if \'cMKKeyName\' is not empty.')
-param cMKKeyVaultResourceId string = ''
-
-@description('Optional. The name of the customer managed key to use for encryption.')
-param cMKKeyName string = ''
-
-@description('Optional. The version of the customer managed key to reference for encryption. If not provided, the latest key version is used.')
-param cMKKeyVersion string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? 'SystemAssigned' : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var networkProfileIpRules = [for networkProfileAllowedIpRange in networkProfileAllowedIpRanges: {
- action: 'Allow'
- value: networkProfileAllowedIpRange
-}]
-
-var nodeIdentityReference = !empty(storageAccessIdentity) ? {
- resourceId: !empty(storageAccessIdentity) ? storageAccessIdentity : null
-} : null
-
-var autoStorageConfig = {
- authenticationMode: storageAuthenticationMode
- nodeIdentityReference: nodeIdentityReference
- storageAccountId: storageAccountId
-}
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId)) {
- name: last(split((!empty(cMKKeyVaultResourceId) ? cMKKeyVaultResourceId : 'dummyVault'), '/'))!
- scope: resourceGroup(split((!empty(cMKKeyVaultResourceId) ? cMKKeyVaultResourceId : '//'), '/')[2], split((!empty(cMKKeyVaultResourceId) ? cMKKeyVaultResourceId : '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(cMKKeyName)) {
- name: !empty(cMKKeyName) ? cMKKeyName : 'dummyKey'
- }
-}
-
-resource batchAccount 'Microsoft.Batch/batchAccounts@2022-06-01' = {
- name: name
- location: location
- tags: tags
- identity: identity
- properties: {
- allowedAuthenticationModes: allowedAuthenticationModes
- autoStorage: autoStorageConfig
- encryption: !empty(cMKKeyName) ? {
- keySource: 'Microsoft.KeyVault'
- keyVaultProperties: {
- keyIdentifier: !empty(cMKKeyVersion) ? '${cMKKeyVault::cMKKey.properties.keyUri}/${cMKKeyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- }
- } : null
- keyVaultReference: poolAllocationMode == 'UserSubscription' ? {
- id: keyVaultReferenceResourceId
- url: cMKKeyVault.properties.vaultUri
- } : null
- networkProfile: (publicNetworkAccess == 'Disabled') || empty(networkProfileAllowedIpRanges) ? null : {
- accountAccess: {
- defaultAction: networkProfileDefaultAction
- ipRules: networkProfileIpRules
- }
- }
- poolAllocationMode: poolAllocationMode
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) && empty(networkProfileAllowedIpRanges) ? 'Disabled' : null)
- }
-}
-
-resource batchAccount_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: batchAccount
-}
-
-resource batchAccount_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: batchAccount
-}]
-
-resource batchAccount_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(batchAccount.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: batchAccount
-}]
-
-module batchAccount_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-batchAccount-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'batchAccount'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(batchAccount.id, '/'))}-${privateEndpoint.?service ?? 'batchAccount'}-${index}'
- serviceResourceId: batchAccount.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The name of the batch account.')
-output name string = batchAccount.name
-
-@description('The resource ID of the batch account.')
-output resourceId string = batchAccount.id
-
-@description('The resource group the batch account was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = batchAccount.location
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(batchAccount.identity, 'principalId') ? batchAccount.identity.principalId : ''
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/batch/batch-account/main.json b/modules/batch/batch-account/main.json
deleted file mode 100644
index 963156fc27..0000000000
--- a/modules/batch/batch-account/main.json
+++ /dev/null
@@ -1,1373 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "12136628607007085448"
- },
- "name": "Batch Accounts",
- "description": "This module deploys a Batch Account.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Azure Batch."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both."
- }
- },
- "storageAccountId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the storage account to be used for auto-storage account."
- }
- },
- "storageAuthenticationMode": {
- "type": "string",
- "defaultValue": "StorageKeys",
- "allowedValues": [
- "BatchAccountManagedIdentity",
- "StorageKeys"
- ],
- "metadata": {
- "description": "Optional. The authentication mode which the Batch service will use to manage the auto-storage account."
- }
- },
- "storageAccessIdentity": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of a user assigned identity assigned to pools which have compute nodes that need access to auto-storage."
- }
- },
- "poolAllocationMode": {
- "type": "string",
- "defaultValue": "BatchService",
- "allowedValues": [
- "BatchService",
- "UserSubscription"
- ],
- "metadata": {
- "description": "Optional. The allocation mode for creating pools in the Batch account. Determines which quota will be used."
- }
- },
- "keyVaultReferenceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The key vault to associate with the Batch account. Required if the 'poolAllocationMode' is set to 'UserSubscription' and requires the service principal 'Microsoft Azure Batch' to be granted contributor permissions on this key vault."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkProfileAllowedIpRanges are not set."
- }
- },
- "networkProfileDefaultAction": {
- "type": "string",
- "defaultValue": "Deny",
- "allowedValues": [
- "Allow",
- "Deny"
- ],
- "metadata": {
- "description": "Optional. The network profile default action for endpoint access. It is only applicable when publicNetworkAccess is not explicitly disabled."
- }
- },
- "networkProfileAllowedIpRanges": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of IP ranges to filter client IP address. It is only applicable when publicNetworkAccess is not explicitly disabled."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "allowedAuthenticationModes": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "AAD",
- "SharedKey",
- "TaskAuthenticationToken"
- ],
- "metadata": {
- "description": "Optional. List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane."
- }
- },
- "cMKKeyVaultResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The resource ID of a key vault to reference a customer managed key for encryption from. Required if 'cMKKeyName' is not empty."
- }
- },
- "cMKKeyName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the customer managed key to use for encryption."
- }
- },
- "cMKKeyVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, the latest key version is used."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "networkProfileIpRules",
- "count": "[length(parameters('networkProfileAllowedIpRanges'))]",
- "input": {
- "action": "Allow",
- "value": "[parameters('networkProfileAllowedIpRanges')[copyIndex('networkProfileIpRules')]]"
- }
- }
- ],
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), 'SystemAssigned', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "nodeIdentityReference": "[if(not(empty(parameters('storageAccessIdentity'))), createObject('resourceId', if(not(empty(parameters('storageAccessIdentity'))), parameters('storageAccessIdentity'), null())), null())]",
- "autoStorageConfig": {
- "authenticationMode": "[parameters('storageAuthenticationMode')]",
- "nodeIdentityReference": "[variables('nodeIdentityReference')]",
- "storageAccountId": "[parameters('storageAccountId')]"
- },
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(parameters('cMKKeyVaultResourceId'))), not(empty(parameters('cMKKeyName'))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), 'dummyVault'), '/')), if(not(empty(parameters('cMKKeyName'))), parameters('cMKKeyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(parameters('cMKKeyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2021-10-01",
- "subscriptionId": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "batchAccount": {
- "type": "Microsoft.Batch/batchAccounts",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "allowedAuthenticationModes": "[parameters('allowedAuthenticationModes')]",
- "autoStorage": "[variables('autoStorageConfig')]",
- "encryption": "[if(not(empty(parameters('cMKKeyName'))), createObject('keySource', 'Microsoft.KeyVault', 'keyVaultProperties', createObject('keyIdentifier', if(not(empty(parameters('cMKKeyVersion'))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('cMKKeyVersion')), reference('cMKKeyVault::cMKKey').keyUriWithVersion))), null())]",
- "keyVaultReference": "[if(equals(parameters('poolAllocationMode'), 'UserSubscription'), createObject('id', parameters('keyVaultReferenceResourceId'), 'url', reference('cMKKeyVault').vaultUri), null())]",
- "networkProfile": "[if(or(equals(parameters('publicNetworkAccess'), 'Disabled'), empty(parameters('networkProfileAllowedIpRanges'))), null(), createObject('accountAccess', createObject('defaultAction', parameters('networkProfileDefaultAction'), 'ipRules', variables('networkProfileIpRules'))))]",
- "poolAllocationMode": "[parameters('poolAllocationMode')]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('networkProfileAllowedIpRanges'))), 'Disabled', null()))]"
- },
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "batchAccount_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Batch/batchAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "batchAccount"
- ]
- },
- "batchAccount_diagnosticSettings": {
- "copy": {
- "name": "batchAccount_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Batch/batchAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "batchAccount"
- ]
- },
- "batchAccount_roleAssignments": {
- "copy": {
- "name": "batchAccount_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Batch/batchAccounts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Batch/batchAccounts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "batchAccount"
- ]
- },
- "batchAccount_privateEndpoints": {
- "copy": {
- "name": "batchAccount_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-batchAccount-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'batchAccount')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Batch/batchAccounts', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'batchAccount'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.Batch/batchAccounts', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "batchAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the batch account."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the batch account."
- },
- "value": "[resourceId('Microsoft.Batch/batchAccounts', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the batch account was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('batchAccount', '2022-06-01', 'full').location]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('batchAccount', '2022-06-01', 'full').identity, 'principalId')), reference('batchAccount', '2022-06-01', 'full').identity.principalId, '')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/batch/batch-account/tests/e2e/defaults/dependencies.bicep b/modules/batch/batch-account/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index f069fcdbd9..0000000000
--- a/modules/batch/batch-account/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,17 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/batch/batch-account/tests/e2e/defaults/main.test.bicep b/modules/batch/batch-account/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index aa138f8c7d..0000000000
--- a/modules/batch/batch-account/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,58 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${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 = 'bbamin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- storageAccountId: nestedDependencies.outputs.storageAccountResourceId
- }
-}]
diff --git a/modules/batch/batch-account/tests/e2e/encr/dependencies.bicep b/modules/batch/batch-account/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index 9b4b4dd4cc..0000000000
--- a/modules/batch/batch-account/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,123 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.batch.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/batch/batch-account/tests/e2e/encr/main.test.bicep b/modules/batch/batch-account/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index f32f9a7655..0000000000
--- a/modules/batch/batch-account/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,91 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${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 = 'bbaencr'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- storageAccountId: nestedDependencies.outputs.storageAccountResourceId
- cMKKeyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- cMKKeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- poolAllocationMode: 'BatchService'
- privateEndpoints: [
- {
- service: 'batchAccount'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- storageAccessIdentity: nestedDependencies.outputs.managedIdentityResourceId
- storageAuthenticationMode: 'BatchAccountManagedIdentity'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/batch/batch-account/tests/e2e/max/dependencies.bicep b/modules/batch/batch-account/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 462e8a5f27..0000000000
--- a/modules/batch/batch-account/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,78 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.batch.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/batch/batch-account/tests/e2e/max/main.test.bicep b/modules/batch/batch-account/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 64ae401f0e..0000000000
--- a/modules/batch/batch-account/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,130 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${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 = 'bbamax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- storageAccountId: nestedDependencies.outputs.storageAccountResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- poolAllocationMode: 'BatchService'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- privateEndpoints: [
- {
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- storageAccessIdentity: nestedDependencies.outputs.managedIdentityResourceId
- storageAuthenticationMode: 'BatchAccountManagedIdentity'
- managedIdentities: {
- systemAssigned: true
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/batch/batch-account/tests/e2e/waf-aligned/dependencies.bicep b/modules/batch/batch-account/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 462e8a5f27..0000000000
--- a/modules/batch/batch-account/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,78 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.batch.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep b/modules/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index d4edb44cb9..0000000000
--- a/modules/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,130 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${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 = 'bbawaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- storageAccountId: nestedDependencies.outputs.storageAccountResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- poolAllocationMode: 'BatchService'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- privateEndpoints: [
- {
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- storageAccessIdentity: nestedDependencies.outputs.managedIdentityResourceId
- storageAuthenticationMode: 'BatchAccountManagedIdentity'
- managedIdentities: {
- systemAssigned: true
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/batch/batch-account/version.json b/modules/batch/batch-account/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/batch/batch-account/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cache/redis-enterprise/README.md b/modules/cache/redis-enterprise/README.md
index c39d1698a8..13ee7a290a 100644
--- a/modules/cache/redis-enterprise/README.md
+++ b/modules/cache/redis-enterprise/README.md
@@ -1,1188 +1,7 @@
-# Redis Cache Enterprise `[Microsoft.Cache/redisEnterprise]`
+
-
-
-
-### Example 2: _Geo_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Redis Cache Enterprise resource. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`capacity`](#parameter-capacity) | int | The size of the Redis Enterprise Cluster. Defaults to 2. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs. |
-| [`databases`](#parameter-databases) | array | The databases to create in the Redis Cache Enterprise Cluster. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | The geo-location where the resource lives. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`minimumTlsVersion`](#parameter-minimumtlsversion) | string | Requires clients to use a specified TLS version (or higher) to connect. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`skuName`](#parameter-skuname) | string | The type of Redis Enterprise Cluster to deploy. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`zoneRedundant`](#parameter-zoneredundant) | bool | When true, the cluster will be deployed across availability zones. |
-
-### Parameter: `name`
-
-The name of the Redis Cache Enterprise resource.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `capacity`
-
-The size of the Redis Enterprise Cluster. Defaults to 2. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs.
-
-- Required: No
-- Type: int
-- Default: `2`
-
-### Parameter: `databases`
-
-The databases to create in the Redis Cache Enterprise Cluster.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-The geo-location where the resource lives.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `minimumTlsVersion`
-
-Requires clients to use a specified TLS version (or higher) to connect.
-
-- Required: No
-- Type: string
-- Default: `'1.2'`
-- Allowed:
- ```Bicep
- [
- '1.0'
- '1.1'
- '1.2'
- ]
- ```
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `skuName`
-
-The type of Redis Enterprise Cluster to deploy.
-
-- Required: No
-- Type: string
-- Default: `'Enterprise_E10'`
-- Allowed:
- ```Bicep
- [
- 'Enterprise_E10'
- 'Enterprise_E100'
- 'Enterprise_E20'
- 'Enterprise_E50'
- 'EnterpriseFlash_F1500'
- 'EnterpriseFlash_F300'
- 'EnterpriseFlash_F700'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `zoneRedundant`
-
-When true, the cluster will be deployed across availability zones.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `hostName` | string | Redis hostname. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the redis cache enterprise. |
-| `resourceGroupName` | string | The name of the resource group the redis cache enterprise was created in. |
-| `resourceId` | string | The resource ID of the redis cache enterprise. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/cache/redis-enterprise/database/README.md b/modules/cache/redis-enterprise/database/README.md
deleted file mode 100644
index 31f20ebd4b..0000000000
--- a/modules/cache/redis-enterprise/database/README.md
+++ /dev/null
@@ -1,255 +0,0 @@
-# Redis Cache Enterprise Databases `[Microsoft.Cache/redisEnterprise/databases]`
-
-This module deploys a Redis Cache Enterprise Database.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cache/redisEnterprise/databases` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cache/2022-01-01/redisEnterprise/databases) |
-
-## Parameters
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`persistenceAofFrequency`](#parameter-persistenceaoffrequency) | string | Sets the frequency at which data is written to disk. Required if AOF persistence is enabled. |
-| [`persistenceRdbFrequency`](#parameter-persistencerdbfrequency) | string | Sets the frequency at which a snapshot of the database is created. Required if RDB persistence is enabled. |
-| [`redisCacheEnterpriseName`](#parameter-rediscacheenterprisename) | string | The name of the parent Redis Cache Enterprise Cluster. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`clientProtocol`](#parameter-clientprotocol) | string | Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. |
-| [`clusteringPolicy`](#parameter-clusteringpolicy) | string | Specifies the clustering policy to enable at creation time of the Redis Cache Enterprise Cluster. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`evictionPolicy`](#parameter-evictionpolicy) | string | Redis eviction policy - default is VolatileLRU. |
-| [`geoReplication`](#parameter-georeplication) | object | Optional set of properties to configure geo replication for this database. Geo replication prerequisites must be met. See "https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-active-geo-replication#active-geo-replication-prerequisites" for more information. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`modules`](#parameter-modules) | array | Optional set of redis modules to enable in this database - modules can only be added at creation time. |
-| [`persistenceAofEnabled`](#parameter-persistenceaofenabled) | bool | Sets whether AOF is enabled. Required if setting AOF frequency. AOF and RDB persistence cannot be enabled at the same time. |
-| [`persistenceRdbEnabled`](#parameter-persistencerdbenabled) | bool | Sets whether RDB is enabled. RDB and AOF persistence cannot be enabled at the same time. |
-| [`port`](#parameter-port) | int | TCP port of the database endpoint. Specified at create time. Default is (-1) meaning value is not set and defaults to an available port. Current supported port is 10000. |
-
-### Parameter: `persistenceAofFrequency`
-
-Sets the frequency at which data is written to disk. Required if AOF persistence is enabled.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- '1s'
- 'always'
- ]
- ```
-
-### Parameter: `persistenceRdbFrequency`
-
-Sets the frequency at which a snapshot of the database is created. Required if RDB persistence is enabled.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- '12h'
- '1h'
- '6h'
- ]
- ```
-
-### Parameter: `redisCacheEnterpriseName`
-
-The name of the parent Redis Cache Enterprise Cluster. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `clientProtocol`
-
-Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
-
-- Required: No
-- Type: string
-- Default: `'Encrypted'`
-- Allowed:
- ```Bicep
- [
- 'Encrypted'
- 'Plaintext'
- ]
- ```
-
-### Parameter: `clusteringPolicy`
-
-Specifies the clustering policy to enable at creation time of the Redis Cache Enterprise Cluster.
-
-- Required: No
-- Type: string
-- Default: `'OSSCluster'`
-- Allowed:
- ```Bicep
- [
- 'EnterpriseCluster'
- 'OSSCluster'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `evictionPolicy`
-
-Redis eviction policy - default is VolatileLRU.
-
-- Required: No
-- Type: string
-- Default: `'VolatileLRU'`
-- Allowed:
- ```Bicep
- [
- 'AllKeysLFU'
- 'AllKeysLRU'
- 'AllKeysRandom'
- 'NoEviction'
- 'VolatileLFU'
- 'VolatileLRU'
- 'VolatileRandom'
- 'VolatileTTL'
- ]
- ```
-
-### Parameter: `geoReplication`
-
-Optional set of properties to configure geo replication for this database. Geo replication prerequisites must be met. See "https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-active-geo-replication#active-geo-replication-prerequisites" for more information.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `modules`
-
-Optional set of redis modules to enable in this database - modules can only be added at creation time.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `persistenceAofEnabled`
-
-Sets whether AOF is enabled. Required if setting AOF frequency. AOF and RDB persistence cannot be enabled at the same time.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `persistenceRdbEnabled`
-
-Sets whether RDB is enabled. RDB and AOF persistence cannot be enabled at the same time.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `port`
-
-TCP port of the database endpoint. Specified at create time. Default is (-1) meaning value is not set and defaults to an available port. Current supported port is 10000.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed database. |
-| `resourceGroupName` | string | The resource group of the deployed database. |
-| `resourceId` | string | The resource ID of the deployed database. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `modules`
-
-Optional set of Redis modules to enable in this database. Modules can only be added at creation time. Each module requires a name (e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries') and optionally an argument (e.g. 'ERROR_RATE 0.01 INITIAL_SIZE 400'). See [Redis Cache modules documentation](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-redis-modules) for more information.
-
-
diff --git a/modules/cache/redis-enterprise/database/main.bicep b/modules/cache/redis-enterprise/database/main.bicep
deleted file mode 100644
index 793f8294a4..0000000000
--- a/modules/cache/redis-enterprise/database/main.bicep
+++ /dev/null
@@ -1,115 +0,0 @@
-metadata name = 'Redis Cache Enterprise Databases'
-metadata description = 'This module deploys a Redis Cache Enterprise Database.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Redis Cache Enterprise Cluster. Required if the template is used in a standalone deployment.')
-param redisCacheEnterpriseName string
-
-@allowed([
- 'Encrypted'
- 'Plaintext'
-])
-@description('Optional. Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.')
-param clientProtocol string = 'Encrypted'
-
-@allowed([
- 'EnterpriseCluster'
- 'OSSCluster'
-])
-@description('Optional. Specifies the clustering policy to enable at creation time of the Redis Cache Enterprise Cluster.')
-param clusteringPolicy string = 'OSSCluster'
-
-@allowed([
- 'AllKeysLFU'
- 'AllKeysLRU'
- 'AllKeysRandom'
- 'NoEviction'
- 'VolatileLFU'
- 'VolatileLRU'
- 'VolatileRandom'
- 'VolatileTTL'
-])
-@description('Optional. Redis eviction policy - default is VolatileLRU.')
-param evictionPolicy string = 'VolatileLRU'
-
-@description('Optional. Optional set of properties to configure geo replication for this database. Geo replication prerequisites must be met. See "https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-active-geo-replication#active-geo-replication-prerequisites" for more information.')
-param geoReplication object = {}
-
-@description('Optional. Optional set of redis modules to enable in this database - modules can only be added at creation time.')
-param modules array = []
-
-@description('Optional. Sets whether AOF is enabled. Required if setting AOF frequency. AOF and RDB persistence cannot be enabled at the same time.')
-param persistenceAofEnabled bool = false
-
-@allowed([
- ''
- '1s'
- 'always'
-])
-@description('Conditional. Sets the frequency at which data is written to disk. Required if AOF persistence is enabled.')
-param persistenceAofFrequency string = ''
-
-@description('Optional. Sets whether RDB is enabled. RDB and AOF persistence cannot be enabled at the same time.')
-param persistenceRdbEnabled bool = false
-
-@allowed([
- ''
- '12h'
- '1h'
- '6h'
-])
-@description('Conditional. Sets the frequency at which a snapshot of the database is created. Required if RDB persistence is enabled.')
-param persistenceRdbFrequency string = ''
-
-@description('Optional. TCP port of the database endpoint. Specified at create time. Default is (-1) meaning value is not set and defaults to an available port. Current supported port is 10000.')
-param port int = -1
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource redisCacheEnterprise 'Microsoft.Cache/redisEnterprise@2022-01-01' existing = {
- name: redisCacheEnterpriseName
-}
-
-resource database 'Microsoft.Cache/redisEnterprise/databases@2022-01-01' = {
- name: 'default'
- parent: redisCacheEnterprise
- properties: {
- clientProtocol: !empty(clientProtocol) ? clientProtocol : null
- clusteringPolicy: !empty(clusteringPolicy) ? clusteringPolicy : null
- evictionPolicy: !empty(evictionPolicy) ? evictionPolicy : null
- geoReplication: !empty(geoReplication) ? geoReplication : null
- modules: !empty(modules) ? modules : null
- persistence: {
- aofEnabled: persistenceAofEnabled
- aofFrequency: !empty(persistenceAofFrequency) ? persistenceAofFrequency : null
- rdbEnabled: persistenceRdbEnabled
- rdbFrequency: !empty(persistenceRdbFrequency) ? persistenceRdbFrequency : null
- }
- port: port != -1 ? port : null
- }
-}
-
-@description('The name of the deployed database.')
-output name string = database.name
-
-@description('The resource ID of the deployed database.')
-output resourceId string = database.id
-
-@description('The resource group of the deployed database.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cache/redis-enterprise/database/main.json b/modules/cache/redis-enterprise/database/main.json
deleted file mode 100644
index d5698a412b..0000000000
--- a/modules/cache/redis-enterprise/database/main.json
+++ /dev/null
@@ -1,193 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "8155705065039005753"
- },
- "name": "Redis Cache Enterprise Databases",
- "description": "This module deploys a Redis Cache Enterprise Database.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "redisCacheEnterpriseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Redis Cache Enterprise Cluster. Required if the template is used in a standalone deployment."
- }
- },
- "clientProtocol": {
- "type": "string",
- "defaultValue": "Encrypted",
- "allowedValues": [
- "Encrypted",
- "Plaintext"
- ],
- "metadata": {
- "description": "Optional. Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted."
- }
- },
- "clusteringPolicy": {
- "type": "string",
- "defaultValue": "OSSCluster",
- "allowedValues": [
- "EnterpriseCluster",
- "OSSCluster"
- ],
- "metadata": {
- "description": "Optional. Specifies the clustering policy to enable at creation time of the Redis Cache Enterprise Cluster."
- }
- },
- "evictionPolicy": {
- "type": "string",
- "defaultValue": "VolatileLRU",
- "allowedValues": [
- "AllKeysLFU",
- "AllKeysLRU",
- "AllKeysRandom",
- "NoEviction",
- "VolatileLFU",
- "VolatileLRU",
- "VolatileRandom",
- "VolatileTTL"
- ],
- "metadata": {
- "description": "Optional. Redis eviction policy - default is VolatileLRU."
- }
- },
- "geoReplication": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Optional set of properties to configure geo replication for this database. Geo replication prerequisites must be met. See \"https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-active-geo-replication#active-geo-replication-prerequisites\" for more information."
- }
- },
- "modules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Optional set of redis modules to enable in this database - modules can only be added at creation time."
- }
- },
- "persistenceAofEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Sets whether AOF is enabled. Required if setting AOF frequency. AOF and RDB persistence cannot be enabled at the same time."
- }
- },
- "persistenceAofFrequency": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "1s",
- "always"
- ],
- "metadata": {
- "description": "Conditional. Sets the frequency at which data is written to disk. Required if AOF persistence is enabled."
- }
- },
- "persistenceRdbEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Sets whether RDB is enabled. RDB and AOF persistence cannot be enabled at the same time."
- }
- },
- "persistenceRdbFrequency": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "12h",
- "1h",
- "6h"
- ],
- "metadata": {
- "description": "Conditional. Sets the frequency at which a snapshot of the database is created. Required if RDB persistence is enabled."
- }
- },
- "port": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. TCP port of the database endpoint. Specified at create time. Default is (-1) meaning value is not set and defaults to an available port. Current supported port is 10000."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cache/redisEnterprise/databases",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('redisCacheEnterpriseName'), 'default')]",
- "properties": {
- "clientProtocol": "[if(not(empty(parameters('clientProtocol'))), parameters('clientProtocol'), null())]",
- "clusteringPolicy": "[if(not(empty(parameters('clusteringPolicy'))), parameters('clusteringPolicy'), null())]",
- "evictionPolicy": "[if(not(empty(parameters('evictionPolicy'))), parameters('evictionPolicy'), null())]",
- "geoReplication": "[if(not(empty(parameters('geoReplication'))), parameters('geoReplication'), null())]",
- "modules": "[if(not(empty(parameters('modules'))), parameters('modules'), null())]",
- "persistence": {
- "aofEnabled": "[parameters('persistenceAofEnabled')]",
- "aofFrequency": "[if(not(empty(parameters('persistenceAofFrequency'))), parameters('persistenceAofFrequency'), null())]",
- "rdbEnabled": "[parameters('persistenceRdbEnabled')]",
- "rdbFrequency": "[if(not(empty(parameters('persistenceRdbFrequency'))), parameters('persistenceRdbFrequency'), null())]"
- },
- "port": "[if(not(equals(parameters('port'), -1)), parameters('port'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed database."
- },
- "value": "default"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed database."
- },
- "value": "[resourceId('Microsoft.Cache/redisEnterprise/databases', parameters('redisCacheEnterpriseName'), 'default')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed database."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cache/redis-enterprise/database/version.json b/modules/cache/redis-enterprise/database/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/cache/redis-enterprise/database/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cache/redis-enterprise/main.bicep b/modules/cache/redis-enterprise/main.bicep
deleted file mode 100644
index cdc3b5a490..0000000000
--- a/modules/cache/redis-enterprise/main.bicep
+++ /dev/null
@@ -1,328 +0,0 @@
-metadata name = 'Redis Cache Enterprise'
-metadata description = 'This module deploys a Redis Cache Enterprise.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. The geo-location where the resource lives.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Redis Cache Enterprise resource.')
-param name string
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@allowed([
- '1.0'
- '1.1'
- '1.2'
-])
-@description('Optional. Requires clients to use a specified TLS version (or higher) to connect.')
-param minimumTlsVersion string = '1.2'
-
-@description('Optional. The size of the Redis Enterprise Cluster. Defaults to 2. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs.')
-param capacity int = 2
-
-@allowed([
- 'EnterpriseFlash_F1500'
- 'EnterpriseFlash_F300'
- 'EnterpriseFlash_F700'
- 'Enterprise_E10'
- 'Enterprise_E100'
- 'Enterprise_E20'
- 'Enterprise_E50'
-])
-@description('Optional. The type of Redis Enterprise Cluster to deploy.')
-param skuName string = 'Enterprise_E10'
-
-@description('Optional. When true, the cluster will be deployed across availability zones.')
-param zoneRedundant bool = true
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. The databases to create in the Redis Cache Enterprise Cluster.')
-param databases array = []
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var availabilityZones = zoneRedundant ? pickZones('Microsoft.Cache', 'redisEnterprise', location, 3) : []
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Redis Cache Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e0f68234-74aa-48ed-b826-c38b57376e17')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource redisEnterprise 'Microsoft.Cache/redisEnterprise@2022-01-01' = {
- name: name
- location: location
- tags: tags
- sku: {
- capacity: capacity
- name: skuName
- }
- properties: {
- minimumTlsVersion: minimumTlsVersion
- }
- zones: availabilityZones
-}
-
-resource redisEnterprise_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: redisEnterprise
-}
-
-resource redisEnterprise_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: redisEnterprise
-}]
-
-resource redisEnterprise_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(redisEnterprise.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: redisEnterprise
-}]
-
-module redisEnterprise_databases 'database/main.bicep' = [for (database, index) in databases: {
- name: '${uniqueString(deployment().name, location)}-redisCacheEnterprise-DB-${index}'
- params: {
- redisCacheEnterpriseName: redisEnterprise.name
- location: location
- clientProtocol: contains(database, 'clientProtocol') ? database.clientProtocol : 'Encrypted'
- clusteringPolicy: contains(database, 'clusteringPolicy') ? database.clusteringPolicy : 'OSSCluster'
- evictionPolicy: contains(database, 'evictionPolicy') ? database.evictionPolicy : 'VolatileLRU'
- geoReplication: contains(database, 'geoReplication') ? database.geoReplication : {}
- modules: contains(database, 'modules') ? database.modules : []
- persistenceAofEnabled: contains(database, 'persistenceAofEnabled') ? database.persistenceAofEnabled : false
- persistenceAofFrequency: contains(database, 'persistenceAofFrequency') ? database.persistenceAofFrequency : ''
- persistenceRdbEnabled: contains(database, 'persistenceRdbEnabled') ? database.persistenceRdbEnabled : false
- persistenceRdbFrequency: contains(database, 'persistenceRdbFrequency') ? database.persistenceRdbFrequency : ''
- port: contains(database, 'port') ? database.port : -1
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module redisEnterprise_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-redisEnterprise-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'redisEnterprise'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(redisEnterprise.id, '/'))}-${privateEndpoint.?service ?? 'redisEnterprise'}-${index}'
- serviceResourceId: redisEnterprise.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The name of the redis cache enterprise.')
-output name string = redisEnterprise.name
-
-@description('The resource ID of the redis cache enterprise.')
-output resourceId string = redisEnterprise.id
-
-@description('The name of the resource group the redis cache enterprise was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('Redis hostname.')
-output hostName string = redisEnterprise.properties.hostName
-
-@description('The location the resource was deployed into.')
-output location string = redisEnterprise.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/cache/redis-enterprise/main.json b/modules/cache/redis-enterprise/main.json
deleted file mode 100644
index 07490f41f9..0000000000
--- a/modules/cache/redis-enterprise/main.json
+++ /dev/null
@@ -1,1451 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14212744208009857353"
- },
- "name": "Redis Cache Enterprise",
- "description": "This module deploys a Redis Cache Enterprise.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The geo-location where the resource lives."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Redis Cache Enterprise resource."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "minimumTlsVersion": {
- "type": "string",
- "defaultValue": "1.2",
- "allowedValues": [
- "1.0",
- "1.1",
- "1.2"
- ],
- "metadata": {
- "description": "Optional. Requires clients to use a specified TLS version (or higher) to connect."
- }
- },
- "capacity": {
- "type": "int",
- "defaultValue": 2,
- "metadata": {
- "description": "Optional. The size of the Redis Enterprise Cluster. Defaults to 2. Valid values are (2, 4, 6, ...) for Enterprise SKUs and (3, 9, 15, ...) for Flash SKUs."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "Enterprise_E10",
- "allowedValues": [
- "EnterpriseFlash_F1500",
- "EnterpriseFlash_F300",
- "EnterpriseFlash_F700",
- "Enterprise_E10",
- "Enterprise_E100",
- "Enterprise_E20",
- "Enterprise_E50"
- ],
- "metadata": {
- "description": "Optional. The type of Redis Enterprise Cluster to deploy."
- }
- },
- "zoneRedundant": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. When true, the cluster will be deployed across availability zones."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "databases": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The databases to create in the Redis Cache Enterprise Cluster."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "availabilityZones": "[if(parameters('zoneRedundant'), pickZones('Microsoft.Cache', 'redisEnterprise', parameters('location'), 3), createArray())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Redis Cache Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e0f68234-74aa-48ed-b826-c38b57376e17')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "redisEnterprise": {
- "type": "Microsoft.Cache/redisEnterprise",
- "apiVersion": "2022-01-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "capacity": "[parameters('capacity')]",
- "name": "[parameters('skuName')]"
- },
- "properties": {
- "minimumTlsVersion": "[parameters('minimumTlsVersion')]"
- },
- "zones": "[variables('availabilityZones')]"
- },
- "redisEnterprise_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Cache/redisEnterprise/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "redisEnterprise"
- ]
- },
- "redisEnterprise_diagnosticSettings": {
- "copy": {
- "name": "redisEnterprise_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Cache/redisEnterprise/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "redisEnterprise"
- ]
- },
- "redisEnterprise_roleAssignments": {
- "copy": {
- "name": "redisEnterprise_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Cache/redisEnterprise/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Cache/redisEnterprise', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "redisEnterprise"
- ]
- },
- "redisEnterprise_databases": {
- "copy": {
- "name": "redisEnterprise_databases",
- "count": "[length(parameters('databases'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-redisCacheEnterprise-DB-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "redisCacheEnterpriseName": {
- "value": "[parameters('name')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "clientProtocol": "[if(contains(parameters('databases')[copyIndex()], 'clientProtocol'), createObject('value', parameters('databases')[copyIndex()].clientProtocol), createObject('value', 'Encrypted'))]",
- "clusteringPolicy": "[if(contains(parameters('databases')[copyIndex()], 'clusteringPolicy'), createObject('value', parameters('databases')[copyIndex()].clusteringPolicy), createObject('value', 'OSSCluster'))]",
- "evictionPolicy": "[if(contains(parameters('databases')[copyIndex()], 'evictionPolicy'), createObject('value', parameters('databases')[copyIndex()].evictionPolicy), createObject('value', 'VolatileLRU'))]",
- "geoReplication": "[if(contains(parameters('databases')[copyIndex()], 'geoReplication'), createObject('value', parameters('databases')[copyIndex()].geoReplication), createObject('value', createObject()))]",
- "modules": "[if(contains(parameters('databases')[copyIndex()], 'modules'), createObject('value', parameters('databases')[copyIndex()].modules), createObject('value', createArray()))]",
- "persistenceAofEnabled": "[if(contains(parameters('databases')[copyIndex()], 'persistenceAofEnabled'), createObject('value', parameters('databases')[copyIndex()].persistenceAofEnabled), createObject('value', false()))]",
- "persistenceAofFrequency": "[if(contains(parameters('databases')[copyIndex()], 'persistenceAofFrequency'), createObject('value', parameters('databases')[copyIndex()].persistenceAofFrequency), createObject('value', ''))]",
- "persistenceRdbEnabled": "[if(contains(parameters('databases')[copyIndex()], 'persistenceRdbEnabled'), createObject('value', parameters('databases')[copyIndex()].persistenceRdbEnabled), createObject('value', false()))]",
- "persistenceRdbFrequency": "[if(contains(parameters('databases')[copyIndex()], 'persistenceRdbFrequency'), createObject('value', parameters('databases')[copyIndex()].persistenceRdbFrequency), createObject('value', ''))]",
- "port": "[if(contains(parameters('databases')[copyIndex()], 'port'), createObject('value', parameters('databases')[copyIndex()].port), createObject('value', -1))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "2473493174520406257"
- },
- "name": "Redis Cache Enterprise Databases",
- "description": "This module deploys a Redis Cache Enterprise Database.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "redisCacheEnterpriseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Redis Cache Enterprise Cluster. Required if the template is used in a standalone deployment."
- }
- },
- "clientProtocol": {
- "type": "string",
- "defaultValue": "Encrypted",
- "allowedValues": [
- "Encrypted",
- "Plaintext"
- ],
- "metadata": {
- "description": "Optional. Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted."
- }
- },
- "clusteringPolicy": {
- "type": "string",
- "defaultValue": "OSSCluster",
- "allowedValues": [
- "EnterpriseCluster",
- "OSSCluster"
- ],
- "metadata": {
- "description": "Optional. Specifies the clustering policy to enable at creation time of the Redis Cache Enterprise Cluster."
- }
- },
- "evictionPolicy": {
- "type": "string",
- "defaultValue": "VolatileLRU",
- "allowedValues": [
- "AllKeysLFU",
- "AllKeysLRU",
- "AllKeysRandom",
- "NoEviction",
- "VolatileLFU",
- "VolatileLRU",
- "VolatileRandom",
- "VolatileTTL"
- ],
- "metadata": {
- "description": "Optional. Redis eviction policy - default is VolatileLRU."
- }
- },
- "geoReplication": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Optional set of properties to configure geo replication for this database. Geo replication prerequisites must be met. See \"https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-active-geo-replication#active-geo-replication-prerequisites\" for more information."
- }
- },
- "modules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Optional set of redis modules to enable in this database - modules can only be added at creation time."
- }
- },
- "persistenceAofEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Sets whether AOF is enabled. Required if setting AOF frequency. AOF and RDB persistence cannot be enabled at the same time."
- }
- },
- "persistenceAofFrequency": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "1s",
- "always"
- ],
- "metadata": {
- "description": "Conditional. Sets the frequency at which data is written to disk. Required if AOF persistence is enabled."
- }
- },
- "persistenceRdbEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Sets whether RDB is enabled. RDB and AOF persistence cannot be enabled at the same time."
- }
- },
- "persistenceRdbFrequency": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "12h",
- "1h",
- "6h"
- ],
- "metadata": {
- "description": "Conditional. Sets the frequency at which a snapshot of the database is created. Required if RDB persistence is enabled."
- }
- },
- "port": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. TCP port of the database endpoint. Specified at create time. Default is (-1) meaning value is not set and defaults to an available port. Current supported port is 10000."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cache/redisEnterprise/databases",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('redisCacheEnterpriseName'), 'default')]",
- "properties": {
- "clientProtocol": "[if(not(empty(parameters('clientProtocol'))), parameters('clientProtocol'), null())]",
- "clusteringPolicy": "[if(not(empty(parameters('clusteringPolicy'))), parameters('clusteringPolicy'), null())]",
- "evictionPolicy": "[if(not(empty(parameters('evictionPolicy'))), parameters('evictionPolicy'), null())]",
- "geoReplication": "[if(not(empty(parameters('geoReplication'))), parameters('geoReplication'), null())]",
- "modules": "[if(not(empty(parameters('modules'))), parameters('modules'), null())]",
- "persistence": {
- "aofEnabled": "[parameters('persistenceAofEnabled')]",
- "aofFrequency": "[if(not(empty(parameters('persistenceAofFrequency'))), parameters('persistenceAofFrequency'), null())]",
- "rdbEnabled": "[parameters('persistenceRdbEnabled')]",
- "rdbFrequency": "[if(not(empty(parameters('persistenceRdbFrequency'))), parameters('persistenceRdbFrequency'), null())]"
- },
- "port": "[if(not(equals(parameters('port'), -1)), parameters('port'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed database."
- },
- "value": "default"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed database."
- },
- "value": "[resourceId('Microsoft.Cache/redisEnterprise/databases', parameters('redisCacheEnterpriseName'), 'default')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed database."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "redisEnterprise"
- ]
- },
- "redisEnterprise_privateEndpoints": {
- "copy": {
- "name": "redisEnterprise_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-redisEnterprise-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisEnterprise')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Cache/redisEnterprise', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisEnterprise'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.Cache/redisEnterprise', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "redisEnterprise"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the redis cache enterprise."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the redis cache enterprise."
- },
- "value": "[resourceId('Microsoft.Cache/redisEnterprise', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the redis cache enterprise was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Redis hostname."
- },
- "value": "[reference('redisEnterprise').hostName]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('redisEnterprise', '2022-01-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cache/redis-enterprise/tests/e2e/defaults/main.test.bicep b/modules/cache/redis-enterprise/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 667f64420a..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redisenterprise-${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 = 'cremin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/cache/redis-enterprise/tests/e2e/geo/dependencies.bicep b/modules/cache/redis-enterprise/tests/e2e/geo/dependencies.bicep
deleted file mode 100644
index 31cbbe50bf..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/geo/dependencies.bicep
+++ /dev/null
@@ -1,59 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Redis Cache Enterprise to create.')
-param redisCacheEnterpriseName string
-
-var redisCacheEnterpriseExpectedResourceID = '${resourceGroup().id}/providers/Microsoft.Cache/redisEnterprise/${redisCacheEnterpriseName}'
-
-resource redisCacheEnterprise 'Microsoft.Cache/redisEnterprise@2022-01-01' = {
- name: redisCacheEnterpriseName
- location: location
- sku: {
- name: 'Enterprise_E10'
- capacity: 2
- }
- properties: {
- minimumTlsVersion: '1.2'
- }
- zones: [
- '1'
- '2'
- '3'
- ]
-
- resource database 'databases@2022-01-01' = {
- name: 'default'
- properties: {
- clusteringPolicy: 'EnterpriseCluster'
- evictionPolicy: 'NoEviction'
- persistence: {
- aofEnabled: false
- rdbEnabled: false
- }
- modules: [
- {
- name: 'RedisJSON'
- }
- {
- name: 'RediSearch'
- }
- ]
- geoReplication: {
- groupNickname: '${redisCacheEnterpriseName}-geo-group'
- linkedDatabases: [
- {
- id: '${redisCacheEnterpriseExpectedResourceID}/databases/default'
- }
- ]
- }
- port: 10000
- }
- }
-}
-
-@description('The resource ID of the created Redis Cache Enterprise database.')
-output redisCacheEnterpriseDatabaseResourceId string = redisCacheEnterprise::database.id
-
-@description('The geo replication group nickname of the created Redis Cache Enterprise database.')
-output redisCacheEnterpriseDatabaseGeoReplicationGroupNickname string = redisCacheEnterprise::database.properties.geoReplication.groupNickname
diff --git a/modules/cache/redis-enterprise/tests/e2e/geo/main.test.bicep b/modules/cache/redis-enterprise/tests/e2e/geo/main.test.bicep
deleted file mode 100644
index 5d09f89094..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/geo/main.test.bicep
+++ /dev/null
@@ -1,91 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redisenterprise-${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 = 'cregeo'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- redisCacheEnterpriseName: 'dep-${namePrefix}-rce-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-var redisCacheEnterpriseName = '${namePrefix}${serviceShort}001'
-var redisCacheEnterpriseExpectedResourceID = '${resourceGroup.id}/providers/Microsoft.Cache/redisEnterprise/${redisCacheEnterpriseName}'
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: redisCacheEnterpriseName
- capacity: 2
- zoneRedundant: true
- databases: [
- {
- clusteringPolicy: 'EnterpriseCluster'
- evictionPolicy: 'NoEviction'
- port: 10000
- modules: [
- {
- name: 'RediSearch'
- }
- {
- name: 'RedisJSON'
- }
- ]
- geoReplication: {
- groupNickname: nestedDependencies.outputs.redisCacheEnterpriseDatabaseGeoReplicationGroupNickname
- linkedDatabases: [
- {
- id: nestedDependencies.outputs.redisCacheEnterpriseDatabaseResourceId
- }
- {
- id: '${redisCacheEnterpriseExpectedResourceID}/databases/default'
- }
- ]
- }
- persistenceAofEnabled: false
- persistenceRdbEnabled: false
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Redis Cache Enterprise'
- }
- }
-}]
diff --git a/modules/cache/redis-enterprise/tests/e2e/max/dependencies.bicep b/modules/cache/redis-enterprise/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 59ae30a575..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.redisenterprise.cache.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/cache/redis-enterprise/tests/e2e/max/main.test.bicep b/modules/cache/redis-enterprise/tests/e2e/max/main.test.bicep
deleted file mode 100644
index baf56e3e5e..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,146 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redisenterprise-${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 = 'cremax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- capacity: 2
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- minimumTlsVersion: '1.2'
- zoneRedundant: true
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- databases: [
- {
- clusteringPolicy: 'EnterpriseCluster'
- evictionPolicy: 'AllKeysLFU'
- modules: [
- {
- name: 'RedisBloom'
- }
- {
- name: 'RedisTimeSeries'
- args: 'RETENTION_POLICY 20'
- }
- ]
- persistenceAofEnabled: true
- persistenceAofFrequency: '1s'
- persistenceRdbEnabled: false
- port: 10000
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Redis Cache Enterprise'
- }
- }
-}]
diff --git a/modules/cache/redis-enterprise/tests/e2e/waf-aligned/dependencies.bicep b/modules/cache/redis-enterprise/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 59ae30a575..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.redisenterprise.cache.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/cache/redis-enterprise/tests/e2e/waf-aligned/main.test.bicep b/modules/cache/redis-enterprise/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index b9030436a7..0000000000
--- a/modules/cache/redis-enterprise/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,129 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redisenterprise-${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 = 'crewaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- capacity: 2
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- minimumTlsVersion: '1.2'
- zoneRedundant: true
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- databases: [
- {
- clusteringPolicy: 'EnterpriseCluster'
- evictionPolicy: 'AllKeysLFU'
- modules: [
- {
- name: 'RedisBloom'
- }
- {
- name: 'RedisTimeSeries'
- args: 'RETENTION_POLICY 20'
- }
- ]
- persistenceAofEnabled: true
- persistenceAofFrequency: '1s'
- persistenceRdbEnabled: false
- port: 10000
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Redis Cache Enterprise'
- }
- }
-}]
diff --git a/modules/cache/redis-enterprise/version.json b/modules/cache/redis-enterprise/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/cache/redis-enterprise/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cache/redis/README.md b/modules/cache/redis/README.md
index 5f026c7c76..a2bbd3ec3e 100644
--- a/modules/cache/redis/README.md
+++ b/modules/cache/redis/README.md
@@ -1,1226 +1,7 @@
-# Redis Cache `[Microsoft.Cache/redis]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Redis cache resource. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`capacity`](#parameter-capacity) | int | The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enableNonSslPort`](#parameter-enablenonsslport) | bool | Specifies whether the non-ssl Redis server port (6379) is enabled. |
-| [`location`](#parameter-location) | string | The location to deploy the Redis cache service. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`minimumTlsVersion`](#parameter-minimumtlsversion) | string | Requires clients to use a specified TLS version (or higher) to connect. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`redisConfiguration`](#parameter-redisconfiguration) | object | All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. |
-| [`redisVersion`](#parameter-redisversion) | string | Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6). |
-| [`replicasPerMaster`](#parameter-replicaspermaster) | int | The number of replicas to be created per primary. |
-| [`replicasPerPrimary`](#parameter-replicasperprimary) | int | The number of replicas to be created per primary. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`shardCount`](#parameter-shardcount) | int | The number of shards to be created on a Premium Cluster Cache. |
-| [`skuName`](#parameter-skuname) | string | The type of Redis cache to deploy. |
-| [`staticIP`](#parameter-staticip) | string | Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. |
-| [`subnetId`](#parameter-subnetid) | string | The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`tenantSettings`](#parameter-tenantsettings) | object | A dictionary of tenant settings. |
-| [`zoneRedundant`](#parameter-zoneredundant) | bool | When true, replicas will be provisioned in availability zones specified in the zones parameter. |
-| [`zones`](#parameter-zones) | array | If the zoneRedundant parameter is true, replicas will be provisioned in the availability zones specified here. Otherwise, the service will choose where replicas are deployed. |
-
-### Parameter: `name`
-
-The name of the Redis cache resource.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `capacity`
-
-The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4).
-
-- Required: No
-- Type: int
-- Default: `1`
-- Allowed:
- ```Bicep
- [
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- ]
- ```
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableNonSslPort`
-
-Specifies whether the non-ssl Redis server port (6379) is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `location`
-
-The location to deploy the Redis cache service.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `minimumTlsVersion`
-
-Requires clients to use a specified TLS version (or higher) to connect.
-
-- Required: No
-- Type: string
-- Default: `'1.2'`
-- Allowed:
- ```Bicep
- [
- '1.0'
- '1.1'
- '1.2'
- ]
- ```
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `redisConfiguration`
-
-All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `redisVersion`
-
-Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6).
-
-- Required: No
-- Type: string
-- Default: `'6'`
-- Allowed:
- ```Bicep
- [
- '4'
- '6'
- ]
- ```
-
-### Parameter: `replicasPerMaster`
-
-The number of replicas to be created per primary.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `replicasPerPrimary`
-
-The number of replicas to be created per primary.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `shardCount`
-
-The number of shards to be created on a Premium Cluster Cache.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `skuName`
-
-The type of Redis cache to deploy.
-
-- Required: No
-- Type: string
-- Default: `'Basic'`
-- Allowed:
- ```Bicep
- [
- 'Basic'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `staticIP`
-
-Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subnetId`
-
-The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `tenantSettings`
-
-A dictionary of tenant settings.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `zoneRedundant`
-
-When true, replicas will be provisioned in availability zones specified in the zones parameter.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `zones`
-
-If the zoneRedundant parameter is true, replicas will be provisioned in the availability zones specified here. Otherwise, the service will choose where replicas are deployed.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `hostName` | string | Redis hostname. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Redis Cache. |
-| `resourceGroupName` | string | The name of the resource group the Redis Cache was created in. |
-| `resourceId` | string | The resource ID of the Redis Cache. |
-| `sslPort` | int | Redis SSL port. |
-| `subnetId` | string | The full resource ID of a subnet in a virtual network where the Redis Cache was deployed in. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
-
-## Notes
-
-### Parameter Usage: `redisConfiguration`
-
-All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc..
-
-Name | Description | Value
----------|----------|---------
-aof-storage-connection-string-0 | First storage account connection string | string
-aof-storage-connection-string-1 | Second storage account connection string | string
-maxfragmentationmemory-reserved | Value in megabytes reserved for fragmentation per shard | string
-maxmemory-delta | Value in megabytes reserved for non-cache usage per shard e.g. failover. | string
-maxmemory-policy | The eviction strategy used when your data won't fit within its memory limit. | string
-maxmemory-reserved | Value in megabytes reserved for non-cache usage per shard e.g. failover. | string
-rdb-backup-enabled | Specifies whether the rdb backup is enabled | string
-rdb-backup-frequency | Specifies the frequency for creating rdb backup | string
-rdb-backup-max-snapshot-count | Specifies the maximum number of snapshots for rdb backup | string
-rdb-storage-connection-string | The storage account connection string for storing rdb file | string
-
-For more details visit [Microsoft.Cache redis reference](https://learn.microsoft.com/en-us/azure/templates/microsoft.cache/redis?tabs=bicep)
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/cache/redis/main.bicep b/modules/cache/redis/main.bicep
deleted file mode 100644
index 4a34e577ce..0000000000
--- a/modules/cache/redis/main.bicep
+++ /dev/null
@@ -1,410 +0,0 @@
-metadata name = 'Redis Cache'
-metadata description = 'This module deploys a Redis Cache.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. The location to deploy the Redis cache service.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Redis cache resource.')
-param name string
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Specifies whether the non-ssl Redis server port (6379) is enabled.')
-param enableNonSslPort bool = false
-
-@allowed([
- '1.0'
- '1.1'
- '1.2'
-])
-@description('Optional. Requires clients to use a specified TLS version (or higher) to connect.')
-param minimumTlsVersion string = '1.2'
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc.')
-param redisConfiguration object = {}
-
-@allowed([
- '4'
- '6'
-])
-@description('Optional. Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6).')
-param redisVersion string = '6'
-
-@minValue(1)
-@description('Optional. The number of replicas to be created per primary.')
-param replicasPerMaster int = 1
-
-@minValue(1)
-@description('Optional. The number of replicas to be created per primary.')
-param replicasPerPrimary int = 1
-
-@minValue(1)
-@description('Optional. The number of shards to be created on a Premium Cluster Cache.')
-param shardCount int = 1
-
-@allowed([
- 0
- 1
- 2
- 3
- 4
- 5
- 6
-])
-@description('Optional. The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4).')
-param capacity int = 1
-
-@allowed([
- 'Basic'
- 'Premium'
- 'Standard'
-])
-@description('Optional. The type of Redis cache to deploy.')
-param skuName string = 'Basic'
-
-@description('Optional. Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default.')
-param staticIP string = ''
-
-@description('Optional. The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.')
-param subnetId string = ''
-
-@description('Optional. A dictionary of tenant settings.')
-param tenantSettings object = {}
-
-@description('Optional. When true, replicas will be provisioned in availability zones specified in the zones parameter.')
-param zoneRedundant bool = true
-
-@description('Optional. If the zoneRedundant parameter is true, replicas will be provisioned in the availability zones specified here. Otherwise, the service will choose where replicas are deployed.')
-param zones array = []
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var availabilityZones = skuName == 'Premium' ? zoneRedundant ? !empty(zones) ? zones : pickZones('Microsoft.Cache', 'redis', location, 3) : [] : []
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Redis Cache Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e0f68234-74aa-48ed-b826-c38b57376e17')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource redis 'Microsoft.Cache/redis@2022-06-01' = {
- name: name
- location: location
- tags: tags
- identity: identity
- properties: {
- enableNonSslPort: enableNonSslPort
- minimumTlsVersion: minimumTlsVersion
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) ? 'Disabled' : null)
- redisConfiguration: !empty(redisConfiguration) ? redisConfiguration : null
- redisVersion: redisVersion
- replicasPerMaster: skuName == 'Premium' ? replicasPerMaster : null
- replicasPerPrimary: skuName == 'Premium' ? replicasPerPrimary : null
- shardCount: skuName == 'Premium' ? shardCount : null // Not supported in free tier
- sku: {
- capacity: capacity
- family: skuName == 'Premium' ? 'P' : 'C'
- name: skuName
- }
- staticIP: !empty(staticIP) ? staticIP : null
- subnetId: !empty(subnetId) ? subnetId : null
- tenantSettings: tenantSettings
- }
- zones: availabilityZones
-}
-
-resource redis_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: redis
-}
-
-resource redis_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: redis
-}]
-
-resource redis_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(redis.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: redis
-}]
-
-module redis_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-redis-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'redisCache'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(redis.id, '/'))}-${privateEndpoint.?service ?? 'redisCache'}-${index}'
- serviceResourceId: redis.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The name of the Redis Cache.')
-output name string = redis.name
-
-@description('The resource ID of the Redis Cache.')
-output resourceId string = redis.id
-
-@description('The name of the resource group the Redis Cache was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('Redis hostname.')
-output hostName string = redis.properties.hostName
-
-@description('Redis SSL port.')
-output sslPort int = redis.properties.sslPort
-
-@description('The full resource ID of a subnet in a virtual network where the Redis Cache was deployed in.')
-output subnetId string = !empty(subnetId) ? redis.properties.subnetId : ''
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(redis.identity, 'principalId') ? redis.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = redis.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/cache/redis/main.json b/modules/cache/redis/main.json
deleted file mode 100644
index 90b5617b8a..0000000000
--- a/modules/cache/redis/main.json
+++ /dev/null
@@ -1,1397 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10455754336377427456"
- },
- "name": "Redis Cache",
- "description": "This module deploys a Redis Cache.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location to deploy the Redis cache service."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Redis cache resource."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "enableNonSslPort": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the non-ssl Redis server port (6379) is enabled."
- }
- },
- "minimumTlsVersion": {
- "type": "string",
- "defaultValue": "1.2",
- "allowedValues": [
- "1.0",
- "1.1",
- "1.2"
- ],
- "metadata": {
- "description": "Optional. Requires clients to use a specified TLS version (or higher) to connect."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- },
- "redisConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc."
- }
- },
- "redisVersion": {
- "type": "string",
- "defaultValue": "6",
- "allowedValues": [
- "4",
- "6"
- ],
- "metadata": {
- "description": "Optional. Redis version. Only major version will be used in PUT/PATCH request with current valid values: (4, 6)."
- }
- },
- "replicasPerMaster": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "metadata": {
- "description": "Optional. The number of replicas to be created per primary."
- }
- },
- "replicasPerPrimary": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "metadata": {
- "description": "Optional. The number of replicas to be created per primary."
- }
- },
- "shardCount": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "metadata": {
- "description": "Optional. The number of shards to be created on a Premium Cluster Cache."
- }
- },
- "capacity": {
- "type": "int",
- "defaultValue": 1,
- "allowedValues": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- ],
- "metadata": {
- "description": "Optional. The size of the Redis cache to deploy. Valid values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4)."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "Basic",
- "allowedValues": [
- "Basic",
- "Premium",
- "Standard"
- ],
- "metadata": {
- "description": "Optional. The type of Redis cache to deploy."
- }
- },
- "staticIP": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default."
- }
- },
- "subnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1."
- }
- },
- "tenantSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. A dictionary of tenant settings."
- }
- },
- "zoneRedundant": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. When true, replicas will be provisioned in availability zones specified in the zones parameter."
- }
- },
- "zones": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. If the zoneRedundant parameter is true, replicas will be provisioned in the availability zones specified here. Otherwise, the service will choose where replicas are deployed."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "availabilityZones": "[if(equals(parameters('skuName'), 'Premium'), if(parameters('zoneRedundant'), if(not(empty(parameters('zones'))), parameters('zones'), pickZones('Microsoft.Cache', 'redis', parameters('location'), 3)), createArray()), createArray())]",
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Redis Cache Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e0f68234-74aa-48ed-b826-c38b57376e17')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "redis": {
- "type": "Microsoft.Cache/redis",
- "apiVersion": "2022-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "enableNonSslPort": "[parameters('enableNonSslPort')]",
- "minimumTlsVersion": "[parameters('minimumTlsVersion')]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(not(empty(parameters('privateEndpoints'))), 'Disabled', null()))]",
- "redisConfiguration": "[if(not(empty(parameters('redisConfiguration'))), parameters('redisConfiguration'), null())]",
- "redisVersion": "[parameters('redisVersion')]",
- "replicasPerMaster": "[if(equals(parameters('skuName'), 'Premium'), parameters('replicasPerMaster'), null())]",
- "replicasPerPrimary": "[if(equals(parameters('skuName'), 'Premium'), parameters('replicasPerPrimary'), null())]",
- "shardCount": "[if(equals(parameters('skuName'), 'Premium'), parameters('shardCount'), null())]",
- "sku": {
- "capacity": "[parameters('capacity')]",
- "family": "[if(equals(parameters('skuName'), 'Premium'), 'P', 'C')]",
- "name": "[parameters('skuName')]"
- },
- "staticIP": "[if(not(empty(parameters('staticIP'))), parameters('staticIP'), null())]",
- "subnetId": "[if(not(empty(parameters('subnetId'))), parameters('subnetId'), null())]",
- "tenantSettings": "[parameters('tenantSettings')]"
- },
- "zones": "[variables('availabilityZones')]"
- },
- "redis_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Cache/redis/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "redis"
- ]
- },
- "redis_diagnosticSettings": {
- "copy": {
- "name": "redis_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Cache/redis/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "redis"
- ]
- },
- "redis_roleAssignments": {
- "copy": {
- "name": "redis_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Cache/redis/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Cache/redis', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "redis"
- ]
- },
- "redis_privateEndpoints": {
- "copy": {
- "name": "redis_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-redis-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisCache')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Cache/redis', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'redisCache'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.Cache/redis', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "redis"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Redis Cache."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Redis Cache."
- },
- "value": "[resourceId('Microsoft.Cache/redis', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Redis Cache was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Redis hostname."
- },
- "value": "[reference('redis').hostName]"
- },
- "sslPort": {
- "type": "int",
- "metadata": {
- "description": "Redis SSL port."
- },
- "value": "[reference('redis').sslPort]"
- },
- "subnetId": {
- "type": "string",
- "metadata": {
- "description": "The full resource ID of a subnet in a virtual network where the Redis Cache was deployed in."
- },
- "value": "[if(not(empty(parameters('subnetId'))), reference('redis').subnetId, '')]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('redis', '2022-06-01', 'full').identity, 'principalId')), reference('redis', '2022-06-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('redis', '2022-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cache/redis/tests/e2e/defaults/main.test.bicep b/modules/cache/redis/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 4c8ef85da3..0000000000
--- a/modules/cache/redis/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redis-${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 = 'crmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}
diff --git a/modules/cache/redis/tests/e2e/max/dependencies.bicep b/modules/cache/redis/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 8218e0c1ad..0000000000
--- a/modules/cache/redis/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.redis.cache.windows.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/cache/redis/tests/e2e/max/main.test.bicep b/modules/cache/redis/tests/e2e/max/main.test.bicep
deleted file mode 100644
index dd1a06da7d..0000000000
--- a/modules/cache/redis/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,121 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redis-${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 = 'crmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- capacity: 2
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- enableNonSslPort: true
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- minimumTlsVersion: '1.2'
- zoneRedundant: true
- zones: [ 1, 2 ]
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- publicNetworkAccess: 'Enabled'
- redisVersion: '6'
- shardCount: 1
- skuName: 'Premium'
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Redis Cache'
- }
- }
-}
diff --git a/modules/cache/redis/tests/e2e/waf-aligned/dependencies.bicep b/modules/cache/redis/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 8218e0c1ad..0000000000
--- a/modules/cache/redis/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.redis.cache.windows.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/cache/redis/tests/e2e/waf-aligned/main.test.bicep b/modules/cache/redis/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 01f1338b3d..0000000000
--- a/modules/cache/redis/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,121 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cache.redis-${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 = 'crwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- capacity: 2
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- enableNonSslPort: true
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- minimumTlsVersion: '1.2'
- zoneRedundant: true
- zones: [ 1, 2 ]
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- publicNetworkAccess: 'Enabled'
- redisVersion: '6'
- shardCount: 1
- skuName: 'Premium'
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Redis Cache'
- }
- }
-}
diff --git a/modules/cache/redis/version.json b/modules/cache/redis/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/cache/redis/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/README.md b/modules/cdn/profile/README.md
index cb61a8f771..e517a73b48 100644
--- a/modules/cdn/profile/README.md
+++ b/modules/cdn/profile/README.md
@@ -1,870 +1,7 @@
-# CDN Profiles `[Microsoft.Cdn/profiles]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the CDN profile. |
-| [`sku`](#parameter-sku) | string | The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`origionGroups`](#parameter-origiongroups) | array | Array of origin group objects. Required if the afdEndpoints is specified. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`afdEndpoints`](#parameter-afdendpoints) | array | Array of AFD endpoint objects. |
-| [`customDomains`](#parameter-customdomains) | array | Array of custom domain objects. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`endpointName`](#parameter-endpointname) | string | Name of the endpoint under the profile which is unique globally. |
-| [`endpointProperties`](#parameter-endpointproperties) | object | Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details). |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`originResponseTimeoutSeconds`](#parameter-originresponsetimeoutseconds) | int | Send and receive timeout on forwarding request to the origin. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`ruleSets`](#parameter-rulesets) | array | Array of rule set objects. |
-| [`secrets`](#parameter-secrets) | array | Array of secret objects. |
-| [`tags`](#parameter-tags) | object | Endpoint tags. |
-
-### Parameter: `name`
-
-Name of the CDN profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `sku`
-
-The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Custom_Verizon'
- 'Premium_AzureFrontDoor'
- 'Premium_Verizon'
- 'Standard_955BandWidth_ChinaCdn'
- 'Standard_Akamai'
- 'Standard_AvgBandWidth_ChinaCdn'
- 'Standard_AzureFrontDoor'
- 'Standard_ChinaCdn'
- 'Standard_Microsoft'
- 'Standard_Verizon'
- 'StandardPlus_955BandWidth_ChinaCdn'
- 'StandardPlus_AvgBandWidth_ChinaCdn'
- 'StandardPlus_ChinaCdn'
- ]
- ```
-
-### Parameter: `origionGroups`
-
-Array of origin group objects. Required if the afdEndpoints is specified.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `afdEndpoints`
-
-Array of AFD endpoint objects.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `customDomains`
-
-Array of custom domain objects.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `endpointName`
-
-Name of the endpoint under the profile which is unique globally.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `endpointProperties`
-
-Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `originResponseTimeoutSeconds`
-
-Send and receive timeout on forwarding request to the origin.
-
-- Required: No
-- Type: int
-- Default: `60`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `ruleSets`
-
-Array of rule set objects.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `secrets`
-
-Array of secret objects.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Endpoint tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the CDN profile. |
-| `profileType` | string | The type of the CDN profile. |
-| `resourceGroupName` | string | The resource group where the CDN profile is deployed. |
-| `resourceId` | string | The resource ID of the CDN profile. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/cdn/profile/afdEndpoint/README.md b/modules/cdn/profile/afdEndpoint/README.md
deleted file mode 100644
index d2bd8ba7d6..0000000000
--- a/modules/cdn/profile/afdEndpoint/README.md
+++ /dev/null
@@ -1,133 +0,0 @@
-# CDN Profiles AFD Endpoints `[Microsoft.Cdn/profiles/afdEndpoints]`
-
-This module deploys a CDN Profile AFD Endpoint.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/afdEndpoints` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/afdEndpoints) |
-| `Microsoft.Cdn/profiles/afdEndpoints/routes` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/afdEndpoints/routes) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the AFD Endpoint. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`profileName`](#parameter-profilename) | string | The name of the parent CDN profile. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`autoGeneratedDomainNameLabelScope`](#parameter-autogenerateddomainnamelabelscope) | string | Indicates the endpoint name reuse scope. The default value is TenantReuse. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enabledState`](#parameter-enabledstate) | string | Indicates whether the AFD Endpoint is enabled. The default value is Enabled. |
-| [`location`](#parameter-location) | string | The location of the AFD Endpoint. |
-| [`routes`](#parameter-routes) | array | The list of routes for this AFD Endpoint. |
-| [`tags`](#parameter-tags) | object | The tags of the AFD Endpoint. |
-
-### Parameter: `name`
-
-The name of the AFD Endpoint.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `profileName`
-
-The name of the parent CDN profile. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `autoGeneratedDomainNameLabelScope`
-
-Indicates the endpoint name reuse scope. The default value is TenantReuse.
-
-- Required: No
-- Type: string
-- Default: `'TenantReuse'`
-- Allowed:
- ```Bicep
- [
- 'NoReuse'
- 'ResourceGroupReuse'
- 'SubscriptionReuse'
- 'TenantReuse'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enabledState`
-
-Indicates whether the AFD Endpoint is enabled. The default value is Enabled.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `location`
-
-The location of the AFD Endpoint.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `routes`
-
-The list of routes for this AFD Endpoint.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-The tags of the AFD Endpoint.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the AFD Endpoint. |
-| `resourceGroupName` | string | The name of the resource group the endpoint was created in. |
-| `resourceId` | string | The resource id of the AFD Endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/afdEndpoint/main.bicep b/modules/cdn/profile/afdEndpoint/main.bicep
deleted file mode 100644
index 92a40f407e..0000000000
--- a/modules/cdn/profile/afdEndpoint/main.bicep
+++ /dev/null
@@ -1,98 +0,0 @@
-metadata name = 'CDN Profiles AFD Endpoints'
-metadata description = 'This module deploys a CDN Profile AFD Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the AFD Endpoint.')
-param name string
-
-@description('Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment.')
-param profileName string
-
-@description('Optional. The location of the AFD Endpoint.')
-param location string = resourceGroup().location
-
-@description('Optional. The tags of the AFD Endpoint.')
-param tags object?
-
-@description('Optional. Indicates the endpoint name reuse scope. The default value is TenantReuse.')
-@allowed([
- 'NoReuse'
- 'ResourceGroupReuse'
- 'SubscriptionReuse'
- 'TenantReuse'
-])
-param autoGeneratedDomainNameLabelScope string = 'TenantReuse'
-
-@description('Optional. Indicates whether the AFD Endpoint is enabled. The default value is Enabled.')
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-param enabledState string = 'Enabled'
-
-@description('Optional. The list of routes for this AFD Endpoint.')
-param routes array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-}
-
-resource afd_endpoint 'Microsoft.Cdn/profiles/afdEndpoints@2023-05-01' = {
- name: name
- parent: profile
- location: location
- tags: tags
- properties: {
- autoGeneratedDomainNameLabelScope: autoGeneratedDomainNameLabelScope
- enabledState: enabledState
- }
-}
-
-module afd_endpoint_route 'route/main.bicep' = [for route in routes: {
- name: '${uniqueString(deployment().name, route.name)}-Profile-AfdEndpoint-Route'
- params: {
- name: route.name
- profileName: profile.name
- afdEndpointName: afd_endpoint.name
- cacheConfiguration: contains(route, 'cacheConfiguration') ? route.cacheConfiguration : null
- customDomainName: contains(route, 'customDomainName') ? route.customDomainName : ''
- enabledState: contains(route, 'enabledState') ? route.enabledState : 'Enabled'
- forwardingProtocol: contains(route, 'forwardingProtocol') ? route.forwardingProtocol : 'MatchRequest'
- httpsRedirect: contains(route, 'httpsRedirect') ? route.httpsRedirect : 'Enabled'
- linkToDefaultDomain: contains(route, 'linkToDefaultDomain') ? route.linkToDefaultDomain : 'Enabled'
- originGroupName: contains(route, 'originGroupName') ? route.originGroupName : ''
- originPath: contains(route, 'originPath') ? route.originPath : ''
- patternsToMatch: contains(route, 'patternsToMatch') ? route.patternsToMatch : []
- ruleSets: contains(route, 'ruleSets') ? route.ruleSets : []
- supportedProtocols: contains(route, 'supportedProtocols') ? route.supportedProtocols : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the AFD Endpoint.')
-output name string = afd_endpoint.name
-
-@description('The resource id of the AFD Endpoint.')
-output resourceId string = afd_endpoint.id
-
-@description('The name of the resource group the endpoint was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = afd_endpoint.location
diff --git a/modules/cdn/profile/afdEndpoint/main.json b/modules/cdn/profile/afdEndpoint/main.json
deleted file mode 100644
index 9d22cf48e7..0000000000
--- a/modules/cdn/profile/afdEndpoint/main.json
+++ /dev/null
@@ -1,399 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14944467223785761559"
- },
- "name": "CDN Profiles AFD Endpoints",
- "description": "This module deploys a CDN Profile AFD Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AFD Endpoint."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location of the AFD Endpoint."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. The tags of the AFD Endpoint."
- }
- },
- "autoGeneratedDomainNameLabelScope": {
- "type": "string",
- "defaultValue": "TenantReuse",
- "allowedValues": [
- "NoReuse",
- "ResourceGroupReuse",
- "SubscriptionReuse",
- "TenantReuse"
- ],
- "metadata": {
- "description": "Optional. Indicates the endpoint name reuse scope. The default value is TenantReuse."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Indicates whether the AFD Endpoint is enabled. The default value is Enabled."
- }
- },
- "routes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of routes for this AFD Endpoint."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "profile": {
- "existing": true,
- "type": "Microsoft.Cdn/profiles",
- "apiVersion": "2023-05-01",
- "name": "[parameters('profileName')]"
- },
- "afd_endpoint": {
- "type": "Microsoft.Cdn/profiles/afdEndpoints",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "autoGeneratedDomainNameLabelScope": "[parameters('autoGeneratedDomainNameLabelScope')]",
- "enabledState": "[parameters('enabledState')]"
- },
- "dependsOn": [
- "profile"
- ]
- },
- "afd_endpoint_route": {
- "copy": {
- "name": "afd_endpoint_route",
- "count": "[length(parameters('routes'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-AfdEndpoint-Route', uniqueString(deployment().name, parameters('routes')[copyIndex()].name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('routes')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "afdEndpointName": {
- "value": "[parameters('name')]"
- },
- "cacheConfiguration": "[if(contains(parameters('routes')[copyIndex()], 'cacheConfiguration'), createObject('value', parameters('routes')[copyIndex()].cacheConfiguration), createObject('value', null()))]",
- "customDomainName": "[if(contains(parameters('routes')[copyIndex()], 'customDomainName'), createObject('value', parameters('routes')[copyIndex()].customDomainName), createObject('value', ''))]",
- "enabledState": "[if(contains(parameters('routes')[copyIndex()], 'enabledState'), createObject('value', parameters('routes')[copyIndex()].enabledState), createObject('value', 'Enabled'))]",
- "forwardingProtocol": "[if(contains(parameters('routes')[copyIndex()], 'forwardingProtocol'), createObject('value', parameters('routes')[copyIndex()].forwardingProtocol), createObject('value', 'MatchRequest'))]",
- "httpsRedirect": "[if(contains(parameters('routes')[copyIndex()], 'httpsRedirect'), createObject('value', parameters('routes')[copyIndex()].httpsRedirect), createObject('value', 'Enabled'))]",
- "linkToDefaultDomain": "[if(contains(parameters('routes')[copyIndex()], 'linkToDefaultDomain'), createObject('value', parameters('routes')[copyIndex()].linkToDefaultDomain), createObject('value', 'Enabled'))]",
- "originGroupName": "[if(contains(parameters('routes')[copyIndex()], 'originGroupName'), createObject('value', parameters('routes')[copyIndex()].originGroupName), createObject('value', ''))]",
- "originPath": "[if(contains(parameters('routes')[copyIndex()], 'originPath'), createObject('value', parameters('routes')[copyIndex()].originPath), createObject('value', ''))]",
- "patternsToMatch": "[if(contains(parameters('routes')[copyIndex()], 'patternsToMatch'), createObject('value', parameters('routes')[copyIndex()].patternsToMatch), createObject('value', createArray()))]",
- "ruleSets": "[if(contains(parameters('routes')[copyIndex()], 'ruleSets'), createObject('value', parameters('routes')[copyIndex()].ruleSets), createObject('value', createArray()))]",
- "supportedProtocols": "[if(contains(parameters('routes')[copyIndex()], 'supportedProtocols'), createObject('value', parameters('routes')[copyIndex()].supportedProtocols), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13253134886056545686"
- },
- "name": "CDN Profiles AFD Endpoint Route",
- "description": "This module deploys a CDN Profile AFD Endpoint route.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the route."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent CDN profile."
- }
- },
- "afdEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AFD endpoint."
- }
- },
- "cacheConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object."
- }
- },
- "customDomainName": {
- "type": "string",
- "metadata": {
- "description": "Optional. The name of the custom domain. The custom domain must be defined in the profile customDomains."
- }
- },
- "forwardingProtocol": {
- "type": "string",
- "defaultValue": "MatchRequest",
- "allowedValues": [
- "HttpOnly",
- "HttpsOnly",
- "MatchRequest"
- ],
- "metadata": {
- "description": "Optional. The protocol this rule will use when forwarding traffic to backends."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether this route is enabled."
- }
- },
- "httpsRedirect": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to automatically redirect HTTP traffic to HTTPS traffic."
- }
- },
- "linkToDefaultDomain": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether this route will be linked to the default endpoint domain."
- }
- },
- "originGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Required. The name of the origin group. The origin group must be defined in the profile originGroups."
- }
- },
- "originPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath."
- }
- },
- "patternsToMatch": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The route patterns of the rule."
- }
- },
- "ruleSets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The rule sets of the rule. The rule sets must be defined in the profile ruleSets."
- }
- },
- "supportedProtocols": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Http",
- "Https"
- ],
- "metadata": {
- "description": "Optional. The supported protocols of the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/afdEndpoints/routes",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('afdEndpointName'), parameters('name'))]",
- "properties": {
- "copy": [
- {
- "name": "ruleSets",
- "count": "[length(parameters('ruleSets'))]",
- "input": {
- "id": "[resourceId('Microsoft.Cdn/profiles/ruleSets', parameters('profileName'), parameters('ruleSets')[copyIndex('ruleSets')].name)]"
- }
- }
- ],
- "cacheConfiguration": "[if(not(empty(parameters('cacheConfiguration'))), parameters('cacheConfiguration'), null())]",
- "customDomains": "[if(not(empty(parameters('customDomainName'))), createArray(createObject('id', resourceId('Microsoft.Cdn/profiles/customDomains', parameters('profileName'), parameters('customDomainName')))), createArray())]",
- "enabledState": "[parameters('enabledState')]",
- "forwardingProtocol": "[parameters('forwardingProtocol')]",
- "httpsRedirect": "[parameters('httpsRedirect')]",
- "linkToDefaultDomain": "[parameters('linkToDefaultDomain')]",
- "originGroup": {
- "id": "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('originGroupName'))]"
- },
- "originPath": "[if(not(empty(parameters('originPath'))), parameters('originPath'), null())]",
- "patternsToMatch": "[parameters('patternsToMatch')]",
- "supportedProtocols": "[if(not(empty(parameters('supportedProtocols'))), parameters('supportedProtocols'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the route."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The ID of the route."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/afdEndpoints/routes', parameters('profileName'), parameters('afdEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the route was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "afd_endpoint",
- "profile"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the AFD Endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the AFD Endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/afdEndpoints', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('afd_endpoint', '2023-05-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/afdEndpoint/route/README.md b/modules/cdn/profile/afdEndpoint/route/README.md
deleted file mode 100644
index f00b17c993..0000000000
--- a/modules/cdn/profile/afdEndpoint/route/README.md
+++ /dev/null
@@ -1,208 +0,0 @@
-# CDN Profiles AFD Endpoint Route `[Microsoft.Cdn/profiles/afdEndpoints/routes]`
-
-This module deploys a CDN Profile AFD Endpoint route.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/afdEndpoints/routes` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/afdEndpoints/routes) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`afdEndpointName`](#parameter-afdendpointname) | string | The name of the AFD endpoint. |
-| [`name`](#parameter-name) | string | The name of the route. |
-| [`originGroupName`](#parameter-origingroupname) | string | The name of the origin group. The origin group must be defined in the profile originGroups. |
-| [`profileName`](#parameter-profilename) | string | The name of the parent CDN profile. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`cacheConfiguration`](#parameter-cacheconfiguration) | object | The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. |
-| [`customDomainName`](#parameter-customdomainname) | string | The name of the custom domain. The custom domain must be defined in the profile customDomains. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enabledState`](#parameter-enabledstate) | string | Whether this route is enabled. |
-| [`forwardingProtocol`](#parameter-forwardingprotocol) | string | The protocol this rule will use when forwarding traffic to backends. |
-| [`httpsRedirect`](#parameter-httpsredirect) | string | Whether to automatically redirect HTTP traffic to HTTPS traffic. |
-| [`linkToDefaultDomain`](#parameter-linktodefaultdomain) | string | Whether this route will be linked to the default endpoint domain. |
-| [`originPath`](#parameter-originpath) | string | A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. |
-| [`patternsToMatch`](#parameter-patternstomatch) | array | The route patterns of the rule. |
-| [`ruleSets`](#parameter-rulesets) | array | The rule sets of the rule. The rule sets must be defined in the profile ruleSets. |
-| [`supportedProtocols`](#parameter-supportedprotocols) | array | The supported protocols of the rule. |
-
-### Parameter: `afdEndpointName`
-
-The name of the AFD endpoint.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the route.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `originGroupName`
-
-The name of the origin group. The origin group must be defined in the profile originGroups.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `profileName`
-
-The name of the parent CDN profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `cacheConfiguration`
-
-The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `customDomainName`
-
-The name of the custom domain. The custom domain must be defined in the profile customDomains.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enabledState`
-
-Whether this route is enabled.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `forwardingProtocol`
-
-The protocol this rule will use when forwarding traffic to backends.
-
-- Required: No
-- Type: string
-- Default: `'MatchRequest'`
-- Allowed:
- ```Bicep
- [
- 'HttpOnly'
- 'HttpsOnly'
- 'MatchRequest'
- ]
- ```
-
-### Parameter: `httpsRedirect`
-
-Whether to automatically redirect HTTP traffic to HTTPS traffic.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `linkToDefaultDomain`
-
-Whether this route will be linked to the default endpoint domain.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `originPath`
-
-A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `patternsToMatch`
-
-The route patterns of the rule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `ruleSets`
-
-The rule sets of the rule. The rule sets must be defined in the profile ruleSets.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `supportedProtocols`
-
-The supported protocols of the rule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'Http'
- 'Https'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the route. |
-| `resourceGroupName` | string | The name of the resource group the route was created in. |
-| `resourceId` | string | The ID of the route. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/afdEndpoint/route/main.bicep b/modules/cdn/profile/afdEndpoint/route/main.bicep
deleted file mode 100644
index 8d919e4a00..0000000000
--- a/modules/cdn/profile/afdEndpoint/route/main.bicep
+++ /dev/null
@@ -1,131 +0,0 @@
-metadata name = 'CDN Profiles AFD Endpoint Route'
-metadata description = 'This module deploys a CDN Profile AFD Endpoint route.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the route.')
-param name string
-
-@description('Required. The name of the parent CDN profile.')
-param profileName string
-
-@description('Required. The name of the AFD endpoint.')
-param afdEndpointName string
-
-@description('Optional. The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.')
-param cacheConfiguration object = {}
-
-@description('Optional. The name of the custom domain. The custom domain must be defined in the profile customDomains.')
-param customDomainName string
-
-@allowed([
- 'HttpOnly'
- 'HttpsOnly'
- 'MatchRequest'
-])
-@description('Optional. The protocol this rule will use when forwarding traffic to backends.')
-param forwardingProtocol string = 'MatchRequest'
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether this route is enabled.')
-param enabledState string = 'Enabled'
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether to automatically redirect HTTP traffic to HTTPS traffic.')
-param httpsRedirect string = 'Enabled'
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether this route will be linked to the default endpoint domain.')
-param linkToDefaultDomain string = 'Enabled'
-
-@description('Required. The name of the origin group. The origin group must be defined in the profile originGroups.')
-param originGroupName string = ''
-
-@description('Optional. A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.')
-param originPath string = ''
-
-@description('Optional. The route patterns of the rule.')
-param patternsToMatch array = []
-
-@description('Optional. The rule sets of the rule. The rule sets must be defined in the profile ruleSets.')
-param ruleSets array = []
-
-@allowed([ 'Http', 'Https' ])
-@description('Optional. The supported protocols of the rule.')
-param supportedProtocols array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-
- resource afd_endpoint 'afdEndpoints@2023-05-01' existing = {
- name: afdEndpointName
- }
-
- resource custom_domain 'customDomains@2023-05-01' existing = if (!empty(customDomainName)) {
- name: customDomainName
- }
-
- resource originGroup 'originGroups@2023-05-01' existing = {
- name: originGroupName
- }
-
- resource rule_set 'ruleSets@2023-05-01' existing = [for ruleSet in ruleSets: {
- name: ruleSet.name
- }]
-}
-
-resource afd_endpoint_route 'Microsoft.Cdn/profiles/afdEndpoints/routes@2023-05-01' = {
- name: name
- parent: profile::afd_endpoint
- properties: {
- cacheConfiguration: !empty(cacheConfiguration) ? cacheConfiguration : null
- customDomains: !empty(customDomainName) ? [ {
- id: profile::custom_domain.id
- } ] : []
- enabledState: enabledState
- forwardingProtocol: forwardingProtocol
- httpsRedirect: httpsRedirect
- linkToDefaultDomain: linkToDefaultDomain
- originGroup: {
- id: profile::originGroup.id
- }
- originPath: !empty(originPath) ? originPath : null
- patternsToMatch: patternsToMatch
- ruleSets: [for (item, index) in ruleSets: {
- id: profile::rule_set[index].id
- }]
- supportedProtocols: !empty(supportedProtocols) ? supportedProtocols : null
- }
-}
-
-@description('The name of the route.')
-output name string = afd_endpoint_route.name
-
-@description('The ID of the route.')
-output resourceId string = afd_endpoint_route.id
-
-@description('The name of the resource group the route was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cdn/profile/afdEndpoint/route/main.json b/modules/cdn/profile/afdEndpoint/route/main.json
deleted file mode 100644
index 31b11ea4a0..0000000000
--- a/modules/cdn/profile/afdEndpoint/route/main.json
+++ /dev/null
@@ -1,205 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13253134886056545686"
- },
- "name": "CDN Profiles AFD Endpoint Route",
- "description": "This module deploys a CDN Profile AFD Endpoint route.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the route."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent CDN profile."
- }
- },
- "afdEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AFD endpoint."
- }
- },
- "cacheConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object."
- }
- },
- "customDomainName": {
- "type": "string",
- "metadata": {
- "description": "Optional. The name of the custom domain. The custom domain must be defined in the profile customDomains."
- }
- },
- "forwardingProtocol": {
- "type": "string",
- "defaultValue": "MatchRequest",
- "allowedValues": [
- "HttpOnly",
- "HttpsOnly",
- "MatchRequest"
- ],
- "metadata": {
- "description": "Optional. The protocol this rule will use when forwarding traffic to backends."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether this route is enabled."
- }
- },
- "httpsRedirect": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to automatically redirect HTTP traffic to HTTPS traffic."
- }
- },
- "linkToDefaultDomain": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether this route will be linked to the default endpoint domain."
- }
- },
- "originGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Required. The name of the origin group. The origin group must be defined in the profile originGroups."
- }
- },
- "originPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath."
- }
- },
- "patternsToMatch": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The route patterns of the rule."
- }
- },
- "ruleSets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The rule sets of the rule. The rule sets must be defined in the profile ruleSets."
- }
- },
- "supportedProtocols": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Http",
- "Https"
- ],
- "metadata": {
- "description": "Optional. The supported protocols of the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/afdEndpoints/routes",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('afdEndpointName'), parameters('name'))]",
- "properties": {
- "copy": [
- {
- "name": "ruleSets",
- "count": "[length(parameters('ruleSets'))]",
- "input": {
- "id": "[resourceId('Microsoft.Cdn/profiles/ruleSets', parameters('profileName'), parameters('ruleSets')[copyIndex('ruleSets')].name)]"
- }
- }
- ],
- "cacheConfiguration": "[if(not(empty(parameters('cacheConfiguration'))), parameters('cacheConfiguration'), null())]",
- "customDomains": "[if(not(empty(parameters('customDomainName'))), createArray(createObject('id', resourceId('Microsoft.Cdn/profiles/customDomains', parameters('profileName'), parameters('customDomainName')))), createArray())]",
- "enabledState": "[parameters('enabledState')]",
- "forwardingProtocol": "[parameters('forwardingProtocol')]",
- "httpsRedirect": "[parameters('httpsRedirect')]",
- "linkToDefaultDomain": "[parameters('linkToDefaultDomain')]",
- "originGroup": {
- "id": "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('originGroupName'))]"
- },
- "originPath": "[if(not(empty(parameters('originPath'))), parameters('originPath'), null())]",
- "patternsToMatch": "[parameters('patternsToMatch')]",
- "supportedProtocols": "[if(not(empty(parameters('supportedProtocols'))), parameters('supportedProtocols'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the route."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The ID of the route."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/afdEndpoints/routes', parameters('profileName'), parameters('afdEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the route was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/afdEndpoint/route/version.json b/modules/cdn/profile/afdEndpoint/route/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/afdEndpoint/route/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/afdEndpoint/version.json b/modules/cdn/profile/afdEndpoint/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/afdEndpoint/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/customdomain/README.md b/modules/cdn/profile/customdomain/README.md
deleted file mode 100644
index 33c0144835..0000000000
--- a/modules/cdn/profile/customdomain/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# CDN Profiles Custom Domains `[Microsoft.Cdn/profiles/customDomains]`
-
-This module deploys a CDN Profile Custom Domains.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/customDomains` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/customDomains) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`certificateType`](#parameter-certificatetype) | string | The type of the certificate used for secure delivery. |
-| [`hostName`](#parameter-hostname) | string | The host name of the domain. Must be a domain name. |
-| [`name`](#parameter-name) | string | The name of the custom domain. |
-| [`profileName`](#parameter-profilename) | string | The name of the CDN profile. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`extendedProperties`](#parameter-extendedproperties) | object | Key-Value pair representing migration properties for domains. |
-| [`minimumTlsVersion`](#parameter-minimumtlsversion) | string | The minimum TLS version required for the custom domain. Default value: TLS12. |
-| [`preValidatedCustomDomainResourceId`](#parameter-prevalidatedcustomdomainresourceid) | string | Resource reference to the Azure resource where custom domain ownership was prevalidated. |
-| [`secretName`](#parameter-secretname) | string | The name of the secret. ie. subs/rg/profile/secret. |
-
-**Optonal parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`azureDnsZoneResourceId`](#parameter-azurednszoneresourceid) | string | Resource reference to the Azure DNS zone. |
-
-### Parameter: `certificateType`
-
-The type of the certificate used for secure delivery.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CustomerCertificate'
- 'ManagedCertificate'
- ]
- ```
-
-### Parameter: `hostName`
-
-The host name of the domain. Must be a domain name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the custom domain.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `profileName`
-
-The name of the CDN profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `extendedProperties`
-
-Key-Value pair representing migration properties for domains.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `minimumTlsVersion`
-
-The minimum TLS version required for the custom domain. Default value: TLS12.
-
-- Required: No
-- Type: string
-- Default: `'TLS12'`
-- Allowed:
- ```Bicep
- [
- 'TLS10'
- 'TLS12'
- ]
- ```
-
-### Parameter: `preValidatedCustomDomainResourceId`
-
-Resource reference to the Azure resource where custom domain ownership was prevalidated.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `secretName`
-
-The name of the secret. ie. subs/rg/profile/secret.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `azureDnsZoneResourceId`
-
-Resource reference to the Azure DNS zone.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the custom domain. |
-| `resourceGroupName` | string | The name of the resource group the custom domain was created in. |
-| `resourceId` | string | The resource id of the custom domain. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/customdomain/main.bicep b/modules/cdn/profile/customdomain/main.bicep
deleted file mode 100644
index 63be21a3bb..0000000000
--- a/modules/cdn/profile/customdomain/main.bicep
+++ /dev/null
@@ -1,92 +0,0 @@
-metadata name = 'CDN Profiles Custom Domains'
-metadata description = 'This module deploys a CDN Profile Custom Domains.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the custom domain.')
-param name string
-
-@description('Required. The name of the CDN profile.')
-param profileName string
-
-@description('Required. The host name of the domain. Must be a domain name.')
-param hostName string
-
-@description('Optonal. Resource reference to the Azure DNS zone.')
-param azureDnsZoneResourceId string = ''
-
-@description('Optional. Key-Value pair representing migration properties for domains.')
-param extendedProperties object = {}
-
-@description('Optional. Resource reference to the Azure resource where custom domain ownership was prevalidated.')
-param preValidatedCustomDomainResourceId string = ''
-
-@allowed([
- 'CustomerCertificate'
- 'ManagedCertificate'
-])
-@description('Required. The type of the certificate used for secure delivery.')
-param certificateType string
-
-@allowed([
- 'TLS10'
- 'TLS12'
-])
-@description('Optional. The minimum TLS version required for the custom domain. Default value: TLS12.')
-param minimumTlsVersion string = 'TLS12'
-
-@description('Optional. The name of the secret. ie. subs/rg/profile/secret.')
-param secretName string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-
- resource profile_secrect 'secrets@2023-05-01' existing = if (!empty(secretName)) {
- name: secretName
- }
-}
-
-resource profile_custom_domain 'Microsoft.Cdn/profiles/customDomains@2023-05-01' = {
- name: name
- parent: profile
- properties: {
- azureDnsZone: !empty(azureDnsZoneResourceId) ? {
- id: azureDnsZoneResourceId
- } : null
- extendedProperties: !empty(extendedProperties) ? extendedProperties : null
- hostName: hostName
- preValidatedCustomDomainResourceId: !empty(preValidatedCustomDomainResourceId) ? {
- id: preValidatedCustomDomainResourceId
- } : null
- tlsSettings: {
- certificateType: certificateType
- minimumTlsVersion: minimumTlsVersion
- secret: !(empty(secretName)) ? {
- id: profile::profile_secrect.id
- } : null
- }
- }
-}
-
-@description('The name of the custom domain.')
-output name string = profile_custom_domain.name
-
-@description('The resource id of the custom domain.')
-output resourceId string = profile_custom_domain.id
-
-@description('The name of the resource group the custom domain was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cdn/profile/customdomain/main.json b/modules/cdn/profile/customdomain/main.json
deleted file mode 100644
index cc466d0cea..0000000000
--- a/modules/cdn/profile/customdomain/main.json
+++ /dev/null
@@ -1,145 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1547160911539181378"
- },
- "name": "CDN Profiles Custom Domains",
- "description": "This module deploys a CDN Profile Custom Domains.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the custom domain."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The host name of the domain. Must be a domain name."
- }
- },
- "azureDnsZoneResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optonal. Resource reference to the Azure DNS zone."
- }
- },
- "extendedProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key-Value pair representing migration properties for domains."
- }
- },
- "preValidatedCustomDomainResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource reference to the Azure resource where custom domain ownership was prevalidated."
- }
- },
- "certificateType": {
- "type": "string",
- "allowedValues": [
- "CustomerCertificate",
- "ManagedCertificate"
- ],
- "metadata": {
- "description": "Required. The type of the certificate used for secure delivery."
- }
- },
- "minimumTlsVersion": {
- "type": "string",
- "defaultValue": "TLS12",
- "allowedValues": [
- "TLS10",
- "TLS12"
- ],
- "metadata": {
- "description": "Optional. The minimum TLS version required for the custom domain. Default value: TLS12."
- }
- },
- "secretName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the secret. ie. subs/rg/profile/secret."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/customDomains",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "properties": {
- "azureDnsZone": "[if(not(empty(parameters('azureDnsZoneResourceId'))), createObject('id', parameters('azureDnsZoneResourceId')), null())]",
- "extendedProperties": "[if(not(empty(parameters('extendedProperties'))), parameters('extendedProperties'), null())]",
- "hostName": "[parameters('hostName')]",
- "preValidatedCustomDomainResourceId": "[if(not(empty(parameters('preValidatedCustomDomainResourceId'))), createObject('id', parameters('preValidatedCustomDomainResourceId')), null())]",
- "tlsSettings": {
- "certificateType": "[parameters('certificateType')]",
- "minimumTlsVersion": "[parameters('minimumTlsVersion')]",
- "secret": "[if(not(empty(parameters('secretName'))), createObject('id', resourceId('Microsoft.Cdn/profiles/secrets', parameters('profileName'), parameters('secretName'))), null())]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the custom domain."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the custom domain."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/customDomains', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/customdomain/version.json b/modules/cdn/profile/customdomain/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/customdomain/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/endpoint/README.md b/modules/cdn/profile/endpoint/README.md
deleted file mode 100644
index 2ed256dbe2..0000000000
--- a/modules/cdn/profile/endpoint/README.md
+++ /dev/null
@@ -1,99 +0,0 @@
-# CDN Profiles Endpoints `[Microsoft.Cdn/profiles/endpoints]`
-
-This module deploys a CDN Profile Endpoint.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/endpoints` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/2021-06-01/profiles/endpoints) |
-| `Microsoft.Cdn/profiles/endpoints/origins` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/2021-06-01/profiles/endpoints/origins) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the endpoint under the profile which is unique globally. |
-| [`properties`](#parameter-properties) | object | Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details). |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`profileName`](#parameter-profilename) | string | The name of the parent CDN profile. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Resource location. |
-| [`tags`](#parameter-tags) | object | Endpoint tags. |
-
-### Parameter: `name`
-
-Name of the endpoint under the profile which is unique globally.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `properties`
-
-Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details).
-
-- Required: Yes
-- Type: object
-
-### Parameter: `profileName`
-
-The name of the parent CDN profile. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Resource location.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `tags`
-
-Endpoint tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `endpointProperties` | object | The properties of the endpoint. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the endpoint. |
-| `resourceGroupName` | string | The name of the resource group the endpoint was created in. |
-| `resourceId` | string | The resource ID of the endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/endpoint/main.bicep b/modules/cdn/profile/endpoint/main.bicep
deleted file mode 100644
index c1ec5fe0e9..0000000000
--- a/modules/cdn/profile/endpoint/main.bicep
+++ /dev/null
@@ -1,82 +0,0 @@
-metadata name = 'CDN Profiles Endpoints'
-metadata description = 'This module deploys a CDN Profile Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment.')
-param profileName string
-
-@description('Required. Name of the endpoint under the profile which is unique globally.')
-param name string
-
-@description('Optional. Resource location.')
-param location string = resourceGroup().location
-
-@description('Required. Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details).')
-param properties object
-
-@description('Optional. Endpoint tags.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2021-06-01' existing = {
- name: profileName
-}
-
-resource endpoint 'microsoft.cdn/profiles/endpoints@2021-06-01' = {
- parent: profile
- name: name
- location: location
- properties: properties
- tags: tags
-}
-
-module endpoint_origins 'origin/main.bicep' = [for origin in properties.origins: {
- name: '${name}-origins-${origin.name}'
- params: {
- profileName: profile.name
- endpointName: name
- name: origin.name
- hostName: origin.properties.hostName
- httpPort: contains(origin.properties, 'httpPort') ? origin.properties.httpPort : 80
- httpsPort: contains(origin.properties, 'httpsPort') ? origin.properties.httpsPort : 443
- enabled: origin.properties.enabled
- priority: contains(origin.properties, 'priority') ? origin.properties.priority : -1
- weight: contains(origin.properties, 'weight') ? origin.properties.weight : -1
- originHostHeader: contains(origin.properties, 'originHostHeader') ? origin.properties.originHostHeader : ''
- privateLinkAlias: contains(origin.properties, 'privateLinkAlias') ? origin.properties.privateLinkAlias : ''
- privateLinkLocation: contains(origin.properties, 'privateLinkLocation') ? origin.properties.privateLinkLocation : ''
- privateLinkResourceId: contains(origin.properties, 'privateLinkResourceId') ? origin.properties.privateLinkResourceId : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the endpoint.')
-output name string = endpoint.name
-
-@description('The resource ID of the endpoint.')
-output resourceId string = endpoint.id
-
-@description('The name of the resource group the endpoint was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = endpoint.location
-
-@description('The properties of the endpoint.')
-output endpointProperties object = endpoint.properties
diff --git a/modules/cdn/profile/endpoint/main.json b/modules/cdn/profile/endpoint/main.json
deleted file mode 100644
index 3c3bd432dc..0000000000
--- a/modules/cdn/profile/endpoint/main.json
+++ /dev/null
@@ -1,334 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "4870857598190177606"
- },
- "name": "CDN Profiles Endpoints",
- "description": "This module deploys a CDN Profile Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the endpoint under the profile which is unique globally."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Resource location."
- }
- },
- "properties": {
- "type": "object",
- "metadata": {
- "description": "Required. Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Endpoint tags."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "profile": {
- "existing": true,
- "type": "Microsoft.Cdn/profiles",
- "apiVersion": "2021-06-01",
- "name": "[parameters('profileName')]"
- },
- "endpoint": {
- "type": "Microsoft.Cdn/profiles/endpoints",
- "apiVersion": "2021-06-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "properties": "[parameters('properties')]",
- "tags": "[parameters('tags')]",
- "dependsOn": [
- "profile"
- ]
- },
- "endpoint_origins": {
- "copy": {
- "name": "endpoint_origins",
- "count": "[length(parameters('properties').origins)]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-origins-{1}', parameters('name'), parameters('properties').origins[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "endpointName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('properties').origins[copyIndex()].name]"
- },
- "hostName": {
- "value": "[parameters('properties').origins[copyIndex()].properties.hostName]"
- },
- "httpPort": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'httpPort'), createObject('value', parameters('properties').origins[copyIndex()].properties.httpPort), createObject('value', 80))]",
- "httpsPort": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'httpsPort'), createObject('value', parameters('properties').origins[copyIndex()].properties.httpsPort), createObject('value', 443))]",
- "enabled": {
- "value": "[parameters('properties').origins[copyIndex()].properties.enabled]"
- },
- "priority": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'priority'), createObject('value', parameters('properties').origins[copyIndex()].properties.priority), createObject('value', -1))]",
- "weight": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'weight'), createObject('value', parameters('properties').origins[copyIndex()].properties.weight), createObject('value', -1))]",
- "originHostHeader": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'originHostHeader'), createObject('value', parameters('properties').origins[copyIndex()].properties.originHostHeader), createObject('value', ''))]",
- "privateLinkAlias": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'privateLinkAlias'), createObject('value', parameters('properties').origins[copyIndex()].properties.privateLinkAlias), createObject('value', ''))]",
- "privateLinkLocation": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'privateLinkLocation'), createObject('value', parameters('properties').origins[copyIndex()].properties.privateLinkLocation), createObject('value', ''))]",
- "privateLinkResourceId": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'privateLinkResourceId'), createObject('value', parameters('properties').origins[copyIndex()].properties.privateLinkResourceId), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5759722302271159823"
- },
- "name": "CDN Profiles Endpoints Origins",
- "description": "This module deploys a CDN Profile Endpoint Origin.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "endpointName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN Endpoint."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origin."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether the origin is enabled for load balancing."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The hostname of the origin."
- }
- },
- "httpPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. The HTTP port of the origin."
- }
- },
- "httpsPort": {
- "type": "int",
- "defaultValue": 443,
- "metadata": {
- "description": "Optional. The HTTPS port of the origin."
- }
- },
- "priority": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Conditional. The priority of origin in given origin group for load balancing. Required if `weight` is provided."
- }
- },
- "weight": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Conditional. The weight of the origin used for load balancing. Required if `priority` is provided."
- }
- },
- "privateLinkAlias": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The private link alias of the origin. Required if privateLinkLocation is provided."
- }
- },
- "privateLinkLocation": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The private link location of the origin. Required if privateLinkAlias is provided."
- }
- },
- "privateLinkResourceId": {
- "type": "string",
- "metadata": {
- "description": "Optional. The private link resource ID of the origin."
- }
- },
- "originHostHeader": {
- "type": "string",
- "metadata": {
- "description": "Optional. The host header value sent to the origin."
- }
- },
- "profileName": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the CDN profile. Default to \"default\"."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/endpoints/origins",
- "apiVersion": "2021-06-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('endpointName'), parameters('name'))]",
- "properties": "[union(createObject('hostName', parameters('hostName'), 'httpPort', parameters('httpPort'), 'enabled', parameters('enabled'), 'httpsPort', parameters('httpsPort')), if(or(greater(parameters('priority'), 0), greater(parameters('weight'), 0)), createObject('priority', parameters('priority'), 'weight', parameters('weight')), createObject()), if(and(not(empty(parameters('privateLinkAlias'))), not(empty(parameters('privateLinkLocation')))), createObject('privateLinkAlias', parameters('privateLinkAlias'), 'privateLinkLocation', parameters('privateLinkLocation')), createObject()), if(not(empty(parameters('privateLinkResourceId'))), createObject('privateLinkResourceId', parameters('privateLinkResourceId')), createObject()), if(not(empty(parameters('originHostHeader'))), createObject('originHostHeader', parameters('originHostHeader')), createObject()))]"
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/endpoints/origins', parameters('profileName'), parameters('endpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Cdn/profiles/endpoints', parameters('profileName'), parameters('endpointName')), '2021-06-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "profile"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/endpoints', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('endpoint', '2021-06-01', 'full').location]"
- },
- "endpointProperties": {
- "type": "object",
- "metadata": {
- "description": "The properties of the endpoint."
- },
- "value": "[reference('endpoint')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/endpoint/origin/README.md b/modules/cdn/profile/endpoint/origin/README.md
deleted file mode 100644
index f68d78a71a..0000000000
--- a/modules/cdn/profile/endpoint/origin/README.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# CDN Profiles Endpoints Origins `[Microsoft.Cdn/profiles/endpoints/origins]`
-
-This module deploys a CDN Profile Endpoint Origin.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/endpoints/origins` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/2021-06-01/profiles/endpoints/origins) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`endpointName`](#parameter-endpointname) | string | The name of the CDN Endpoint. |
-| [`hostName`](#parameter-hostname) | string | The hostname of the origin. |
-| [`name`](#parameter-name) | string | The name of the origin. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`priority`](#parameter-priority) | int | The priority of origin in given origin group for load balancing. Required if `weight` is provided. |
-| [`privateLinkAlias`](#parameter-privatelinkalias) | string | The private link alias of the origin. Required if privateLinkLocation is provided. |
-| [`privateLinkLocation`](#parameter-privatelinklocation) | string | The private link location of the origin. Required if privateLinkAlias is provided. |
-| [`weight`](#parameter-weight) | int | The weight of the origin used for load balancing. Required if `priority` is provided. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enabled`](#parameter-enabled) | bool | Whether the origin is enabled for load balancing. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`httpPort`](#parameter-httpport) | int | The HTTP port of the origin. |
-| [`httpsPort`](#parameter-httpsport) | int | The HTTPS port of the origin. |
-| [`originHostHeader`](#parameter-originhostheader) | string | The host header value sent to the origin. |
-| [`privateLinkResourceId`](#parameter-privatelinkresourceid) | string | The private link resource ID of the origin. |
-| [`profileName`](#parameter-profilename) | string | The name of the CDN profile. Default to "default". |
-
-### Parameter: `endpointName`
-
-The name of the CDN Endpoint.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `hostName`
-
-The hostname of the origin.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the origin.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `priority`
-
-The priority of origin in given origin group for load balancing. Required if `weight` is provided.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `privateLinkAlias`
-
-The private link alias of the origin. Required if privateLinkLocation is provided.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateLinkLocation`
-
-The private link location of the origin. Required if privateLinkAlias is provided.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `weight`
-
-The weight of the origin used for load balancing. Required if `priority` is provided.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `enabled`
-
-Whether the origin is enabled for load balancing.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `httpPort`
-
-The HTTP port of the origin.
-
-- Required: No
-- Type: int
-- Default: `80`
-
-### Parameter: `httpsPort`
-
-The HTTPS port of the origin.
-
-- Required: No
-- Type: int
-- Default: `443`
-
-### Parameter: `originHostHeader`
-
-The host header value sent to the origin.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateLinkResourceId`
-
-The private link resource ID of the origin.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `profileName`
-
-The name of the CDN profile. Default to "default".
-
-- Required: No
-- Type: string
-- Default: `'default'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the endpoint. |
-| `resourceGroupName` | string | The name of the resource group the endpoint was created in. |
-| `resourceId` | string | The resource ID of the endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/endpoint/origin/main.bicep b/modules/cdn/profile/endpoint/origin/main.bicep
deleted file mode 100644
index e0ab14c064..0000000000
--- a/modules/cdn/profile/endpoint/origin/main.bicep
+++ /dev/null
@@ -1,99 +0,0 @@
-metadata name = 'CDN Profiles Endpoints Origins'
-metadata description = 'This module deploys a CDN Profile Endpoint Origin.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the CDN Endpoint.')
-param endpointName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. The name of the origin.')
-param name string
-
-@description('Optional. Whether the origin is enabled for load balancing.')
-param enabled bool = true
-
-@description('Required. The hostname of the origin.')
-param hostName string
-
-@description('Optional. The HTTP port of the origin.')
-param httpPort int = 80
-
-@description('Optional. The HTTPS port of the origin.')
-param httpsPort int = 443
-
-@description('Conditional. The priority of origin in given origin group for load balancing. Required if `weight` is provided.')
-param priority int = -1
-
-@description('Conditional. The weight of the origin used for load balancing. Required if `priority` is provided.')
-param weight int = -1
-
-@description('Conditional. The private link alias of the origin. Required if privateLinkLocation is provided.')
-param privateLinkAlias string
-
-@description('Conditional. The private link location of the origin. Required if privateLinkAlias is provided.')
-param privateLinkLocation string
-
-@description('Optional. The private link resource ID of the origin.')
-param privateLinkResourceId string
-
-@description('Optional. The host header value sent to the origin.')
-param originHostHeader string
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-@description('Optional. The name of the CDN profile. Default to "default".')
-param profileName string = 'default'
-
-resource profile 'Microsoft.Cdn/profiles@2021-06-01' existing = {
- name: profileName
-}
-
-resource endpoint 'Microsoft.Cdn/profiles/endpoints@2021-06-01' existing = {
- parent: profile
- name: endpointName
-}
-
-resource origins 'Microsoft.Cdn/profiles/endpoints/origins@2021-06-01' = {
- parent: endpoint
- name: name
- properties: union({
- hostName: hostName
- httpPort: httpPort
- enabled: enabled
- httpsPort: httpsPort
- }, ((priority > 0 || weight > 0) ? {
- priority: priority
- weight: weight
- } : {}), (!empty(privateLinkAlias) && !empty(privateLinkLocation) ? {
- privateLinkAlias: privateLinkAlias
- privateLinkLocation: privateLinkLocation
- } : {}), (!empty(privateLinkResourceId) ? {
- privateLinkResourceId: privateLinkResourceId
- } : {}), (!empty(originHostHeader) ? {
- originHostHeader: originHostHeader
- } : {}))
-}
-
-@description('The name of the endpoint.')
-output name string = origins.name
-
-@description('The resource ID of the endpoint.')
-output resourceId string = origins.id
-
-@description('The name of the resource group the endpoint was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = endpoint.location
diff --git a/modules/cdn/profile/endpoint/origin/main.json b/modules/cdn/profile/endpoint/origin/main.json
deleted file mode 100644
index 00fd4df753..0000000000
--- a/modules/cdn/profile/endpoint/origin/main.json
+++ /dev/null
@@ -1,159 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5759722302271159823"
- },
- "name": "CDN Profiles Endpoints Origins",
- "description": "This module deploys a CDN Profile Endpoint Origin.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "endpointName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN Endpoint."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origin."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether the origin is enabled for load balancing."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The hostname of the origin."
- }
- },
- "httpPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. The HTTP port of the origin."
- }
- },
- "httpsPort": {
- "type": "int",
- "defaultValue": 443,
- "metadata": {
- "description": "Optional. The HTTPS port of the origin."
- }
- },
- "priority": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Conditional. The priority of origin in given origin group for load balancing. Required if `weight` is provided."
- }
- },
- "weight": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Conditional. The weight of the origin used for load balancing. Required if `priority` is provided."
- }
- },
- "privateLinkAlias": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The private link alias of the origin. Required if privateLinkLocation is provided."
- }
- },
- "privateLinkLocation": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The private link location of the origin. Required if privateLinkAlias is provided."
- }
- },
- "privateLinkResourceId": {
- "type": "string",
- "metadata": {
- "description": "Optional. The private link resource ID of the origin."
- }
- },
- "originHostHeader": {
- "type": "string",
- "metadata": {
- "description": "Optional. The host header value sent to the origin."
- }
- },
- "profileName": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the CDN profile. Default to \"default\"."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/endpoints/origins",
- "apiVersion": "2021-06-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('endpointName'), parameters('name'))]",
- "properties": "[union(createObject('hostName', parameters('hostName'), 'httpPort', parameters('httpPort'), 'enabled', parameters('enabled'), 'httpsPort', parameters('httpsPort')), if(or(greater(parameters('priority'), 0), greater(parameters('weight'), 0)), createObject('priority', parameters('priority'), 'weight', parameters('weight')), createObject()), if(and(not(empty(parameters('privateLinkAlias'))), not(empty(parameters('privateLinkLocation')))), createObject('privateLinkAlias', parameters('privateLinkAlias'), 'privateLinkLocation', parameters('privateLinkLocation')), createObject()), if(not(empty(parameters('privateLinkResourceId'))), createObject('privateLinkResourceId', parameters('privateLinkResourceId')), createObject()), if(not(empty(parameters('originHostHeader'))), createObject('originHostHeader', parameters('originHostHeader')), createObject()))]"
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/endpoints/origins', parameters('profileName'), parameters('endpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Cdn/profiles/endpoints', parameters('profileName'), parameters('endpointName')), '2021-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/endpoint/origin/version.json b/modules/cdn/profile/endpoint/origin/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/endpoint/origin/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/endpoint/version.json b/modules/cdn/profile/endpoint/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/endpoint/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/main.bicep b/modules/cdn/profile/main.bicep
deleted file mode 100644
index dd7abe44db..0000000000
--- a/modules/cdn/profile/main.bicep
+++ /dev/null
@@ -1,261 +0,0 @@
-metadata name = 'CDN Profiles'
-metadata description = 'This module deploys a CDN Profile.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the CDN profile.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@allowed([
- 'Custom_Verizon'
- 'Premium_AzureFrontDoor'
- 'Premium_Verizon'
- 'StandardPlus_955BandWidth_ChinaCdn'
- 'StandardPlus_AvgBandWidth_ChinaCdn'
- 'StandardPlus_ChinaCdn'
- 'Standard_955BandWidth_ChinaCdn'
- 'Standard_Akamai'
- 'Standard_AvgBandWidth_ChinaCdn'
- 'Standard_AzureFrontDoor'
- 'Standard_ChinaCdn'
- 'Standard_Microsoft'
- 'Standard_Verizon'
-])
-@description('Required. The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.')
-param sku string
-
-@description('Optional. Send and receive timeout on forwarding request to the origin.')
-param originResponseTimeoutSeconds int = 60
-
-@description('Optional. Name of the endpoint under the profile which is unique globally.')
-param endpointName string = ''
-
-@description('Optional. Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details).')
-param endpointProperties object = {}
-
-@description('Optional. Array of secret objects.')
-param secrets array = []
-
-@description('Optional. Array of custom domain objects.')
-param customDomains array = []
-
-@description('Conditional. Array of origin group objects. Required if the afdEndpoints is specified.')
-param origionGroups array = []
-
-@description('Optional. Array of rule set objects.')
-param ruleSets array = []
-
-@description('Optional. Array of AFD endpoint objects.')
-param afdEndpoints array = []
-
-@description('Optional. Endpoint tags.')
-param tags object?
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- 'CDN Endpoint Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '426e0c7f-0c7e-4658-b36f-ff54d6c29b45')
- 'CDN Endpoint Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '871e35f6-b5c1-49cc-a043-bde969a0f2cd')
- 'CDN Profile Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ec156ff8-a8d1-4d15-830c-5b80698ca432')
- 'CDN Profile Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8f96442b-4075-438f-813d-ad51ab4019af')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' = {
- name: name
- location: location
- sku: {
- name: sku
- }
- properties: {
- originResponseTimeoutSeconds: originResponseTimeoutSeconds
- }
- tags: tags
-}
-
-resource profile_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: profile
-}
-
-resource profile_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(profile.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: profile
-}]
-
-module profile_endpoint 'endpoint/main.bicep' = if (!empty(endpointProperties)) {
- name: '${uniqueString(deployment().name, location)}-Profile-Endpoint'
- params: {
- name: !empty(endpointName) ? endpointName : '${profile.name}-endpoint'
- properties: endpointProperties
- location: location
- profileName: profile.name
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module profile_secret 'secret/main.bicep' = [for (secret, index) in secrets: {
- name: '${uniqueString(deployment().name)}-Profile-Secret-${index}'
- params: {
- name: secret.name
- profileName: profile.name
- type: secret.type
- secretSourceResourceId: secret.secretSourceResourceId
- subjectAlternativeNames: contains(secret, 'subjectAlternativeNames') ? secret.subjectAlternativeNames : []
- useLatestVersion: contains(secret, 'useLatestVersion') ? secret.useLatestVersion : false
- secretVersion: secret.secretVersion
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module profile_custom_domain 'customdomain/main.bicep' = [for (customDomain, index) in customDomains: {
- name: '${uniqueString(deployment().name)}-CustomDomain-${index}'
- dependsOn: [
- profile_secret
- ]
- params: {
- name: customDomain.name
- profileName: profile.name
- hostName: customDomain.hostName
- azureDnsZoneResourceId: contains(customDomain, 'azureDnsZoneResourceId') ? customDomain.azureDnsZoneResourceId : ''
- extendedProperties: contains(customDomain, 'extendedProperties') ? customDomain.extendedProperties : {}
- certificateType: customDomain.certificateType
- minimumTlsVersion: contains(customDomain, 'minimumTlsVersion') ? customDomain.minimumTlsVersion : 'TLS12'
- preValidatedCustomDomainResourceId: contains(customDomain, 'preValidatedCustomDomainResourceId') ? customDomain.preValidatedCustomDomainResourceId : ''
- secretName: contains(customDomain, 'secretName') ? customDomain.secretName : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module profile_origionGroup 'origingroup/main.bicep' = [for (origingroup, index) in origionGroups: {
- name: '${uniqueString(deployment().name)}-Profile-OrigionGroup-${index}'
- params: {
- name: origingroup.name
- profileName: profile.name
- healthProbeSettings: contains(origingroup, 'healthProbeSettings') ? origingroup.healthProbeSettings : {}
- loadBalancingSettings: origingroup.loadBalancingSettings
- sessionAffinityState: contains(origingroup, 'sessionAffinityState') ? origingroup.sessionAffinityState : 'Disabled'
- trafficRestorationTimeToHealedOrNewEndpointsInMinutes: contains(origingroup, 'trafficRestorationTimeToHealedOrNewEndpointsInMinutes') ? origingroup.trafficRestorationTimeToHealedOrNewEndpointsInMinutes : 10
- origins: origingroup.origins
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module profile_ruleSet 'ruleset/main.bicep' = [for (ruleSet, index) in ruleSets: {
- name: '${uniqueString(deployment().name)}-Profile-RuleSet-${index}'
- params: {
- name: ruleSet.name
- profileName: profile.name
- rules: ruleSet.rules
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module profile_afdEndpoint 'afdEndpoint/main.bicep' = [for (afdEndpoint, index) in afdEndpoints: {
- name: '${uniqueString(deployment().name)}-Profile-AfdEndpoint-${index}'
- dependsOn: [
- profile_origionGroup
- profile_custom_domain
- profile_ruleSet
- ]
- params: {
- name: afdEndpoint.name
- location: location
- profileName: profile.name
- autoGeneratedDomainNameLabelScope: contains(afdEndpoint, 'autoGeneratedDomainNameLabelScope') ? afdEndpoint.autoGeneratedDomainNameLabelScope : 'TenantReuse'
- enabledState: contains(afdEndpoint, 'enabledState') ? afdEndpoint.enabledState : 'Enabled'
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- routes: contains(afdEndpoint, 'routes') ? afdEndpoint.routes : []
- tags: afdEndpoint.?tags ?? tags
- }
-}]
-
-@description('The name of the CDN profile.')
-output name string = profile.name
-
-@description('The resource ID of the CDN profile.')
-output resourceId string = profile.id
-
-@description('The resource group where the CDN profile is deployed.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The type of the CDN profile.')
-output profileType string = profile.type
-
-@description('The location the resource was deployed into.')
-output location string = profile.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/cdn/profile/main.json b/modules/cdn/profile/main.json
deleted file mode 100644
index 3b9850f2ef..0000000000
--- a/modules/cdn/profile/main.json
+++ /dev/null
@@ -1,2150 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "9196888550176341860"
- },
- "name": "CDN Profiles",
- "description": "This module deploys a CDN Profile.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the CDN profile."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "sku": {
- "type": "string",
- "allowedValues": [
- "Custom_Verizon",
- "Premium_AzureFrontDoor",
- "Premium_Verizon",
- "StandardPlus_955BandWidth_ChinaCdn",
- "StandardPlus_AvgBandWidth_ChinaCdn",
- "StandardPlus_ChinaCdn",
- "Standard_955BandWidth_ChinaCdn",
- "Standard_Akamai",
- "Standard_AvgBandWidth_ChinaCdn",
- "Standard_AzureFrontDoor",
- "Standard_ChinaCdn",
- "Standard_Microsoft",
- "Standard_Verizon"
- ],
- "metadata": {
- "description": "Required. The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile."
- }
- },
- "originResponseTimeoutSeconds": {
- "type": "int",
- "defaultValue": 60,
- "metadata": {
- "description": "Optional. Send and receive timeout on forwarding request to the origin."
- }
- },
- "endpointName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of the endpoint under the profile which is unique globally."
- }
- },
- "endpointProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details)."
- }
- },
- "secrets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of secret objects."
- }
- },
- "customDomains": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of custom domain objects."
- }
- },
- "origionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Conditional. Array of origin group objects. Required if the afdEndpoints is specified."
- }
- },
- "ruleSets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of rule set objects."
- }
- },
- "afdEndpoints": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of AFD endpoint objects."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Endpoint tags."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "CDN Endpoint Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '426e0c7f-0c7e-4658-b36f-ff54d6c29b45')]",
- "CDN Endpoint Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '871e35f6-b5c1-49cc-a043-bde969a0f2cd')]",
- "CDN Profile Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ec156ff8-a8d1-4d15-830c-5b80698ca432')]",
- "CDN Profile Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8f96442b-4075-438f-813d-ad51ab4019af')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "profile": {
- "type": "Microsoft.Cdn/profiles",
- "apiVersion": "2023-05-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "sku": {
- "name": "[parameters('sku')]"
- },
- "properties": {
- "originResponseTimeoutSeconds": "[parameters('originResponseTimeoutSeconds')]"
- },
- "tags": "[parameters('tags')]"
- },
- "profile_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Cdn/profiles/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "profile"
- ]
- },
- "profile_roleAssignments": {
- "copy": {
- "name": "profile_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Cdn/profiles/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Cdn/profiles', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "profile"
- ]
- },
- "profile_endpoint": {
- "condition": "[not(empty(parameters('endpointProperties')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-Endpoint', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": "[if(not(empty(parameters('endpointName'))), createObject('value', parameters('endpointName')), createObject('value', format('{0}-endpoint', parameters('name'))))]",
- "properties": {
- "value": "[parameters('endpointProperties')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "profileName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15779750813347176502"
- },
- "name": "CDN Profiles Endpoints",
- "description": "This module deploys a CDN Profile Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the endpoint under the profile which is unique globally."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Resource location."
- }
- },
- "properties": {
- "type": "object",
- "metadata": {
- "description": "Required. Endpoint properties (see https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/profiles/endpoints?pivots=deployment-language-bicep#endpointproperties for details)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Endpoint tags."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "profile": {
- "existing": true,
- "type": "Microsoft.Cdn/profiles",
- "apiVersion": "2021-06-01",
- "name": "[parameters('profileName')]"
- },
- "endpoint": {
- "type": "Microsoft.Cdn/profiles/endpoints",
- "apiVersion": "2021-06-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "properties": "[parameters('properties')]",
- "tags": "[parameters('tags')]",
- "dependsOn": [
- "profile"
- ]
- },
- "endpoint_origins": {
- "copy": {
- "name": "endpoint_origins",
- "count": "[length(parameters('properties').origins)]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-origins-{1}', parameters('name'), parameters('properties').origins[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "endpointName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('properties').origins[copyIndex()].name]"
- },
- "hostName": {
- "value": "[parameters('properties').origins[copyIndex()].properties.hostName]"
- },
- "httpPort": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'httpPort'), createObject('value', parameters('properties').origins[copyIndex()].properties.httpPort), createObject('value', 80))]",
- "httpsPort": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'httpsPort'), createObject('value', parameters('properties').origins[copyIndex()].properties.httpsPort), createObject('value', 443))]",
- "enabled": {
- "value": "[parameters('properties').origins[copyIndex()].properties.enabled]"
- },
- "priority": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'priority'), createObject('value', parameters('properties').origins[copyIndex()].properties.priority), createObject('value', -1))]",
- "weight": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'weight'), createObject('value', parameters('properties').origins[copyIndex()].properties.weight), createObject('value', -1))]",
- "originHostHeader": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'originHostHeader'), createObject('value', parameters('properties').origins[copyIndex()].properties.originHostHeader), createObject('value', ''))]",
- "privateLinkAlias": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'privateLinkAlias'), createObject('value', parameters('properties').origins[copyIndex()].properties.privateLinkAlias), createObject('value', ''))]",
- "privateLinkLocation": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'privateLinkLocation'), createObject('value', parameters('properties').origins[copyIndex()].properties.privateLinkLocation), createObject('value', ''))]",
- "privateLinkResourceId": "[if(contains(parameters('properties').origins[copyIndex()].properties, 'privateLinkResourceId'), createObject('value', parameters('properties').origins[copyIndex()].properties.privateLinkResourceId), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7311789591820295360"
- },
- "name": "CDN Profiles Endpoints Origins",
- "description": "This module deploys a CDN Profile Endpoint Origin.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "endpointName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN Endpoint."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origin."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether the origin is enabled for load balancing."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The hostname of the origin."
- }
- },
- "httpPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. The HTTP port of the origin."
- }
- },
- "httpsPort": {
- "type": "int",
- "defaultValue": 443,
- "metadata": {
- "description": "Optional. The HTTPS port of the origin."
- }
- },
- "priority": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Conditional. The priority of origin in given origin group for load balancing. Required if `weight` is provided."
- }
- },
- "weight": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Conditional. The weight of the origin used for load balancing. Required if `priority` is provided."
- }
- },
- "privateLinkAlias": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The private link alias of the origin. Required if privateLinkLocation is provided."
- }
- },
- "privateLinkLocation": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The private link location of the origin. Required if privateLinkAlias is provided."
- }
- },
- "privateLinkResourceId": {
- "type": "string",
- "metadata": {
- "description": "Optional. The private link resource ID of the origin."
- }
- },
- "originHostHeader": {
- "type": "string",
- "metadata": {
- "description": "Optional. The host header value sent to the origin."
- }
- },
- "profileName": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the CDN profile. Default to \"default\"."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/endpoints/origins",
- "apiVersion": "2021-06-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('endpointName'), parameters('name'))]",
- "properties": "[union(createObject('hostName', parameters('hostName'), 'httpPort', parameters('httpPort'), 'enabled', parameters('enabled'), 'httpsPort', parameters('httpsPort')), if(or(greater(parameters('priority'), 0), greater(parameters('weight'), 0)), createObject('priority', parameters('priority'), 'weight', parameters('weight')), createObject()), if(and(not(empty(parameters('privateLinkAlias'))), not(empty(parameters('privateLinkLocation')))), createObject('privateLinkAlias', parameters('privateLinkAlias'), 'privateLinkLocation', parameters('privateLinkLocation')), createObject()), if(not(empty(parameters('privateLinkResourceId'))), createObject('privateLinkResourceId', parameters('privateLinkResourceId')), createObject()), if(not(empty(parameters('originHostHeader'))), createObject('originHostHeader', parameters('originHostHeader')), createObject()))]"
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/endpoints/origins', parameters('profileName'), parameters('endpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Cdn/profiles/endpoints', parameters('profileName'), parameters('endpointName')), '2021-06-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "profile"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/endpoints', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('endpoint', '2021-06-01', 'full').location]"
- },
- "endpointProperties": {
- "type": "object",
- "metadata": {
- "description": "The properties of the endpoint."
- },
- "value": "[reference('endpoint')]"
- }
- }
- }
- },
- "dependsOn": [
- "profile"
- ]
- },
- "profile_secret": {
- "copy": {
- "name": "profile_secret",
- "count": "[length(parameters('secrets'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-Secret-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('secrets')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('name')]"
- },
- "type": {
- "value": "[parameters('secrets')[copyIndex()].type]"
- },
- "secretSourceResourceId": {
- "value": "[parameters('secrets')[copyIndex()].secretSourceResourceId]"
- },
- "subjectAlternativeNames": "[if(contains(parameters('secrets')[copyIndex()], 'subjectAlternativeNames'), createObject('value', parameters('secrets')[copyIndex()].subjectAlternativeNames), createObject('value', createArray()))]",
- "useLatestVersion": "[if(contains(parameters('secrets')[copyIndex()], 'useLatestVersion'), createObject('value', parameters('secrets')[copyIndex()].useLatestVersion), createObject('value', false()))]",
- "secretVersion": {
- "value": "[parameters('secrets')[copyIndex()].secretVersion]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7448367317152547669"
- },
- "name": "CDN Profiles Secret",
- "description": "This module deploys a CDN Profile Secret.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the secrect."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment."
- }
- },
- "type": {
- "type": "string",
- "defaultValue": "AzureFirstPartyManagedCertificate",
- "allowedValues": [
- "AzureFirstPartyManagedCertificate",
- "CustomerCertificate",
- "ManagedCertificate",
- "UrlSigningKey"
- ],
- "metadata": {
- "description": "Required. The type of the secrect."
- }
- },
- "secretSourceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The resource ID of the secrect source. Required if the type is CustomerCertificate."
- }
- },
- "secretVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The version of the secret."
- }
- },
- "subjectAlternativeNames": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The subject alternative names of the secrect."
- }
- },
- "useLatestVersion": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether to use the latest version of the secrect."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/secrets",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "properties": {
- "parameters": "[if(equals(parameters('type'), 'CustomerCertificate'), createObject('type', parameters('type'), 'secretSource', createObject('id', parameters('secretSourceResourceId')), 'secretVersion', parameters('secretVersion'), 'subjectAlternativeNames', parameters('subjectAlternativeNames'), 'useLatestVersion', parameters('useLatestVersion')), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the secrect."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the secrect."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/secrets', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the secret was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "profile"
- ]
- },
- "profile_custom_domain": {
- "copy": {
- "name": "profile_custom_domain",
- "count": "[length(parameters('customDomains'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-CustomDomain-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('customDomains')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('name')]"
- },
- "hostName": {
- "value": "[parameters('customDomains')[copyIndex()].hostName]"
- },
- "azureDnsZoneResourceId": "[if(contains(parameters('customDomains')[copyIndex()], 'azureDnsZoneResourceId'), createObject('value', parameters('customDomains')[copyIndex()].azureDnsZoneResourceId), createObject('value', ''))]",
- "extendedProperties": "[if(contains(parameters('customDomains')[copyIndex()], 'extendedProperties'), createObject('value', parameters('customDomains')[copyIndex()].extendedProperties), createObject('value', createObject()))]",
- "certificateType": {
- "value": "[parameters('customDomains')[copyIndex()].certificateType]"
- },
- "minimumTlsVersion": "[if(contains(parameters('customDomains')[copyIndex()], 'minimumTlsVersion'), createObject('value', parameters('customDomains')[copyIndex()].minimumTlsVersion), createObject('value', 'TLS12'))]",
- "preValidatedCustomDomainResourceId": "[if(contains(parameters('customDomains')[copyIndex()], 'preValidatedCustomDomainResourceId'), createObject('value', parameters('customDomains')[copyIndex()].preValidatedCustomDomainResourceId), createObject('value', ''))]",
- "secretName": "[if(contains(parameters('customDomains')[copyIndex()], 'secretName'), createObject('value', parameters('customDomains')[copyIndex()].secretName), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16926903089536842323"
- },
- "name": "CDN Profiles Custom Domains",
- "description": "This module deploys a CDN Profile Custom Domains.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the custom domain."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The host name of the domain. Must be a domain name."
- }
- },
- "azureDnsZoneResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optonal. Resource reference to the Azure DNS zone."
- }
- },
- "extendedProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key-Value pair representing migration properties for domains."
- }
- },
- "preValidatedCustomDomainResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource reference to the Azure resource where custom domain ownership was prevalidated."
- }
- },
- "certificateType": {
- "type": "string",
- "allowedValues": [
- "CustomerCertificate",
- "ManagedCertificate"
- ],
- "metadata": {
- "description": "Required. The type of the certificate used for secure delivery."
- }
- },
- "minimumTlsVersion": {
- "type": "string",
- "defaultValue": "TLS12",
- "allowedValues": [
- "TLS10",
- "TLS12"
- ],
- "metadata": {
- "description": "Optional. The minimum TLS version required for the custom domain. Default value: TLS12."
- }
- },
- "secretName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the secret. ie. subs/rg/profile/secret."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/customDomains",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "properties": {
- "azureDnsZone": "[if(not(empty(parameters('azureDnsZoneResourceId'))), createObject('id', parameters('azureDnsZoneResourceId')), null())]",
- "extendedProperties": "[if(not(empty(parameters('extendedProperties'))), parameters('extendedProperties'), null())]",
- "hostName": "[parameters('hostName')]",
- "preValidatedCustomDomainResourceId": "[if(not(empty(parameters('preValidatedCustomDomainResourceId'))), createObject('id', parameters('preValidatedCustomDomainResourceId')), null())]",
- "tlsSettings": {
- "certificateType": "[parameters('certificateType')]",
- "minimumTlsVersion": "[parameters('minimumTlsVersion')]",
- "secret": "[if(not(empty(parameters('secretName'))), createObject('id', resourceId('Microsoft.Cdn/profiles/secrets', parameters('profileName'), parameters('secretName'))), null())]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the custom domain."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the custom domain."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/customDomains', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "profile",
- "profile_secret"
- ]
- },
- "profile_origionGroup": {
- "copy": {
- "name": "profile_origionGroup",
- "count": "[length(parameters('origionGroups'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-OrigionGroup-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('origionGroups')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('name')]"
- },
- "healthProbeSettings": "[if(contains(parameters('origionGroups')[copyIndex()], 'healthProbeSettings'), createObject('value', parameters('origionGroups')[copyIndex()].healthProbeSettings), createObject('value', createObject()))]",
- "loadBalancingSettings": {
- "value": "[parameters('origionGroups')[copyIndex()].loadBalancingSettings]"
- },
- "sessionAffinityState": "[if(contains(parameters('origionGroups')[copyIndex()], 'sessionAffinityState'), createObject('value', parameters('origionGroups')[copyIndex()].sessionAffinityState), createObject('value', 'Disabled'))]",
- "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": "[if(contains(parameters('origionGroups')[copyIndex()], 'trafficRestorationTimeToHealedOrNewEndpointsInMinutes'), createObject('value', parameters('origionGroups')[copyIndex()].trafficRestorationTimeToHealedOrNewEndpointsInMinutes), createObject('value', 10))]",
- "origins": {
- "value": "[parameters('origionGroups')[copyIndex()].origins]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "11717674362000061520"
- },
- "name": "CDN Profiles Origin Group",
- "description": "This module deploys a CDN Profile Origin Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origin group."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "healthProbeSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Health probe settings to the origin that is used to determine the health of the origin."
- }
- },
- "loadBalancingSettings": {
- "type": "object",
- "metadata": {
- "description": "Required. Load balancing settings for a backend pool."
- }
- },
- "sessionAffinityState": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to allow session affinity on this host."
- }
- },
- "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": {
- "type": "int",
- "defaultValue": 10,
- "metadata": {
- "description": "Optional. Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins."
- }
- },
- "origins": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Required. The list of origins within the origin group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/originGroups",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "properties": {
- "healthProbeSettings": "[if(not(empty(parameters('healthProbeSettings'))), parameters('healthProbeSettings'), null())]",
- "loadBalancingSettings": "[parameters('loadBalancingSettings')]",
- "sessionAffinityState": "[parameters('sessionAffinityState')]",
- "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": "[parameters('trafficRestorationTimeToHealedOrNewEndpointsInMinutes')]"
- }
- },
- {
- "copy": {
- "name": "origin",
- "count": "[length(parameters('origins'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-OriginGroup-Origin-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('origins')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "hostName": {
- "value": "[parameters('origins')[copyIndex()].hostName]"
- },
- "originGroupName": {
- "value": "[parameters('name')]"
- },
- "enabledState": "[if(contains(parameters('origins')[copyIndex()], 'enabledState'), createObject('value', parameters('origins')[copyIndex()].enabledState), createObject('value', 'Enabled'))]",
- "enforceCertificateNameCheck": "[if(contains(parameters('origins')[copyIndex()], 'enforceCertificateNameCheck'), createObject('value', parameters('origins')[copyIndex()].enforceCertificateNameCheck), createObject('value', true()))]",
- "httpPort": "[if(contains(parameters('origins')[copyIndex()], 'httpPort'), createObject('value', parameters('origins')[copyIndex()].httpPort), createObject('value', 80))]",
- "httpsPort": "[if(contains(parameters('origins')[copyIndex()], 'httpsPort'), createObject('value', parameters('origins')[copyIndex()].httpsPort), createObject('value', 443))]",
- "originHostHeader": "[if(contains(parameters('origins')[copyIndex()], 'originHostHeader'), createObject('value', parameters('origins')[copyIndex()].originHostHeader), createObject('value', parameters('origins')[copyIndex()].hostName))]",
- "priority": "[if(contains(parameters('origins')[copyIndex()], 'priority'), createObject('value', parameters('origins')[copyIndex()].priority), createObject('value', 1))]",
- "weight": "[if(contains(parameters('origins')[copyIndex()], 'weight'), createObject('value', parameters('origins')[copyIndex()].weight), createObject('value', 1000))]",
- "sharedPrivateLinkResource": "[if(contains(parameters('origins')[copyIndex()], 'sharedPrivateLinkResource'), createObject('value', parameters('origins')[copyIndex()].sharedPrivateLinkResource), createObject('value', null()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6315538909881747607"
- },
- "name": "CDN Profiles Origin",
- "description": "This module deploys a CDN Profile Origin.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origion."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "originGroupName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the group."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool."
- }
- },
- "enforceCertificateNameCheck": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether to enable certificate name check at origin level."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint."
- }
- },
- "httpPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. The value of the HTTP port. Must be between 1 and 65535."
- }
- },
- "httpsPort": {
- "type": "int",
- "defaultValue": 443,
- "metadata": {
- "description": "Optional. The value of the HTTPS port. Must be between 1 and 65535."
- }
- },
- "originHostHeader": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint."
- }
- },
- "priority": {
- "type": "int",
- "defaultValue": 1,
- "metadata": {
- "description": "Optional. Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5."
- }
- },
- "sharedPrivateLinkResource": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of the private link resource for private origin."
- }
- },
- "weight": {
- "type": "int",
- "defaultValue": 1000,
- "metadata": {
- "description": "Optional. Weight of the origin in given origin group for load balancing. Must be between 1 and 1000."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/originGroups/origins",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('originGroupName'), parameters('name'))]",
- "properties": {
- "enabledState": "[parameters('enabledState')]",
- "enforceCertificateNameCheck": "[parameters('enforceCertificateNameCheck')]",
- "hostName": "[parameters('hostName')]",
- "httpPort": "[parameters('httpPort')]",
- "httpsPort": "[parameters('httpsPort')]",
- "originHostHeader": "[parameters('originHostHeader')]",
- "priority": "[parameters('priority')]",
- "sharedPrivateLinkResource": "[if(not(empty(parameters('sharedPrivateLinkResource'))), parameters('sharedPrivateLinkResource'), null())]",
- "weight": "[parameters('weight')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the origin."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the origin."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/originGroups/origins', parameters('profileName'), parameters('originGroupName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the origin was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the origin group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the origin group."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the origin group was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Cdn/profiles', parameters('profileName')), '2023-05-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "profile"
- ]
- },
- "profile_ruleSet": {
- "copy": {
- "name": "profile_ruleSet",
- "count": "[length(parameters('ruleSets'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-RuleSet-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('ruleSets')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('name')]"
- },
- "rules": {
- "value": "[parameters('ruleSets')[copyIndex()].rules]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14060531422180532953"
- },
- "name": "CDN Profiles Rule Sets",
- "description": "This module deploys a CDN Profile rule set.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule set."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "rules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optinal. The rules to apply to the rule set."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/ruleSets",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]"
- },
- {
- "copy": {
- "name": "rule",
- "count": "[length(parameters('rules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RuleSet-Rule-{1}-{2}', uniqueString(deployment().name), parameters('rules')[copyIndex()].name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "ruleSetName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('rules')[copyIndex()].name]"
- },
- "order": {
- "value": "[parameters('rules')[copyIndex()].order]"
- },
- "actions": {
- "value": "[parameters('rules')[copyIndex()].actions]"
- },
- "conditions": "[if(contains(parameters('rules')[copyIndex()], 'conditions'), createObject('value', parameters('rules')[copyIndex()].conditions), createObject('value', createArray()))]",
- "matchProcessingBehavior": "[if(contains(parameters('rules')[copyIndex()], 'matchProcessingBehavior'), createObject('value', parameters('rules')[copyIndex()].matchProcessingBehavior), createObject('value', 'Continue'))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7170380293485699276"
- },
- "name": "CDN Profiles Rules",
- "description": "This module deploys a CDN Profile rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the profile."
- }
- },
- "ruleSetName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule set."
- }
- },
- "order": {
- "type": "int",
- "metadata": {
- "description": "Required. The order in which this rule will be applied. Rules with a lower order are applied before rules with a higher order."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of actions that are executed when all the conditions of a rule are satisfied."
- }
- },
- "conditions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of conditions that must be matched for the actions to be executed."
- }
- },
- "matchProcessingBehavior": {
- "type": "string",
- "allowedValues": [
- "Continue",
- "Stop"
- ],
- "metadata": {
- "description": "Required. If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/ruleSets/rules",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('ruleSetName'), parameters('name'))]",
- "properties": {
- "order": "[parameters('order')]",
- "actions": "[parameters('actions')]",
- "conditions": "[parameters('conditions')]",
- "matchProcessingBehavior": "[parameters('matchProcessingBehavior')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the rule."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/ruleSets/rules', parameters('profileName'), parameters('ruleSetName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the rule set."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the rule set."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/ruleSets', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "profile"
- ]
- },
- "profile_afdEndpoint": {
- "copy": {
- "name": "profile_afdEndpoint",
- "count": "[length(parameters('afdEndpoints'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-AfdEndpoint-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('afdEndpoints')[copyIndex()].name]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "profileName": {
- "value": "[parameters('name')]"
- },
- "autoGeneratedDomainNameLabelScope": "[if(contains(parameters('afdEndpoints')[copyIndex()], 'autoGeneratedDomainNameLabelScope'), createObject('value', parameters('afdEndpoints')[copyIndex()].autoGeneratedDomainNameLabelScope), createObject('value', 'TenantReuse'))]",
- "enabledState": "[if(contains(parameters('afdEndpoints')[copyIndex()], 'enabledState'), createObject('value', parameters('afdEndpoints')[copyIndex()].enabledState), createObject('value', 'Enabled'))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "routes": "[if(contains(parameters('afdEndpoints')[copyIndex()], 'routes'), createObject('value', parameters('afdEndpoints')[copyIndex()].routes), createObject('value', createArray()))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('afdEndpoints')[copyIndex()], 'tags'), parameters('tags'))]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10217508381442897285"
- },
- "name": "CDN Profiles AFD Endpoints",
- "description": "This module deploys a CDN Profile AFD Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AFD Endpoint."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location of the AFD Endpoint."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. The tags of the AFD Endpoint."
- }
- },
- "autoGeneratedDomainNameLabelScope": {
- "type": "string",
- "defaultValue": "TenantReuse",
- "allowedValues": [
- "NoReuse",
- "ResourceGroupReuse",
- "SubscriptionReuse",
- "TenantReuse"
- ],
- "metadata": {
- "description": "Optional. Indicates the endpoint name reuse scope. The default value is TenantReuse."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Indicates whether the AFD Endpoint is enabled. The default value is Enabled."
- }
- },
- "routes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of routes for this AFD Endpoint."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "profile": {
- "existing": true,
- "type": "Microsoft.Cdn/profiles",
- "apiVersion": "2023-05-01",
- "name": "[parameters('profileName')]"
- },
- "afd_endpoint": {
- "type": "Microsoft.Cdn/profiles/afdEndpoints",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "autoGeneratedDomainNameLabelScope": "[parameters('autoGeneratedDomainNameLabelScope')]",
- "enabledState": "[parameters('enabledState')]"
- },
- "dependsOn": [
- "profile"
- ]
- },
- "afd_endpoint_route": {
- "copy": {
- "name": "afd_endpoint_route",
- "count": "[length(parameters('routes'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Profile-AfdEndpoint-Route', uniqueString(deployment().name, parameters('routes')[copyIndex()].name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('routes')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "afdEndpointName": {
- "value": "[parameters('name')]"
- },
- "cacheConfiguration": "[if(contains(parameters('routes')[copyIndex()], 'cacheConfiguration'), createObject('value', parameters('routes')[copyIndex()].cacheConfiguration), createObject('value', null()))]",
- "customDomainName": "[if(contains(parameters('routes')[copyIndex()], 'customDomainName'), createObject('value', parameters('routes')[copyIndex()].customDomainName), createObject('value', ''))]",
- "enabledState": "[if(contains(parameters('routes')[copyIndex()], 'enabledState'), createObject('value', parameters('routes')[copyIndex()].enabledState), createObject('value', 'Enabled'))]",
- "forwardingProtocol": "[if(contains(parameters('routes')[copyIndex()], 'forwardingProtocol'), createObject('value', parameters('routes')[copyIndex()].forwardingProtocol), createObject('value', 'MatchRequest'))]",
- "httpsRedirect": "[if(contains(parameters('routes')[copyIndex()], 'httpsRedirect'), createObject('value', parameters('routes')[copyIndex()].httpsRedirect), createObject('value', 'Enabled'))]",
- "linkToDefaultDomain": "[if(contains(parameters('routes')[copyIndex()], 'linkToDefaultDomain'), createObject('value', parameters('routes')[copyIndex()].linkToDefaultDomain), createObject('value', 'Enabled'))]",
- "originGroupName": "[if(contains(parameters('routes')[copyIndex()], 'originGroupName'), createObject('value', parameters('routes')[copyIndex()].originGroupName), createObject('value', ''))]",
- "originPath": "[if(contains(parameters('routes')[copyIndex()], 'originPath'), createObject('value', parameters('routes')[copyIndex()].originPath), createObject('value', ''))]",
- "patternsToMatch": "[if(contains(parameters('routes')[copyIndex()], 'patternsToMatch'), createObject('value', parameters('routes')[copyIndex()].patternsToMatch), createObject('value', createArray()))]",
- "ruleSets": "[if(contains(parameters('routes')[copyIndex()], 'ruleSets'), createObject('value', parameters('routes')[copyIndex()].ruleSets), createObject('value', createArray()))]",
- "supportedProtocols": "[if(contains(parameters('routes')[copyIndex()], 'supportedProtocols'), createObject('value', parameters('routes')[copyIndex()].supportedProtocols), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6429015991033675991"
- },
- "name": "CDN Profiles AFD Endpoint Route",
- "description": "This module deploys a CDN Profile AFD Endpoint route.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the route."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent CDN profile."
- }
- },
- "afdEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AFD endpoint."
- }
- },
- "cacheConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object."
- }
- },
- "customDomainName": {
- "type": "string",
- "metadata": {
- "description": "Optional. The name of the custom domain. The custom domain must be defined in the profile customDomains."
- }
- },
- "forwardingProtocol": {
- "type": "string",
- "defaultValue": "MatchRequest",
- "allowedValues": [
- "HttpOnly",
- "HttpsOnly",
- "MatchRequest"
- ],
- "metadata": {
- "description": "Optional. The protocol this rule will use when forwarding traffic to backends."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether this route is enabled."
- }
- },
- "httpsRedirect": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to automatically redirect HTTP traffic to HTTPS traffic."
- }
- },
- "linkToDefaultDomain": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether this route will be linked to the default endpoint domain."
- }
- },
- "originGroupName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Required. The name of the origin group. The origin group must be defined in the profile originGroups."
- }
- },
- "originPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath."
- }
- },
- "patternsToMatch": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The route patterns of the rule."
- }
- },
- "ruleSets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The rule sets of the rule. The rule sets must be defined in the profile ruleSets."
- }
- },
- "supportedProtocols": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Http",
- "Https"
- ],
- "metadata": {
- "description": "Optional. The supported protocols of the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/afdEndpoints/routes",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('afdEndpointName'), parameters('name'))]",
- "properties": {
- "copy": [
- {
- "name": "ruleSets",
- "count": "[length(parameters('ruleSets'))]",
- "input": {
- "id": "[resourceId('Microsoft.Cdn/profiles/ruleSets', parameters('profileName'), parameters('ruleSets')[copyIndex('ruleSets')].name)]"
- }
- }
- ],
- "cacheConfiguration": "[if(not(empty(parameters('cacheConfiguration'))), parameters('cacheConfiguration'), null())]",
- "customDomains": "[if(not(empty(parameters('customDomainName'))), createArray(createObject('id', resourceId('Microsoft.Cdn/profiles/customDomains', parameters('profileName'), parameters('customDomainName')))), createArray())]",
- "enabledState": "[parameters('enabledState')]",
- "forwardingProtocol": "[parameters('forwardingProtocol')]",
- "httpsRedirect": "[parameters('httpsRedirect')]",
- "linkToDefaultDomain": "[parameters('linkToDefaultDomain')]",
- "originGroup": {
- "id": "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('originGroupName'))]"
- },
- "originPath": "[if(not(empty(parameters('originPath'))), parameters('originPath'), null())]",
- "patternsToMatch": "[parameters('patternsToMatch')]",
- "supportedProtocols": "[if(not(empty(parameters('supportedProtocols'))), parameters('supportedProtocols'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the route."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The ID of the route."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/afdEndpoints/routes', parameters('profileName'), parameters('afdEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the route was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "afd_endpoint",
- "profile"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the AFD Endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the AFD Endpoint."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/afdEndpoints', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the endpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('afd_endpoint', '2023-05-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "profile",
- "profile_custom_domain",
- "profile_origionGroup",
- "profile_ruleSet"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the CDN profile."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the CDN profile."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group where the CDN profile is deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "profileType": {
- "type": "string",
- "metadata": {
- "description": "The type of the CDN profile."
- },
- "value": "Microsoft.Cdn/profiles"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('profile', '2023-05-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/origingroup/README.md b/modules/cdn/profile/origingroup/README.md
deleted file mode 100644
index 7b01a13bb7..0000000000
--- a/modules/cdn/profile/origingroup/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# CDN Profiles Origin Group `[Microsoft.Cdn/profiles/originGroups]`
-
-This module deploys a CDN Profile Origin Group.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/originGroups` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/originGroups) |
-| `Microsoft.Cdn/profiles/originGroups/origins` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/originGroups/origins) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`loadBalancingSettings`](#parameter-loadbalancingsettings) | object | Load balancing settings for a backend pool. |
-| [`name`](#parameter-name) | string | The name of the origin group. |
-| [`origins`](#parameter-origins) | array | The list of origins within the origin group. |
-| [`profileName`](#parameter-profilename) | string | The name of the CDN profile. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`healthProbeSettings`](#parameter-healthprobesettings) | object | Health probe settings to the origin that is used to determine the health of the origin. |
-| [`sessionAffinityState`](#parameter-sessionaffinitystate) | string | Whether to allow session affinity on this host. |
-| [`trafficRestorationTimeToHealedOrNewEndpointsInMinutes`](#parameter-trafficrestorationtimetohealedornewendpointsinminutes) | int | Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. |
-
-### Parameter: `loadBalancingSettings`
-
-Load balancing settings for a backend pool.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-The name of the origin group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `origins`
-
-The list of origins within the origin group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `profileName`
-
-The name of the CDN profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `healthProbeSettings`
-
-Health probe settings to the origin that is used to determine the health of the origin.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `sessionAffinityState`
-
-Whether to allow session affinity on this host.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `trafficRestorationTimeToHealedOrNewEndpointsInMinutes`
-
-Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins.
-
-- Required: No
-- Type: int
-- Default: `10`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the origin group. |
-| `resourceGroupName` | string | The name of the resource group the origin group was created in. |
-| `resourceId` | string | The resource id of the origin group. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/origingroup/main.bicep b/modules/cdn/profile/origingroup/main.bicep
deleted file mode 100644
index e394dcb042..0000000000
--- a/modules/cdn/profile/origingroup/main.bicep
+++ /dev/null
@@ -1,91 +0,0 @@
-metadata name = 'CDN Profiles Origin Group'
-metadata description = 'This module deploys a CDN Profile Origin Group.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the origin group.')
-param name string
-
-@description('Required. The name of the CDN profile.')
-param profileName string
-
-@description('Optional. Health probe settings to the origin that is used to determine the health of the origin.')
-param healthProbeSettings object = {}
-
-@description('Required. Load balancing settings for a backend pool.')
-param loadBalancingSettings object
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether to allow session affinity on this host.')
-param sessionAffinityState string = 'Disabled'
-
-@description('Optional. Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins.')
-param trafficRestorationTimeToHealedOrNewEndpointsInMinutes int = 10
-
-@description('Required. The list of origins within the origin group.')
-param origins array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-}
-
-resource originGroup 'Microsoft.Cdn/profiles/originGroups@2023-05-01' = {
- name: name
- parent: profile
- properties: {
- healthProbeSettings: !empty(healthProbeSettings) ? healthProbeSettings : null
- loadBalancingSettings: loadBalancingSettings
- sessionAffinityState: sessionAffinityState
- trafficRestorationTimeToHealedOrNewEndpointsInMinutes: trafficRestorationTimeToHealedOrNewEndpointsInMinutes
- }
-}
-
-module origin 'origin/main.bicep' = [for (origion, index) in origins: {
- name: '${uniqueString(deployment().name)}-OriginGroup-Origin-${index}'
- params: {
- name: origion.name
- profileName: profileName
- hostName: origion.hostName
- originGroupName: originGroup.name
- enabledState: contains(origion, 'enabledState') ? origion.enabledState : 'Enabled'
- enforceCertificateNameCheck: contains(origion, 'enforceCertificateNameCheck') ? origion.enforceCertificateNameCheck : true
- httpPort: contains(origion, 'httpPort') ? origion.httpPort : 80
- httpsPort: contains(origion, 'httpsPort') ? origion.httpsPort : 443
- originHostHeader: contains(origion, 'originHostHeader') ? origion.originHostHeader : origion.hostName
- priority: contains(origion, 'priority') ? origion.priority : 1
- weight: contains(origion, 'weight') ? origion.weight : 1000
- sharedPrivateLinkResource: contains(origion, 'sharedPrivateLinkResource') ? origion.sharedPrivateLinkResource : null
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the origin group.')
-output name string = originGroup.name
-
-@description('The resource id of the origin group.')
-output resourceId string = originGroup.id
-
-@description('The name of the resource group the origin group was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = profile.location
diff --git a/modules/cdn/profile/origingroup/main.json b/modules/cdn/profile/origingroup/main.json
deleted file mode 100644
index 529935e7f3..0000000000
--- a/modules/cdn/profile/origingroup/main.json
+++ /dev/null
@@ -1,338 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5730470112775090005"
- },
- "name": "CDN Profiles Origin Group",
- "description": "This module deploys a CDN Profile Origin Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origin group."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "healthProbeSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Health probe settings to the origin that is used to determine the health of the origin."
- }
- },
- "loadBalancingSettings": {
- "type": "object",
- "metadata": {
- "description": "Required. Load balancing settings for a backend pool."
- }
- },
- "sessionAffinityState": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to allow session affinity on this host."
- }
- },
- "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": {
- "type": "int",
- "defaultValue": 10,
- "metadata": {
- "description": "Optional. Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins."
- }
- },
- "origins": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Required. The list of origins within the origin group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/originGroups",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "properties": {
- "healthProbeSettings": "[if(not(empty(parameters('healthProbeSettings'))), parameters('healthProbeSettings'), null())]",
- "loadBalancingSettings": "[parameters('loadBalancingSettings')]",
- "sessionAffinityState": "[parameters('sessionAffinityState')]",
- "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": "[parameters('trafficRestorationTimeToHealedOrNewEndpointsInMinutes')]"
- }
- },
- {
- "copy": {
- "name": "origin",
- "count": "[length(parameters('origins'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-OriginGroup-Origin-{1}', uniqueString(deployment().name), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('origins')[copyIndex()].name]"
- },
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "hostName": {
- "value": "[parameters('origins')[copyIndex()].hostName]"
- },
- "originGroupName": {
- "value": "[parameters('name')]"
- },
- "enabledState": "[if(contains(parameters('origins')[copyIndex()], 'enabledState'), createObject('value', parameters('origins')[copyIndex()].enabledState), createObject('value', 'Enabled'))]",
- "enforceCertificateNameCheck": "[if(contains(parameters('origins')[copyIndex()], 'enforceCertificateNameCheck'), createObject('value', parameters('origins')[copyIndex()].enforceCertificateNameCheck), createObject('value', true()))]",
- "httpPort": "[if(contains(parameters('origins')[copyIndex()], 'httpPort'), createObject('value', parameters('origins')[copyIndex()].httpPort), createObject('value', 80))]",
- "httpsPort": "[if(contains(parameters('origins')[copyIndex()], 'httpsPort'), createObject('value', parameters('origins')[copyIndex()].httpsPort), createObject('value', 443))]",
- "originHostHeader": "[if(contains(parameters('origins')[copyIndex()], 'originHostHeader'), createObject('value', parameters('origins')[copyIndex()].originHostHeader), createObject('value', parameters('origins')[copyIndex()].hostName))]",
- "priority": "[if(contains(parameters('origins')[copyIndex()], 'priority'), createObject('value', parameters('origins')[copyIndex()].priority), createObject('value', 1))]",
- "weight": "[if(contains(parameters('origins')[copyIndex()], 'weight'), createObject('value', parameters('origins')[copyIndex()].weight), createObject('value', 1000))]",
- "sharedPrivateLinkResource": "[if(contains(parameters('origins')[copyIndex()], 'sharedPrivateLinkResource'), createObject('value', parameters('origins')[copyIndex()].sharedPrivateLinkResource), createObject('value', null()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "6401260748375374430"
- },
- "name": "CDN Profiles Origin",
- "description": "This module deploys a CDN Profile Origin.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origion."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "originGroupName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the group."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool."
- }
- },
- "enforceCertificateNameCheck": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether to enable certificate name check at origin level."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint."
- }
- },
- "httpPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. The value of the HTTP port. Must be between 1 and 65535."
- }
- },
- "httpsPort": {
- "type": "int",
- "defaultValue": 443,
- "metadata": {
- "description": "Optional. The value of the HTTPS port. Must be between 1 and 65535."
- }
- },
- "originHostHeader": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint."
- }
- },
- "priority": {
- "type": "int",
- "defaultValue": 1,
- "metadata": {
- "description": "Optional. Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5."
- }
- },
- "sharedPrivateLinkResource": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of the private link resource for private origin."
- }
- },
- "weight": {
- "type": "int",
- "defaultValue": 1000,
- "metadata": {
- "description": "Optional. Weight of the origin in given origin group for load balancing. Must be between 1 and 1000."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/originGroups/origins",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('originGroupName'), parameters('name'))]",
- "properties": {
- "enabledState": "[parameters('enabledState')]",
- "enforceCertificateNameCheck": "[parameters('enforceCertificateNameCheck')]",
- "hostName": "[parameters('hostName')]",
- "httpPort": "[parameters('httpPort')]",
- "httpsPort": "[parameters('httpsPort')]",
- "originHostHeader": "[parameters('originHostHeader')]",
- "priority": "[parameters('priority')]",
- "sharedPrivateLinkResource": "[if(not(empty(parameters('sharedPrivateLinkResource'))), parameters('sharedPrivateLinkResource'), null())]",
- "weight": "[parameters('weight')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the origin."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the origin."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/originGroups/origins', parameters('profileName'), parameters('originGroupName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the origin was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the origin group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the origin group."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/originGroups', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the origin group was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.Cdn/profiles', parameters('profileName')), '2023-05-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/origingroup/origin/README.md b/modules/cdn/profile/origingroup/origin/README.md
deleted file mode 100644
index 50ca9fa71e..0000000000
--- a/modules/cdn/profile/origingroup/origin/README.md
+++ /dev/null
@@ -1,161 +0,0 @@
-# CDN Profiles Origin `[Microsoft.Cdn/profiles/originGroups/origins]`
-
-This module deploys a CDN Profile Origin.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/originGroups/origins` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/originGroups/origins) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`hostName`](#parameter-hostname) | string | The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. |
-| [`name`](#parameter-name) | string | The name of the origion. |
-| [`originGroupName`](#parameter-origingroupname) | string | The name of the group. |
-| [`profileName`](#parameter-profilename) | string | The name of the CDN profile. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enabledState`](#parameter-enabledstate) | string | Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. |
-| [`enforceCertificateNameCheck`](#parameter-enforcecertificatenamecheck) | bool | Whether to enable certificate name check at origin level. |
-| [`httpPort`](#parameter-httpport) | int | The value of the HTTP port. Must be between 1 and 65535. |
-| [`httpsPort`](#parameter-httpsport) | int | The value of the HTTPS port. Must be between 1 and 65535. |
-| [`originHostHeader`](#parameter-originhostheader) | string | The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. |
-| [`priority`](#parameter-priority) | int | Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. |
-| [`sharedPrivateLinkResource`](#parameter-sharedprivatelinkresource) | object | The properties of the private link resource for private origin. |
-| [`weight`](#parameter-weight) | int | Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. |
-
-### Parameter: `hostName`
-
-The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the origion.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `originGroupName`
-
-The name of the group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `profileName`
-
-The name of the CDN profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enabledState`
-
-Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `enforceCertificateNameCheck`
-
-Whether to enable certificate name check at origin level.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `httpPort`
-
-The value of the HTTP port. Must be between 1 and 65535.
-
-- Required: No
-- Type: int
-- Default: `80`
-
-### Parameter: `httpsPort`
-
-The value of the HTTPS port. Must be between 1 and 65535.
-
-- Required: No
-- Type: int
-- Default: `443`
-
-### Parameter: `originHostHeader`
-
-The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `priority`
-
-Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `sharedPrivateLinkResource`
-
-The properties of the private link resource for private origin.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `weight`
-
-Weight of the origin in given origin group for load balancing. Must be between 1 and 1000.
-
-- Required: No
-- Type: int
-- Default: `1000`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the origin. |
-| `resourceGroupName` | string | The name of the resource group the origin was created in. |
-| `resourceId` | string | The resource id of the origin. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/origingroup/origin/main.bicep b/modules/cdn/profile/origingroup/origin/main.bicep
deleted file mode 100644
index c93522b4cc..0000000000
--- a/modules/cdn/profile/origingroup/origin/main.bicep
+++ /dev/null
@@ -1,91 +0,0 @@
-metadata name = 'CDN Profiles Origin'
-metadata description = 'This module deploys a CDN Profile Origin.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the origion.')
-param name string
-
-@description('Required. The name of the CDN profile.')
-param profileName string
-
-@description('Required. The name of the group.')
-param originGroupName string
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.')
-param enabledState string = 'Enabled'
-
-@description('Optional. Whether to enable certificate name check at origin level.')
-param enforceCertificateNameCheck bool = true
-
-@description('Required. The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.')
-param hostName string
-
-@description('Optional. The value of the HTTP port. Must be between 1 and 65535.')
-param httpPort int = 80
-
-@description('Optional. The value of the HTTPS port. Must be between 1 and 65535.')
-param httpsPort int = 443
-
-@description('Optional. The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint.')
-param originHostHeader string = ''
-
-@description('Optional. Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5.')
-param priority int = 1
-
-@description('Optional. The properties of the private link resource for private origin.')
-param sharedPrivateLinkResource object = {}
-
-@description('Optional. Weight of the origin in given origin group for load balancing. Must be between 1 and 1000.')
-param weight int = 1000
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-
- resource originGroup 'originGroups@2023-05-01' existing = {
- name: originGroupName
- }
-}
-
-resource origin 'Microsoft.Cdn/profiles/originGroups/origins@2023-05-01' = {
- name: name
- parent: profile::originGroup
- properties: {
- enabledState: enabledState
- enforceCertificateNameCheck: enforceCertificateNameCheck
- hostName: hostName
- httpPort: httpPort
- httpsPort: httpsPort
- originHostHeader: originHostHeader
- priority: priority
- sharedPrivateLinkResource: !empty(sharedPrivateLinkResource) ? sharedPrivateLinkResource : null
- weight: weight
- }
-}
-
-@description('The name of the origin.')
-output name string = origin.name
-
-@description('The resource id of the origin.')
-output resourceId string = origin.id
-
-@description('The name of the resource group the origin was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cdn/profile/origingroup/origin/main.json b/modules/cdn/profile/origingroup/origin/main.json
deleted file mode 100644
index 4715abbae8..0000000000
--- a/modules/cdn/profile/origingroup/origin/main.json
+++ /dev/null
@@ -1,162 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "6401260748375374430"
- },
- "name": "CDN Profiles Origin",
- "description": "This module deploys a CDN Profile Origin.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the origion."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "originGroupName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the group."
- }
- },
- "enabledState": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool."
- }
- },
- "enforceCertificateNameCheck": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether to enable certificate name check at origin level."
- }
- },
- "hostName": {
- "type": "string",
- "metadata": {
- "description": "Required. The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint."
- }
- },
- "httpPort": {
- "type": "int",
- "defaultValue": 80,
- "metadata": {
- "description": "Optional. The value of the HTTP port. Must be between 1 and 65535."
- }
- },
- "httpsPort": {
- "type": "int",
- "defaultValue": 443,
- "metadata": {
- "description": "Optional. The value of the HTTPS port. Must be between 1 and 65535."
- }
- },
- "originHostHeader": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint."
- }
- },
- "priority": {
- "type": "int",
- "defaultValue": 1,
- "metadata": {
- "description": "Optional. Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5."
- }
- },
- "sharedPrivateLinkResource": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of the private link resource for private origin."
- }
- },
- "weight": {
- "type": "int",
- "defaultValue": 1000,
- "metadata": {
- "description": "Optional. Weight of the origin in given origin group for load balancing. Must be between 1 and 1000."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/originGroups/origins",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('originGroupName'), parameters('name'))]",
- "properties": {
- "enabledState": "[parameters('enabledState')]",
- "enforceCertificateNameCheck": "[parameters('enforceCertificateNameCheck')]",
- "hostName": "[parameters('hostName')]",
- "httpPort": "[parameters('httpPort')]",
- "httpsPort": "[parameters('httpsPort')]",
- "originHostHeader": "[parameters('originHostHeader')]",
- "priority": "[parameters('priority')]",
- "sharedPrivateLinkResource": "[if(not(empty(parameters('sharedPrivateLinkResource'))), parameters('sharedPrivateLinkResource'), null())]",
- "weight": "[parameters('weight')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the origin."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the origin."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/originGroups/origins', parameters('profileName'), parameters('originGroupName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the origin was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/origingroup/origin/version.json b/modules/cdn/profile/origingroup/origin/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/origingroup/origin/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/origingroup/version.json b/modules/cdn/profile/origingroup/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/origingroup/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/ruleset/README.md b/modules/cdn/profile/ruleset/README.md
deleted file mode 100644
index d42984d60e..0000000000
--- a/modules/cdn/profile/ruleset/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# CDN Profiles Rule Sets `[Microsoft.Cdn/profiles/ruleSets]`
-
-This module deploys a CDN Profile rule set.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/ruleSets` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/ruleSets) |
-| `Microsoft.Cdn/profiles/ruleSets/rules` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/ruleSets/rules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the rule set. |
-| [`profileName`](#parameter-profilename) | string | The name of the CDN profile. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-**Optinal parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`rules`](#parameter-rules) | array | The rules to apply to the rule set. |
-
-### Parameter: `name`
-
-The name of the rule set.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `profileName`
-
-The name of the CDN profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `rules`
-
-The rules to apply to the rule set.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the rule set. |
-| `resourceGroupName` | string | The name of the resource group the custom domain was created in. |
-| `resourceId` | string | The resource id of the rule set. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/ruleset/main.bicep b/modules/cdn/profile/ruleset/main.bicep
deleted file mode 100644
index 634a391120..0000000000
--- a/modules/cdn/profile/ruleset/main.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-metadata name = 'CDN Profiles Rule Sets'
-metadata description = 'This module deploys a CDN Profile rule set.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the rule set.')
-param name string
-
-@description('Required. The name of the CDN profile.')
-param profileName string
-
-@description('Optinal. The rules to apply to the rule set.')
-param rules array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-}
-
-resource rule_set 'Microsoft.Cdn/profiles/ruleSets@2023-05-01' = {
- name: name
- parent: profile
-}
-
-module rule 'rule/main.bicep' = [for (rule, index) in rules: {
- name: '${uniqueString(deployment().name)}-RuleSet-Rule-${rule.name}-${index}'
- params: {
- profileName: profileName
- ruleSetName: name
- name: rule.name
- order: rule.order
- actions: rule.actions
- conditions: contains(rule, 'conditions') ? rule.conditions : []
- matchProcessingBehavior: contains(rule, 'matchProcessingBehavior') ? rule.matchProcessingBehavior : 'Continue'
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the rule set.')
-output name string = rule_set.name
-
-@description('The resource id of the rule set.')
-output resourceId string = rule_set.id
-
-@description('The name of the resource group the custom domain was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cdn/profile/ruleset/main.json b/modules/cdn/profile/ruleset/main.json
deleted file mode 100644
index cfe7060568..0000000000
--- a/modules/cdn/profile/ruleset/main.json
+++ /dev/null
@@ -1,247 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2165712570349315066"
- },
- "name": "CDN Profiles Rule Sets",
- "description": "This module deploys a CDN Profile rule set.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule set."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the CDN profile."
- }
- },
- "rules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optinal. The rules to apply to the rule set."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/ruleSets",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]"
- },
- {
- "copy": {
- "name": "rule",
- "count": "[length(parameters('rules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-RuleSet-Rule-{1}-{2}', uniqueString(deployment().name), parameters('rules')[copyIndex()].name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "profileName": {
- "value": "[parameters('profileName')]"
- },
- "ruleSetName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('rules')[copyIndex()].name]"
- },
- "order": {
- "value": "[parameters('rules')[copyIndex()].order]"
- },
- "actions": {
- "value": "[parameters('rules')[copyIndex()].actions]"
- },
- "conditions": "[if(contains(parameters('rules')[copyIndex()], 'conditions'), createObject('value', parameters('rules')[copyIndex()].conditions), createObject('value', createArray()))]",
- "matchProcessingBehavior": "[if(contains(parameters('rules')[copyIndex()], 'matchProcessingBehavior'), createObject('value', parameters('rules')[copyIndex()].matchProcessingBehavior), createObject('value', 'Continue'))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17627422900186578144"
- },
- "name": "CDN Profiles Rules",
- "description": "This module deploys a CDN Profile rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the profile."
- }
- },
- "ruleSetName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule set."
- }
- },
- "order": {
- "type": "int",
- "metadata": {
- "description": "Required. The order in which this rule will be applied. Rules with a lower order are applied before rules with a higher order."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of actions that are executed when all the conditions of a rule are satisfied."
- }
- },
- "conditions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of conditions that must be matched for the actions to be executed."
- }
- },
- "matchProcessingBehavior": {
- "type": "string",
- "allowedValues": [
- "Continue",
- "Stop"
- ],
- "metadata": {
- "description": "Required. If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/ruleSets/rules",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('ruleSetName'), parameters('name'))]",
- "properties": {
- "order": "[parameters('order')]",
- "actions": "[parameters('actions')]",
- "conditions": "[parameters('conditions')]",
- "matchProcessingBehavior": "[parameters('matchProcessingBehavior')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the rule."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/ruleSets/rules', parameters('profileName'), parameters('ruleSetName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the rule set."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the rule set."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/ruleSets', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/ruleset/rule/README.md b/modules/cdn/profile/ruleset/rule/README.md
deleted file mode 100644
index 75419429db..0000000000
--- a/modules/cdn/profile/ruleset/rule/README.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# CDN Profiles Rules `[Microsoft.Cdn/profiles/ruleSets/rules]`
-
-This module deploys a CDN Profile rule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/ruleSets/rules` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/ruleSets/rules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`matchProcessingBehavior`](#parameter-matchprocessingbehavior) | string | If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. |
-| [`name`](#parameter-name) | string | The name of the rule. |
-| [`order`](#parameter-order) | int | The order in which this rule will be applied. Rules with a lower order are applied before rules with a higher order. |
-| [`profileName`](#parameter-profilename) | string | The name of the profile. |
-| [`ruleSetName`](#parameter-rulesetname) | string | The name of the rule set. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | A list of actions that are executed when all the conditions of a rule are satisfied. |
-| [`conditions`](#parameter-conditions) | array | A list of conditions that must be matched for the actions to be executed. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `matchProcessingBehavior`
-
-If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Continue'
- 'Stop'
- ]
- ```
-
-### Parameter: `name`
-
-The name of the rule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `order`
-
-The order in which this rule will be applied. Rules with a lower order are applied before rules with a higher order.
-
-- Required: Yes
-- Type: int
-
-### Parameter: `profileName`
-
-The name of the profile.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `ruleSetName`
-
-The name of the rule set.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actions`
-
-A list of actions that are executed when all the conditions of a rule are satisfied.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `conditions`
-
-A list of conditions that must be matched for the actions to be executed.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the rule. |
-| `resourceGroupName` | string | The name of the resource group the custom domain was created in. |
-| `resourceId` | string | The resource id of the rule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/ruleset/rule/main.bicep b/modules/cdn/profile/ruleset/rule/main.bicep
deleted file mode 100644
index ac839dd91a..0000000000
--- a/modules/cdn/profile/ruleset/rule/main.bicep
+++ /dev/null
@@ -1,71 +0,0 @@
-metadata name = 'CDN Profiles Rules'
-metadata description = 'This module deploys a CDN Profile rule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the rule.')
-param name string
-
-@description('Required. The name of the profile.')
-param profileName string
-
-@description('Required. The name of the rule set.')
-param ruleSetName string
-
-@description('Required. The order in which this rule will be applied. Rules with a lower order are applied before rules with a higher order.')
-param order int
-
-@description('Optional. A list of actions that are executed when all the conditions of a rule are satisfied.')
-param actions array = []
-
-@description('Optional. A list of conditions that must be matched for the actions to be executed.')
-param conditions array = []
-
-@allowed([
- 'Continue'
- 'Stop'
-])
-@description('Required. If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.')
-param matchProcessingBehavior string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-
- resource rule_set 'ruleSets@2023-05-01' existing = {
- name: ruleSetName
- }
-}
-
-resource rule_set_rule 'Microsoft.Cdn/profiles/ruleSets/rules@2023-05-01' = {
- name: name
- parent: profile::rule_set
- properties: {
- order: order
- actions: actions
- conditions: conditions
- matchProcessingBehavior: matchProcessingBehavior
- }
-}
-
-@description('The name of the rule.')
-output name string = rule_set_rule.name
-
-@description('The resource id of the rule.')
-output resourceId string = rule_set_rule.id
-
-@description('The name of the resource group the custom domain was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cdn/profile/ruleset/rule/main.json b/modules/cdn/profile/ruleset/rule/main.json
deleted file mode 100644
index bd8539a656..0000000000
--- a/modules/cdn/profile/ruleset/rule/main.json
+++ /dev/null
@@ -1,121 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17627422900186578144"
- },
- "name": "CDN Profiles Rules",
- "description": "This module deploys a CDN Profile rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the profile."
- }
- },
- "ruleSetName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the rule set."
- }
- },
- "order": {
- "type": "int",
- "metadata": {
- "description": "Required. The order in which this rule will be applied. Rules with a lower order are applied before rules with a higher order."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of actions that are executed when all the conditions of a rule are satisfied."
- }
- },
- "conditions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of conditions that must be matched for the actions to be executed."
- }
- },
- "matchProcessingBehavior": {
- "type": "string",
- "allowedValues": [
- "Continue",
- "Stop"
- ],
- "metadata": {
- "description": "Required. If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/ruleSets/rules",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}/{2}', parameters('profileName'), parameters('ruleSetName'), parameters('name'))]",
- "properties": {
- "order": "[parameters('order')]",
- "actions": "[parameters('actions')]",
- "conditions": "[parameters('conditions')]",
- "matchProcessingBehavior": "[parameters('matchProcessingBehavior')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource id of the rule."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/ruleSets/rules', parameters('profileName'), parameters('ruleSetName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the custom domain was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/ruleset/rule/version.json b/modules/cdn/profile/ruleset/rule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/ruleset/rule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/ruleset/version.json b/modules/cdn/profile/ruleset/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/ruleset/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/secret/README.md b/modules/cdn/profile/secret/README.md
deleted file mode 100644
index b1b08a4d45..0000000000
--- a/modules/cdn/profile/secret/README.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# CDN Profiles Secret `[Microsoft.Cdn/profiles/secrets]`
-
-This module deploys a CDN Profile Secret.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Cdn/profiles/secrets` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/secrets) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the secrect. |
-| [`type`](#parameter-type) | string | The type of the secrect. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`profileName`](#parameter-profilename) | string | The name of the parent CDN profile. Required if the template is used in a standalone deployment. |
-| [`secretSourceResourceId`](#parameter-secretsourceresourceid) | string | The resource ID of the secrect source. Required if the type is CustomerCertificate. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`secretVersion`](#parameter-secretversion) | string | The version of the secret. |
-| [`subjectAlternativeNames`](#parameter-subjectalternativenames) | array | The subject alternative names of the secrect. |
-| [`useLatestVersion`](#parameter-uselatestversion) | bool | Indicates whether to use the latest version of the secrect. |
-
-### Parameter: `name`
-
-The name of the secrect.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `type`
-
-The type of the secrect.
-
-- Required: No
-- Type: string
-- Default: `'AzureFirstPartyManagedCertificate'`
-- Allowed:
- ```Bicep
- [
- 'AzureFirstPartyManagedCertificate'
- 'CustomerCertificate'
- 'ManagedCertificate'
- 'UrlSigningKey'
- ]
- ```
-
-### Parameter: `profileName`
-
-The name of the parent CDN profile. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `secretSourceResourceId`
-
-The resource ID of the secrect source. Required if the type is CustomerCertificate.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `secretVersion`
-
-The version of the secret.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `subjectAlternativeNames`
-
-The subject alternative names of the secrect.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `useLatestVersion`
-
-Indicates whether to use the latest version of the secrect.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the secrect. |
-| `resourceGroupName` | string | The name of the resource group the secret was created in. |
-| `resourceId` | string | The resource ID of the secrect. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/cdn/profile/secret/main.bicep b/modules/cdn/profile/secret/main.bicep
deleted file mode 100644
index b4ea189c45..0000000000
--- a/modules/cdn/profile/secret/main.bicep
+++ /dev/null
@@ -1,74 +0,0 @@
-metadata name = 'CDN Profiles Secret'
-metadata description = 'This module deploys a CDN Profile Secret.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the secrect.')
-param name string
-
-@description('Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment.')
-param profileName string
-
-@allowed([
- 'AzureFirstPartyManagedCertificate'
- 'CustomerCertificate'
- 'ManagedCertificate'
- 'UrlSigningKey'
-])
-@description('Required. The type of the secrect.')
-param type string = 'AzureFirstPartyManagedCertificate'
-
-@description('Conditional. The resource ID of the secrect source. Required if the type is CustomerCertificate.')
-param secretSourceResourceId string = ''
-
-@description('Optional. The version of the secret.')
-param secretVersion string = ''
-
-@description('Optional. The subject alternative names of the secrect.')
-param subjectAlternativeNames array = []
-
-@description('Optional. Indicates whether to use the latest version of the secrect.')
-param useLatestVersion bool = false
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource profile 'Microsoft.Cdn/profiles@2023-05-01' existing = {
- name: profileName
-}
-
-resource profile_secrect 'Microsoft.Cdn/profiles/secrets@2023-05-01' = {
- name: name
- parent: profile
- properties: {
- parameters: (type == 'CustomerCertificate') ? {
- type: type
- secretSource: {
- id: secretSourceResourceId
- }
- secretVersion: secretVersion
- subjectAlternativeNames: subjectAlternativeNames
- useLatestVersion: useLatestVersion
- } : null
- }
-}
-
-@description('The name of the secrect.')
-output name string = profile_secrect.name
-
-@description('The resource ID of the secrect.')
-output resourceId string = profile_secrect.id
-
-@description('The name of the resource group the secret was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/cdn/profile/secret/main.json b/modules/cdn/profile/secret/main.json
deleted file mode 100644
index b285eceb11..0000000000
--- a/modules/cdn/profile/secret/main.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10634340039151667854"
- },
- "name": "CDN Profiles Secret",
- "description": "This module deploys a CDN Profile Secret.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the secrect."
- }
- },
- "profileName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent CDN profile. Required if the template is used in a standalone deployment."
- }
- },
- "type": {
- "type": "string",
- "defaultValue": "AzureFirstPartyManagedCertificate",
- "allowedValues": [
- "AzureFirstPartyManagedCertificate",
- "CustomerCertificate",
- "ManagedCertificate",
- "UrlSigningKey"
- ],
- "metadata": {
- "description": "Required. The type of the secrect."
- }
- },
- "secretSourceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The resource ID of the secrect source. Required if the type is CustomerCertificate."
- }
- },
- "secretVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The version of the secret."
- }
- },
- "subjectAlternativeNames": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The subject alternative names of the secrect."
- }
- },
- "useLatestVersion": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether to use the latest version of the secrect."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Cdn/profiles/secrets",
- "apiVersion": "2023-05-01",
- "name": "[format('{0}/{1}', parameters('profileName'), parameters('name'))]",
- "properties": {
- "parameters": "[if(equals(parameters('type'), 'CustomerCertificate'), createObject('type', parameters('type'), 'secretSource', createObject('id', parameters('secretSourceResourceId')), 'secretVersion', parameters('secretVersion'), 'subjectAlternativeNames', parameters('subjectAlternativeNames'), 'useLatestVersion', parameters('useLatestVersion')), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the secrect."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the secrect."
- },
- "value": "[resourceId('Microsoft.Cdn/profiles/secrets', parameters('profileName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the secret was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cdn/profile/secret/version.json b/modules/cdn/profile/secret/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/secret/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cdn/profile/tests/e2e/afd/dependencies.bicep b/modules/cdn/profile/tests/e2e/afd/dependencies.bicep
deleted file mode 100644
index 48a1bc4be0..0000000000
--- a/modules/cdn/profile/tests/e2e/afd/dependencies.bicep
+++ /dev/null
@@ -1,38 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
- properties: {
- allowBlobPublicAccess: false
- networkAcls: {
- defaultAction: 'Deny'
- bypass: 'AzureServices'
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the created Storage Account.')
-output storageAccountName string = storageAccount.name
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/cdn/profile/tests/e2e/afd/main.test.bicep b/modules/cdn/profile/tests/e2e/afd/main.test.bicep
deleted file mode 100644
index e9e3864bf9..0000000000
--- a/modules/cdn/profile/tests/e2e/afd/main.test.bicep
+++ /dev/null
@@ -1,142 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cdn.profiles-${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 = 'cdnpafd'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}cdnstore${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: 'dep-${namePrefix}-test-${serviceShort}'
- location: 'global'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- originResponseTimeoutSeconds: 60
- sku: 'Standard_AzureFrontDoor'
- enableDefaultTelemetry: enableDefaultTelemetry
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- customDomains: [
- {
- name: 'dep-${namePrefix}-test-${serviceShort}-custom-domain'
- hostName: 'dep-${namePrefix}-test-${serviceShort}-custom-domain.azurewebsites.net'
- certificateType: 'ManagedCertificate'
- }
- ]
- origionGroups: [
- {
- name: 'dep-${namePrefix}-test-${serviceShort}-origin-group'
- loadBalancingSettings: {
- additionalLatencyInMilliseconds: 50
- sampleSize: 4
- successfulSamplesRequired: 3
- }
- origins: [
- {
- name: 'dep-${namePrefix}-test-${serviceShort}-origin'
- hostName: 'dep-${namePrefix}-test-${serviceShort}-origin.azurewebsites.net'
- }
- ]
- }
- ]
- ruleSets: [
- {
- name: 'dep${namePrefix}test${serviceShort}ruleset'
- rules: [
- {
- name: 'dep${namePrefix}test${serviceShort}rule'
- order: 1
- actions: [
- {
- name: 'UrlRedirect'
- parameters: {
- typeName: 'DeliveryRuleUrlRedirectActionParameters'
- redirectType: 'PermanentRedirect'
- destinationProtocol: 'Https'
- customPath: '/test123'
- customHostname: 'dev-etradefd.trade.azure.defra.cloud'
- }
- }
- ]
- }
- ]
- }
- ]
- afdEndpoints: [
- {
- name: 'dep-${namePrefix}-test-${serviceShort}-afd-endpoint'
- routes: [
- {
- name: 'dep-${namePrefix}-test-${serviceShort}-afd-route'
- originGroupName: 'dep-${namePrefix}-test-${serviceShort}-origin-group'
- customDomainName: 'dep-${namePrefix}-test-${serviceShort}-custom-domain'
- ruleSets: [
- {
- name: 'dep${namePrefix}test${serviceShort}ruleset'
- }
- ]
- }
- ]
- }
- ]
- }
-}]
diff --git a/modules/cdn/profile/tests/e2e/max/dependencies.bicep b/modules/cdn/profile/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 7ca387035b..0000000000
--- a/modules/cdn/profile/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,38 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
- properties: {
- allowBlobPublicAccess: false
- networkAcls: {
- defaultAction: 'Deny'
- bypass: 'AzureServices'
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the created Storage Account.')
-output storageAccountName string = storageAccount.name
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/cdn/profile/tests/e2e/max/main.test.bicep b/modules/cdn/profile/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 85bf8f601d..0000000000
--- a/modules/cdn/profile/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,112 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cdn.profiles-${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 = 'cdnpmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}cdnstore${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: 'dep-${namePrefix}-test-${serviceShort}'
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- originResponseTimeoutSeconds: 60
- sku: 'Standard_Verizon'
- enableDefaultTelemetry: enableDefaultTelemetry
- endpointProperties: {
- originHostHeader: '${nestedDependencies.outputs.storageAccountName}.blob.${environment().suffixes.storage}'
- contentTypesToCompress: [
- 'text/plain'
- 'text/html'
- 'text/css'
- 'text/javascript'
- 'application/x-javascript'
- 'application/javascript'
- 'application/json'
- 'application/xml'
- ]
- isCompressionEnabled: true
- isHttpAllowed: true
- isHttpsAllowed: true
- queryStringCachingBehavior: 'IgnoreQueryString'
- origins: [
- {
- name: 'dep-${namePrefix}-cdn-endpoint01'
- properties: {
- hostName: '${nestedDependencies.outputs.storageAccountName}.blob.${environment().suffixes.storage}'
- httpPort: 80
- httpsPort: 443
- enabled: true
- }
- }
- ]
- originGroups: []
- geoFilters: []
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- }
-}]
diff --git a/modules/cdn/profile/tests/e2e/waf-aligned/dependencies.bicep b/modules/cdn/profile/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 7ca387035b..0000000000
--- a/modules/cdn/profile/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,38 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
- properties: {
- allowBlobPublicAccess: false
- networkAcls: {
- defaultAction: 'Deny'
- bypass: 'AzureServices'
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the created Storage Account.')
-output storageAccountName string = storageAccount.name
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/cdn/profile/tests/e2e/waf-aligned/main.test.bicep b/modules/cdn/profile/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index af0c232249..0000000000
--- a/modules/cdn/profile/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,95 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cdn.profiles-${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 = 'cdnpwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}cdnstore${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: 'dep-${namePrefix}-test-${serviceShort}'
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- originResponseTimeoutSeconds: 60
- sku: 'Standard_Verizon'
- enableDefaultTelemetry: enableDefaultTelemetry
- endpointProperties: {
- originHostHeader: '${nestedDependencies.outputs.storageAccountName}.blob.${environment().suffixes.storage}'
- contentTypesToCompress: [
- 'text/plain'
- 'text/html'
- 'text/css'
- 'text/javascript'
- 'application/x-javascript'
- 'application/javascript'
- 'application/json'
- 'application/xml'
- ]
- isCompressionEnabled: true
- isHttpAllowed: true
- isHttpsAllowed: true
- queryStringCachingBehavior: 'IgnoreQueryString'
- origins: [
- {
- name: 'dep-${namePrefix}-cdn-endpoint01'
- properties: {
- hostName: '${nestedDependencies.outputs.storageAccountName}.blob.${environment().suffixes.storage}'
- httpPort: 80
- httpsPort: 443
- enabled: true
- }
- }
- ]
- originGroups: []
- geoFilters: []
- }
- }
-}]
diff --git a/modules/cdn/profile/version.json b/modules/cdn/profile/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/cdn/profile/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/cognitive-services/account/MOVED-TO-AVM.md b/modules/cognitive-services/account/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/cognitive-services/account/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/cognitive-services/account/README.md b/modules/cognitive-services/account/README.md
index fdc4c529e8..b7625ef33a 100644
--- a/modules/cognitive-services/account/README.md
+++ b/modules/cognitive-services/account/README.md
@@ -1,1471 +1,7 @@
-# Cognitive Services `[Microsoft.CognitiveServices/accounts]`
+
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _Speech_
-
-
-
-
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-kind) | string | Kind of the Cognitive Services. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region. |
-| [`name`](#parameter-name) | string | The name of Cognitive Services account. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`cMKKeyVaultResourceId`](#parameter-cmkkeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. Required if 'cMKKeyName' is not empty. |
-| [`cMKUserAssignedIdentityResourceId`](#parameter-cmkuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if 'cMKKeyName' is not empty. |
-| [`customSubDomainName`](#parameter-customsubdomainname) | string | Subdomain name used for token-based authentication. Required if 'networkAcls' or 'privateEndpoints' are set. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`allowedFqdnList`](#parameter-allowedfqdnlist) | array | List of allowed FQDN. |
-| [`apiProperties`](#parameter-apiproperties) | object | The API properties for special APIs. |
-| [`cMKKeyName`](#parameter-cmkkeyname) | string | The name of the customer managed key to use for encryption. Cannot be deployed together with the parameter 'systemAssignedIdentity' enabled. |
-| [`cMKKeyVersion`](#parameter-cmkkeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, latest is used. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableLocalAuth`](#parameter-disablelocalauth) | bool | Allow only Azure AD authentication. Should be enabled for security reasons. |
-| [`dynamicThrottlingEnabled`](#parameter-dynamicthrottlingenabled) | bool | The flag to enable dynamic throttling. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`migrationToken`](#parameter-migrationtoken) | string | Resource migration token. |
-| [`networkAcls`](#parameter-networkacls) | object | A collection of rules governing the accessibility from specific network locations. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set. |
-| [`restore`](#parameter-restore) | bool | Restore a soft-deleted cognitive service at deployment time. Will fail if no such soft-deleted resource exists. |
-| [`restrictOutboundNetworkAccess`](#parameter-restrictoutboundnetworkaccess) | bool | Restrict outbound network access. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`sku`](#parameter-sku) | string | SKU of the Cognitive Services resource. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`userOwnedStorage`](#parameter-userownedstorage) | array | The storage accounts for this resource. |
-
-### Parameter: `kind`
-
-Kind of the Cognitive Services. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AnomalyDetector'
- 'Bing.Autosuggest.v7'
- 'Bing.CustomSearch'
- 'Bing.EntitySearch'
- 'Bing.Search.v7'
- 'Bing.SpellCheck.v7'
- 'CognitiveServices'
- 'ComputerVision'
- 'ContentModerator'
- 'CustomVision.Prediction'
- 'CustomVision.Training'
- 'Face'
- 'FormRecognizer'
- 'ImmersiveReader'
- 'Internal.AllInOne'
- 'LUIS'
- 'LUIS.Authoring'
- 'Personalizer'
- 'QnAMaker'
- 'SpeechServices'
- 'TextAnalytics'
- 'TextTranslation'
- ]
- ```
-
-### Parameter: `name`
-
-The name of Cognitive Services account.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `cMKKeyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from. Required if 'cMKKeyName' is not empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `cMKUserAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if 'cMKKeyName' is not empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `customSubDomainName`
-
-Subdomain name used for token-based authentication. Required if 'networkAcls' or 'privateEndpoints' are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `allowedFqdnList`
-
-List of allowed FQDN.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `apiProperties`
-
-The API properties for special APIs.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `cMKKeyName`
-
-The name of the customer managed key to use for encryption. Cannot be deployed together with the parameter 'systemAssignedIdentity' enabled.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `cMKKeyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, latest is used.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableLocalAuth`
-
-Allow only Azure AD authentication. Should be enabled for security reasons.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `dynamicThrottlingEnabled`
-
-The flag to enable dynamic throttling.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption.
-
-- Required: No
-- Type: array
-
-### Parameter: `migrationToken`
-
-Resource migration token.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `networkAcls`
-
-A collection of rules governing the accessibility from specific network locations.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `restore`
-
-Restore a soft-deleted cognitive service at deployment time. Will fail if no such soft-deleted resource exists.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `restrictOutboundNetworkAccess`
-
-Restrict outbound network access.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `sku`
-
-SKU of the Cognitive Services resource. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region.
-
-- Required: No
-- Type: string
-- Default: `'S0'`
-- Allowed:
- ```Bicep
- [
- 'C2'
- 'C3'
- 'C4'
- 'F0'
- 'F1'
- 'S'
- 'S0'
- 'S1'
- 'S10'
- 'S2'
- 'S3'
- 'S4'
- 'S5'
- 'S6'
- 'S7'
- 'S8'
- 'S9'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `userOwnedStorage`
-
-The storage accounts for this resource.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `endpoint` | string | The service endpoint of the cognitive services account. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the cognitive services account. |
-| `resourceGroupName` | string | The resource group the cognitive services account was deployed into. |
-| `resourceId` | string | The resource ID of the cognitive services account. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
-
-## Notes
-
-Not all combinations of parameters `kind` and `SKU` are valid and they may vary in different Azure Regions. Please use PowerShell cmdlet `Get-AzCognitiveServicesAccountSku` or another methods to determine valid values in your region.
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/cognitive-services/account/main.bicep b/modules/cognitive-services/account/main.bicep
deleted file mode 100644
index be906d33de..0000000000
--- a/modules/cognitive-services/account/main.bicep
+++ /dev/null
@@ -1,473 +0,0 @@
-metadata name = 'Cognitive Services'
-metadata description = 'This module deploys a Cognitive Service.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of Cognitive Services account.')
-param name string
-
-@description('Required. Kind of the Cognitive Services. Use \'Get-AzCognitiveServicesAccountSku\' to determine a valid combinations of \'kind\' and \'SKU\' for your Azure region.')
-@allowed([
- 'AnomalyDetector'
- 'Bing.Autosuggest.v7'
- 'Bing.CustomSearch'
- 'Bing.EntitySearch'
- 'Bing.Search.v7'
- 'Bing.SpellCheck.v7'
- 'CognitiveServices'
- 'ComputerVision'
- 'ContentModerator'
- 'CustomVision.Prediction'
- 'CustomVision.Training'
- 'Face'
- 'FormRecognizer'
- 'ImmersiveReader'
- 'Internal.AllInOne'
- 'LUIS'
- 'LUIS.Authoring'
- 'Personalizer'
- 'QnAMaker'
- 'SpeechServices'
- 'TextAnalytics'
- 'TextTranslation'
-])
-param kind string
-
-@description('Optional. SKU of the Cognitive Services resource. Use \'Get-AzCognitiveServicesAccountSku\' to determine a valid combinations of \'kind\' and \'SKU\' for your Azure region.')
-@allowed([
- 'C2'
- 'C3'
- 'C4'
- 'F0'
- 'F1'
- 'S'
- 'S0'
- 'S1'
- 'S10'
- 'S2'
- 'S3'
- 'S4'
- 'S5'
- 'S6'
- 'S7'
- 'S8'
- 'S9'
-])
-param sku string = 'S0'
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Conditional. Subdomain name used for token-based authentication. Required if \'networkAcls\' or \'privateEndpoints\' are set.')
-param customSubDomainName string = ''
-
-@description('Optional. A collection of rules governing the accessibility from specific network locations.')
-param networkAcls object = {}
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. List of allowed FQDN.')
-param allowedFqdnList array = []
-
-@description('Optional. The API properties for special APIs.')
-param apiProperties object = {}
-
-@description('Optional. Allow only Azure AD authentication. Should be enabled for security reasons.')
-param disableLocalAuth bool = true
-
-@description('Conditional. The resource ID of a key vault to reference a customer managed key for encryption from. Required if \'cMKKeyName\' is not empty.')
-param cMKKeyVaultResourceId string = ''
-
-@description('Optional. The name of the customer managed key to use for encryption. Cannot be deployed together with the parameter \'systemAssignedIdentity\' enabled.')
-param cMKKeyName string = ''
-
-@description('Conditional. User assigned identity to use when fetching the customer managed key. Required if \'cMKKeyName\' is not empty.')
-param cMKUserAssignedIdentityResourceId string = ''
-
-@description('Optional. The version of the customer managed key to reference for encryption. If not provided, latest is used.')
-param cMKKeyVersion string = ''
-
-@description('Optional. The flag to enable dynamic throttling.')
-param dynamicThrottlingEnabled bool = false
-
-@description('Optional. Resource migration token.')
-param migrationToken string = ''
-
-@description('Optional. Restore a soft-deleted cognitive service at deployment time. Will fail if no such soft-deleted resource exists.')
-param restore bool = false
-
-@description('Optional. Restrict outbound network access.')
-param restrictOutboundNetworkAccess bool = true
-
-@description('Optional. The storage accounts for this resource.')
-param userOwnedStorage array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- 'Cognitive Services Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '25fbc0a9-bd7c-42a3-aa1a-3b75d497ee68')
- 'Cognitive Services Custom Vision Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c1ff6cc2-c111-46fe-8896-e0ef812ad9f3')
- 'Cognitive Services Custom Vision Deployment': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5c4089e1-6d96-4d2f-b296-c1bc7137275f')
- 'Cognitive Services Custom Vision Labeler': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '88424f51-ebe7-446f-bc41-7fa16989e96c')
- 'Cognitive Services Custom Vision Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '93586559-c37d-4a6b-ba08-b9f0940c2d73')
- 'Cognitive Services Custom Vision Trainer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a5ae4ab-0d65-4eeb-be61-29fc9b54394b')
- 'Cognitive Services Data Reader (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b59867f0-fa02-499b-be73-45a86b5b3e1c')
- 'Cognitive Services Face Recognizer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9894cab4-e18a-44aa-828b-cb588cd6f2d7')
- 'Cognitive Services Immersive Reader User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b2de6794-95db-4659-8781-7e080d3f2b9d')
- 'Cognitive Services Language Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f07febfe-79bc-46b1-8b37-790e26e6e498')
- 'Cognitive Services Language Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7628b7b8-a8b2-4cdc-b46f-e9b35248918e')
- 'Cognitive Services Language Writer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f2310ca1-dc64-4889-bb49-c8e0fa3d47a8')
- 'Cognitive Services LUIS Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f72c8140-2111-481c-87ff-72b910f6e3f8')
- 'Cognitive Services LUIS Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18e81cdc-4e98-4e29-a639-e7d10c5a6226')
- 'Cognitive Services LUIS Writer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '6322a993-d5c9-4bed-b113-e49bbea25b27')
- 'Cognitive Services Metrics Advisor Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'cb43c632-a144-4ec5-977c-e80c4affc34a')
- 'Cognitive Services Metrics Advisor User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3b20f47b-3825-43cb-8114-4bd2201156a8')
- 'Cognitive Services OpenAI Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442')
- 'Cognitive Services OpenAI User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd')
- 'Cognitive Services QnA Maker Editor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f4cc2bf9-21be-47a1-bdf1-5c5804381025')
- 'Cognitive Services QnA Maker Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '466ccd10-b268-4a11-b098-b4849f024126')
- 'Cognitive Services Speech Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0e75ca1e-0464-4b4d-8b93-68208a576181')
- 'Cognitive Services Speech User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f2dc8367-1007-4938-bd23-fe263f013447')
- 'Cognitive Services User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a97b65f3-24c7-4388-baec-2e87135dc908')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId)) {
- name: last(split((!empty(cMKKeyVaultResourceId) ? cMKKeyVaultResourceId : 'dummyVault'), '/'))!
- scope: resourceGroup(split((!empty(cMKKeyVaultResourceId) ? cMKKeyVaultResourceId : '//'), '/')[2], split((!empty(cMKKeyVaultResourceId) ? cMKKeyVaultResourceId : '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(cMKKeyName)) {
- name: !empty(cMKKeyName) ? cMKKeyName : 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(cMKUserAssignedIdentityResourceId)) {
- name: last(split((!empty(cMKUserAssignedIdentityResourceId) ? cMKUserAssignedIdentityResourceId : 'dummyMsi'), '/'))!
- scope: resourceGroup(split((!empty(cMKUserAssignedIdentityResourceId) ? cMKUserAssignedIdentityResourceId : '//'), '/')[2], split((!empty(cMKUserAssignedIdentityResourceId) ? cMKUserAssignedIdentityResourceId : '////'), '/')[4])
-}
-
-resource cognitiveServices 'Microsoft.CognitiveServices/accounts@2022-12-01' = {
- name: name
- kind: kind
- identity: identity
- location: location
- tags: tags
- sku: {
- name: sku
- }
- properties: {
- customSubDomainName: !empty(customSubDomainName) ? customSubDomainName : null
- networkAcls: !empty(networkAcls) ? {
- defaultAction: contains(networkAcls, 'defaultAction') ? networkAcls.defaultAction : null
- virtualNetworkRules: contains(networkAcls, 'virtualNetworkRules') ? networkAcls.virtualNetworkRules : []
- ipRules: contains(networkAcls, 'ipRules') ? networkAcls.ipRules : []
- } : null
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) && empty(networkAcls) ? 'Disabled' : null)
- allowedFqdnList: allowedFqdnList
- apiProperties: apiProperties
- disableLocalAuth: disableLocalAuth
- encryption: !empty(cMKKeyName) ? {
- keySource: 'Microsoft.KeyVault'
- keyVaultProperties: {
- identityClientId: cMKUserAssignedIdentity.properties.clientId
- keyVaultUri: cMKKeyVault.properties.vaultUri
- keyName: cMKKeyName
- keyVersion: !empty(cMKKeyVersion) ? cMKKeyVersion : last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- }
- } : null
- migrationToken: !empty(migrationToken) ? migrationToken : null
- restore: restore
- restrictOutboundNetworkAccess: restrictOutboundNetworkAccess
- userOwnedStorage: !empty(userOwnedStorage) ? userOwnedStorage : null
- dynamicThrottlingEnabled: dynamicThrottlingEnabled
- }
-}
-
-resource cognitiveServices_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: cognitiveServices
-}
-
-resource cognitiveServices_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: cognitiveServices
-}]
-
-module cognitiveServices_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-cognitiveServices-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'account'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(cognitiveServices.id, '/'))}-${privateEndpoint.?service ?? 'account'}-${index}'
- serviceResourceId: cognitiveServices.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource cognitiveServices_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(cognitiveServices.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: cognitiveServices
-}]
-
-@description('The name of the cognitive services account.')
-output name string = cognitiveServices.name
-
-@description('The resource ID of the cognitive services account.')
-output resourceId string = cognitiveServices.id
-
-@description('The resource group the cognitive services account was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The service endpoint of the cognitive services account.')
-output endpoint string = cognitiveServices.properties.endpoint
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(cognitiveServices.identity, 'principalId') ? cognitiveServices.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = cognitiveServices.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/cognitive-services/account/main.json b/modules/cognitive-services/account/main.json
deleted file mode 100644
index ec1c5362ac..0000000000
--- a/modules/cognitive-services/account/main.json
+++ /dev/null
@@ -1,1468 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7313430754429497718"
- },
- "name": "Cognitive Services",
- "description": "This module deploys a Cognitive Service.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of Cognitive Services account."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "AnomalyDetector",
- "Bing.Autosuggest.v7",
- "Bing.CustomSearch",
- "Bing.EntitySearch",
- "Bing.Search.v7",
- "Bing.SpellCheck.v7",
- "CognitiveServices",
- "ComputerVision",
- "ContentModerator",
- "CustomVision.Prediction",
- "CustomVision.Training",
- "Face",
- "FormRecognizer",
- "ImmersiveReader",
- "Internal.AllInOne",
- "LUIS",
- "LUIS.Authoring",
- "Personalizer",
- "QnAMaker",
- "SpeechServices",
- "TextAnalytics",
- "TextTranslation"
- ],
- "metadata": {
- "description": "Required. Kind of the Cognitive Services. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region."
- }
- },
- "sku": {
- "type": "string",
- "defaultValue": "S0",
- "allowedValues": [
- "C2",
- "C3",
- "C4",
- "F0",
- "F1",
- "S",
- "S0",
- "S1",
- "S10",
- "S2",
- "S3",
- "S4",
- "S5",
- "S6",
- "S7",
- "S8",
- "S9"
- ],
- "metadata": {
- "description": "Optional. SKU of the Cognitive Services resource. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set."
- }
- },
- "customSubDomainName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Subdomain name used for token-based authentication. Required if 'networkAcls' or 'privateEndpoints' are set."
- }
- },
- "networkAcls": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. A collection of rules governing the accessibility from specific network locations."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "allowedFqdnList": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of allowed FQDN."
- }
- },
- "apiProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The API properties for special APIs."
- }
- },
- "disableLocalAuth": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Allow only Azure AD authentication. Should be enabled for security reasons."
- }
- },
- "cMKKeyVaultResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The resource ID of a key vault to reference a customer managed key for encryption from. Required if 'cMKKeyName' is not empty."
- }
- },
- "cMKKeyName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the customer managed key to use for encryption. Cannot be deployed together with the parameter 'systemAssignedIdentity' enabled."
- }
- },
- "cMKUserAssignedIdentityResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. User assigned identity to use when fetching the customer managed key. Required if 'cMKKeyName' is not empty."
- }
- },
- "cMKKeyVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, latest is used."
- }
- },
- "dynamicThrottlingEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. The flag to enable dynamic throttling."
- }
- },
- "migrationToken": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource migration token."
- }
- },
- "restore": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Restore a soft-deleted cognitive service at deployment time. Will fail if no such soft-deleted resource exists."
- }
- },
- "restrictOutboundNetworkAccess": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Restrict outbound network access."
- }
- },
- "userOwnedStorage": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The storage accounts for this resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Cognitive Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '25fbc0a9-bd7c-42a3-aa1a-3b75d497ee68')]",
- "Cognitive Services Custom Vision Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c1ff6cc2-c111-46fe-8896-e0ef812ad9f3')]",
- "Cognitive Services Custom Vision Deployment": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5c4089e1-6d96-4d2f-b296-c1bc7137275f')]",
- "Cognitive Services Custom Vision Labeler": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '88424f51-ebe7-446f-bc41-7fa16989e96c')]",
- "Cognitive Services Custom Vision Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '93586559-c37d-4a6b-ba08-b9f0940c2d73')]",
- "Cognitive Services Custom Vision Trainer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a5ae4ab-0d65-4eeb-be61-29fc9b54394b')]",
- "Cognitive Services Data Reader (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b59867f0-fa02-499b-be73-45a86b5b3e1c')]",
- "Cognitive Services Face Recognizer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9894cab4-e18a-44aa-828b-cb588cd6f2d7')]",
- "Cognitive Services Immersive Reader User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b2de6794-95db-4659-8781-7e080d3f2b9d')]",
- "Cognitive Services Language Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f07febfe-79bc-46b1-8b37-790e26e6e498')]",
- "Cognitive Services Language Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7628b7b8-a8b2-4cdc-b46f-e9b35248918e')]",
- "Cognitive Services Language Writer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f2310ca1-dc64-4889-bb49-c8e0fa3d47a8')]",
- "Cognitive Services LUIS Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f72c8140-2111-481c-87ff-72b910f6e3f8')]",
- "Cognitive Services LUIS Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18e81cdc-4e98-4e29-a639-e7d10c5a6226')]",
- "Cognitive Services LUIS Writer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '6322a993-d5c9-4bed-b113-e49bbea25b27')]",
- "Cognitive Services Metrics Advisor Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'cb43c632-a144-4ec5-977c-e80c4affc34a')]",
- "Cognitive Services Metrics Advisor User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3b20f47b-3825-43cb-8114-4bd2201156a8')]",
- "Cognitive Services OpenAI Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442')]",
- "Cognitive Services OpenAI User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd')]",
- "Cognitive Services QnA Maker Editor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f4cc2bf9-21be-47a1-bdf1-5c5804381025')]",
- "Cognitive Services QnA Maker Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '466ccd10-b268-4a11-b098-b4849f024126')]",
- "Cognitive Services Speech Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0e75ca1e-0464-4b4d-8b93-68208a576181')]",
- "Cognitive Services Speech User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f2dc8367-1007-4938-bd23-fe263f013447')]",
- "Cognitive Services User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a97b65f3-24c7-4388-baec-2e87135dc908')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(parameters('cMKKeyVaultResourceId'))), not(empty(parameters('cMKKeyName'))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), 'dummyVault'), '/')), if(not(empty(parameters('cMKKeyName'))), parameters('cMKKeyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(parameters('cMKKeyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2021-10-01",
- "subscriptionId": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(if(not(empty(parameters('cMKKeyVaultResourceId'))), parameters('cMKKeyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(parameters('cMKUserAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(if(not(empty(parameters('cMKUserAssignedIdentityResourceId'))), parameters('cMKUserAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(if(not(empty(parameters('cMKUserAssignedIdentityResourceId'))), parameters('cMKUserAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(if(not(empty(parameters('cMKUserAssignedIdentityResourceId'))), parameters('cMKUserAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "cognitiveServices": {
- "type": "Microsoft.CognitiveServices/accounts",
- "apiVersion": "2022-12-01",
- "name": "[parameters('name')]",
- "kind": "[parameters('kind')]",
- "identity": "[variables('identity')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('sku')]"
- },
- "properties": {
- "customSubDomainName": "[if(not(empty(parameters('customSubDomainName'))), parameters('customSubDomainName'), null())]",
- "networkAcls": "[if(not(empty(parameters('networkAcls'))), createObject('defaultAction', if(contains(parameters('networkAcls'), 'defaultAction'), parameters('networkAcls').defaultAction, null()), 'virtualNetworkRules', if(contains(parameters('networkAcls'), 'virtualNetworkRules'), parameters('networkAcls').virtualNetworkRules, createArray()), 'ipRules', if(contains(parameters('networkAcls'), 'ipRules'), parameters('networkAcls').ipRules, createArray())), null())]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('networkAcls'))), 'Disabled', null()))]",
- "allowedFqdnList": "[parameters('allowedFqdnList')]",
- "apiProperties": "[parameters('apiProperties')]",
- "disableLocalAuth": "[parameters('disableLocalAuth')]",
- "encryption": "[if(not(empty(parameters('cMKKeyName'))), createObject('keySource', 'Microsoft.KeyVault', 'keyVaultProperties', createObject('identityClientId', reference('cMKUserAssignedIdentity').clientId, 'keyVaultUri', reference('cMKKeyVault').vaultUri, 'keyName', parameters('cMKKeyName'), 'keyVersion', if(not(empty(parameters('cMKKeyVersion'))), parameters('cMKKeyVersion'), last(split(reference('cMKKeyVault::cMKKey').keyUriWithVersion, '/'))))), null())]",
- "migrationToken": "[if(not(empty(parameters('migrationToken'))), parameters('migrationToken'), null())]",
- "restore": "[parameters('restore')]",
- "restrictOutboundNetworkAccess": "[parameters('restrictOutboundNetworkAccess')]",
- "userOwnedStorage": "[if(not(empty(parameters('userOwnedStorage'))), parameters('userOwnedStorage'), null())]",
- "dynamicThrottlingEnabled": "[parameters('dynamicThrottlingEnabled')]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "cognitiveServices_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "cognitiveServices"
- ]
- },
- "cognitiveServices_diagnosticSettings": {
- "copy": {
- "name": "cognitiveServices_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "cognitiveServices"
- ]
- },
- "cognitiveServices_roleAssignments": {
- "copy": {
- "name": "cognitiveServices_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.CognitiveServices/accounts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "cognitiveServices"
- ]
- },
- "cognitiveServices_privateEndpoints": {
- "copy": {
- "name": "cognitiveServices_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-cognitiveServices-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'account')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.CognitiveServices/accounts', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'account'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.CognitiveServices/accounts', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "cognitiveServices"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the cognitive services account."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the cognitive services account."
- },
- "value": "[resourceId('Microsoft.CognitiveServices/accounts', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the cognitive services account was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "endpoint": {
- "type": "string",
- "metadata": {
- "description": "The service endpoint of the cognitive services account."
- },
- "value": "[reference('cognitiveServices').endpoint]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('cognitiveServices', '2022-12-01', 'full').identity, 'principalId')), reference('cognitiveServices', '2022-12-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('cognitiveServices', '2022-12-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/cognitive-services/account/tests/e2e/defaults/main.test.bicep b/modules/cognitive-services/account/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 0f682f11ba..0000000000
--- a/modules/cognitive-services/account/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,50 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${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 = 'csamin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- kind: 'SpeechServices'
- }
-}]
diff --git a/modules/cognitive-services/account/tests/e2e/encr/dependencies.bicep b/modules/cognitive-services/account/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index e4c35b5db4..0000000000
--- a/modules/cognitive-services/account/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Key-Vault-Crypto-User-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the created Key Vault encryption key.')
-output keyVaultKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The client ID of the created Managed Identity.')
-output managedIdentityClientId string = managedIdentity.properties.clientId
diff --git a/modules/cognitive-services/account/tests/e2e/encr/main.test.bicep b/modules/cognitive-services/account/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index 8b7c4e6608..0000000000
--- a/modules/cognitive-services/account/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,72 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${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 = 'csaencr'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- kind: 'SpeechServices'
- cMKKeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- cMKKeyName: nestedDependencies.outputs.keyVaultKeyName
- cMKUserAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- publicNetworkAccess: 'Enabled'
- sku: 'S0'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- restrictOutboundNetworkAccess: false
- }
-}]
diff --git a/modules/cognitive-services/account/tests/e2e/max/dependencies.bicep b/modules/cognitive-services/account/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 129b6f6579..0000000000
--- a/modules/cognitive-services/account/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,68 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.CognitiveServices'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.cognitiveservices.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/cognitive-services/account/tests/e2e/max/main.test.bicep b/modules/cognitive-services/account/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 5652d77380..0000000000
--- a/modules/cognitive-services/account/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,138 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${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 = 'csamax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- kind: 'Face'
- customSubDomainName: '${namePrefix}xdomain'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- networkAcls: {
- defaultAction: 'Deny'
- ipRules: [
- {
- value: '40.74.28.0/23'
- }
- ]
- virtualNetworkRules: [
- {
- id: nestedDependencies.outputs.subnetResourceId
- ignoreMissingVnetServiceEndpoint: false
- }
- ]
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- sku: 'S0'
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/cognitive-services/account/tests/e2e/speech/dependencies.bicep b/modules/cognitive-services/account/tests/e2e/speech/dependencies.bicep
deleted file mode 100644
index 542150de5c..0000000000
--- a/modules/cognitive-services/account/tests/e2e/speech/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.cognitiveservices.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/cognitive-services/account/tests/e2e/speech/main.test.bicep b/modules/cognitive-services/account/tests/e2e/speech/main.test.bicep
deleted file mode 100644
index 8c2a992585..0000000000
--- a/modules/cognitive-services/account/tests/e2e/speech/main.test.bicep
+++ /dev/null
@@ -1,82 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${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 = 'csaspeech'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- kind: 'SpeechServices'
- customSubDomainName: '${namePrefix}speechdomain'
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'account'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- sku: 'S0'
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/cognitive-services/account/tests/e2e/waf-aligned/dependencies.bicep b/modules/cognitive-services/account/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 129b6f6579..0000000000
--- a/modules/cognitive-services/account/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,68 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.CognitiveServices'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.cognitiveservices.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep b/modules/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 06069401e4..0000000000
--- a/modules/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,138 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${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 = 'csawaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- kind: 'Face'
- customSubDomainName: '${namePrefix}xdomain'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- networkAcls: {
- defaultAction: 'Deny'
- ipRules: [
- {
- value: '40.74.28.0/23'
- }
- ]
- virtualNetworkRules: [
- {
- id: nestedDependencies.outputs.subnetResourceId
- ignoreMissingVnetServiceEndpoint: false
- }
- ]
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- sku: 'S0'
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/cognitive-services/account/version.json b/modules/cognitive-services/account/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/cognitive-services/account/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/compute/availability-set/README.md b/modules/compute/availability-set/README.md
index 8f1eeb1480..a11338fe9b 100644
--- a/modules/compute/availability-set/README.md
+++ b/modules/compute/availability-set/README.md
@@ -1,487 +1,7 @@
-# Availability Sets `[Microsoft.Compute/availabilitySets]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the availability set that is being created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Resource location. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`platformFaultDomainCount`](#parameter-platformfaultdomaincount) | int | The number of fault domains to use. |
-| [`platformUpdateDomainCount`](#parameter-platformupdatedomaincount) | int | The number of update domains to use. |
-| [`proximityPlacementGroupResourceId`](#parameter-proximityplacementgroupresourceid) | string | Resource ID of a proximity placement group. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`skuName`](#parameter-skuname) | string | SKU of the availability set.Parameter JSON format
-
-```json
-"credentials": {
- "value":{
- "certificate": [
- "string"
- ],
- "query": {},
- "header": {},
- "authorization": {
- "scheme": "Authentication Scheme name.-string",
- "parameter": "Authentication Parameter value. - string"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-credentials: {
- certificate: [
- 'string'
- ]
- query: {}
- header: {}
- authorization: {
- scheme: 'Authentication Scheme name.-string'
- parameter: 'Authentication Parameter value. - string'
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"tls": {
- "value":{
- "validateCertificateChain": "Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. - boolean",
- "validateCertificateName": "Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. - boolean"
- }
-}
-```
-
-Bicep format
-
-```bicep
-tls: {
- validateCertificateChain: 'Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. - boolean'
- validateCertificateName: 'Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. - boolean'
-}
-```
-
-Parameter JSON format
-
-```json
-"keyVault": {
- "value":{
- "secretIdentifier":"Key vault secret identifier for fetching secret.",
- "identityClientId":"SystemAssignedIdentity or UserAssignedIdentity Client ID which will be used to access key vault secret."
- }
-}
-```
-
-Bicep format
-
-```bicep
-keyVault: {
- secretIdentifier:'Key vault secret identifier for fetching secret.'
- identityClientId:'SystemAssignedIdentity or UserAssignedIdentity Client ID which will be used to access key vault secret.'
-}
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys an App Configuration Store.
+**This module has been evolved into the following AVM module: [avm/res/app-configuration/configuration-store](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/app-configuration/configuration-store).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/app-configuration/configuration-store).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.AppConfiguration/configurationStores` | [2023-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.AppConfiguration/2023-03-01/configurationStores) |
-| `Microsoft.AppConfiguration/configurationStores/keyValues` | [2023-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.AppConfiguration/2023-03-01/configurationStores/keyValues) |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/app-configuration.configuration-store:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [Pe](#example-4-pe)
-- [WAF-aligned](#example-5-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module configurationStore 'br:bicep/modules/app-configuration.configuration-store:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-accmin'
- params: {
- // Required parameters
- name: 'accmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "accmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module configurationStore 'br:bicep/modules/app-configuration.configuration-store:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-accencr'
- params: {
- // Required parameters
- name: 'accencr001'
- // Non-required parameters
- createMode: 'Default'
- customerManagedKey: {
- keyName: '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": "accencr001"
- },
- // Non-required parameters
- "createMode": {
- "value": "Default"
- },
- "customerManagedKey": {
- "value": {
- "keyName": "via Bicep module
-
-```bicep
-module configurationStore 'br:bicep/modules/app-configuration.configuration-store:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-accmax'
- params: {
- // Required parameters
- name: 'accmax001'
- // Non-required parameters
- createMode: 'Default'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "accmax001"
- },
- // Non-required parameters
- "createMode": {
- "value": "Default"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module configurationStore 'br:bicep/modules/app-configuration.configuration-store:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-accpe'
- params: {
- // Required parameters
- name: 'accpe001'
- // Non-required parameters
- createMode: 'Default'
- disableLocalAuth: false
- enableDefaultTelemetry: '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": "accpe001"
- },
- // Non-required parameters
- "createMode": {
- "value": "Default"
- },
- "disableLocalAuth": {
- "value": false
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module configurationStore 'br:bicep/modules/app-configuration.configuration-store:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-accwaf'
- params: {
- // Required parameters
- name: 'accwaf001'
- // Non-required parameters
- createMode: 'Default'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "accwaf001"
- },
- // Non-required parameters
- "createMode": {
- "value": "Default"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys a Container App.
+**This module has been evolved into the following AVM module: [avm/res/app/container-app](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/app/container-app).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/app/container-app).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.App/containerApps` | [2022-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2022-10-01/containerApps) |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/app.container-app:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module containerApp 'br:bicep/modules/app.container-app:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mcappmin'
- params: {
- // Required parameters
- containers: [
- {
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- name: 'simple-hello-world-container'
- resources: {
- cpu: '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
- "containers": {
- "value": [
- {
- "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
- "name": "simple-hello-world-container",
- "resources": {
- "cpu": "via Bicep module
-
-```bicep
-module containerApp 'br:bicep/modules/app.container-app:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mcappmax'
- params: {
- // Required parameters
- containers: [
- {
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- name: 'simple-hello-world-container'
- probes: [
- {
- httpGet: {
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- path: '/health'
- port: 8080
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- type: 'Liveness'
- }
- ]
- resources: {
- cpu: '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
- "containers": {
- "value": [
- {
- "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
- "name": "simple-hello-world-container",
- "probes": [
- {
- "httpGet": {
- "httpHeaders": [
- {
- "name": "Custom-Header",
- "value": "Awesome"
- }
- ],
- "path": "/health",
- "port": 8080
- },
- "initialDelaySeconds": 3,
- "periodSeconds": 3,
- "type": "Liveness"
- }
- ],
- "resources": {
- "cpu": "via Bicep module
-
-```bicep
-module containerApp 'br:bicep/modules/app.container-app:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mcappwaf'
- params: {
- // Required parameters
- containers: [
- {
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- name: 'simple-hello-world-container'
- probes: [
- {
- httpGet: {
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- path: '/health'
- port: 8080
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- type: 'Liveness'
- }
- ]
- resources: {
- cpu: '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
- "containers": {
- "value": [
- {
- "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
- "name": "simple-hello-world-container",
- "probes": [
- {
- "httpGet": {
- "httpHeaders": [
- {
- "name": "Custom-Header",
- "value": "Awesome"
- }
- ],
- "path": "/health",
- "port": 8080
- },
- "initialDelaySeconds": 3,
- "periodSeconds": 3,
- "type": "Liveness"
- }
- ],
- "resources": {
- "cpu": "⚠️ Moved to AVM ⚠️
-This module deploys a Container App Job.
+**This module has been evolved into the following AVM module: [avm/res/app/job](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/app/job).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/app/job).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.App/jobs` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2023-05-01/jobs) |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/app.job:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module job 'br:bicep/modules/app.job:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ajmin'
- params: {
- // Required parameters
- containers: [
- {
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- name: 'simple-hello-world-container'
- resources: {
- cpu: '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
- "containers": {
- "value": [
- {
- "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
- "name": "simple-hello-world-container",
- "resources": {
- "cpu": "via Bicep module
-
-```bicep
-module job 'br:bicep/modules/app.job:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ajmax'
- params: {
- // Required parameters
- containers: [
- {
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- name: 'simple-hello-world-container'
- probes: [
- {
- httpGet: {
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- path: '/health'
- port: 8080
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- type: 'Liveness'
- }
- ]
- resources: {
- cpu: '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
- "containers": {
- "value": [
- {
- "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
- "name": "simple-hello-world-container",
- "probes": [
- {
- "httpGet": {
- "httpHeaders": [
- {
- "name": "Custom-Header",
- "value": "Awesome"
- }
- ],
- "path": "/health",
- "port": 8080
- },
- "initialDelaySeconds": 3,
- "periodSeconds": 3,
- "type": "Liveness"
- }
- ],
- "resources": {
- "cpu": "via Bicep module
-
-```bicep
-module job 'br:bicep/modules/app.job:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ajwaf'
- params: {
- // Required parameters
- containers: [
- {
- image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
- name: 'simple-hello-world-container'
- probes: [
- {
- httpGet: {
- httpHeaders: [
- {
- name: 'Custom-Header'
- value: 'Awesome'
- }
- ]
- path: '/health'
- port: 8080
- }
- initialDelaySeconds: 3
- periodSeconds: 3
- type: 'Liveness'
- }
- ]
- resources: {
- cpu: '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
- "containers": {
- "value": [
- {
- "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest",
- "name": "simple-hello-world-container",
- "probes": [
- {
- "httpGet": {
- "httpHeaders": [
- {
- "name": "Custom-Header",
- "value": "Awesome"
- }
- ],
- "path": "/health",
- "port": 8080
- },
- "initialDelaySeconds": 3,
- "periodSeconds": 3,
- "type": "Liveness"
- }
- ],
- "resources": {
- "cpu": "⚠️ Moved to AVM ⚠️
-This module deploys an App Managed Environment (also known as a Container App Environment).
+**This module has been evolved into the following AVM module: [avm/res/app/managed-environment](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/app/managed-environment).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/app/managed-environment).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.App/managedEnvironments` | [2022-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.App/2022-10-01/managedEnvironments) |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/app.managed-environment:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module managedEnvironment 'br:bicep/modules/app.managed-environment:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-amemin'
- params: {
- // Required parameters
- enableDefaultTelemetry: '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
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module managedEnvironment 'br:bicep/modules/app.managed-environment:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-amemax'
- params: {
- // Required parameters
- enableDefaultTelemetry: '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
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module managedEnvironment 'br:bicep/modules/app.managed-environment:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-amewaf'
- params: {
- // Required parameters
- enableDefaultTelemetry: '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
- "enableDefaultTelemetry": {
- "value": "⚠️ Retired ⚠️
-This module deploys an Authorization Lock at a Subscription or Resource Group scope.
+This module has been retired without a replacement in Azure Verified Modules ([AVM](https://aka.ms/AVM)).
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/lock).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.lock:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module lock 'br:bicep/modules/authorization.lock:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-almax'
- params: {
- // Required parameters
- level: 'CanNotDelete'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "level": {
- "value": "CanNotDelete"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module lock 'br:bicep/modules/authorization.lock:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-alwaf'
- params: {
- // Required parameters
- level: 'CanNotDelete'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "level": {
- "value": "CanNotDelete"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Policy Assignment at a Management Group, Subscription or Resource Group scope.
+**This module has been evolved into the following AVM module: [avm/ptn/authorization/policy-assignment](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/authorization/policy-assignment).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/policy-assignment).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyAssignments` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-06-01/policyAssignments) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.policy-assignment:1.0.0`.
-
-- [Mg.Common](#example-1-mgcommon)
-- [Mg.Min](#example-2-mgmin)
-- [Rg.Common](#example-3-rgcommon)
-- [Rg.Min](#example-4-rgmin)
-- [Sub.Common](#example-5-subcommon)
-- [Sub.Min](#example-6-submin)
-
-### Example 1: _Mg.Common_
-
-via Bicep module
-
-```bicep
-module policyAssignment 'br:bicep/modules/authorization.policy-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-apamgcom'
- params: {
- // Required parameters
- name: 'apamgcom001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611'
- // Non-required parameters
- description: '[Description] Policy Assignment at the management group scope'
- displayName: '[Display Name] Policy Assignment at the management group scope'
- enableDefaultTelemetry: '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": "apamgcom001"
- },
- "policyDefinitionId": {
- "value": "/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611"
- },
- // Non-required parameters
- "description": {
- "value": "[Description] Policy Assignment at the management group scope"
- },
- "displayName": {
- "value": "[Display Name] Policy Assignment at the management group scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyAssignment 'br:bicep/modules/authorization.policy-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apamgmin'
- params: {
- // Required parameters
- name: 'apamgmin001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d'
- // Non-required parameters
- enableDefaultTelemetry: '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": "apamgmin001"
- },
- "policyDefinitionId": {
- "value": "/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyAssignment 'br:bicep/modules/authorization.policy-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apargcom'
- params: {
- // Required parameters
- name: 'apargcom001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611'
- // Non-required parameters
- description: '[Description] Policy Assignment at the resource group scope'
- displayName: '[Display Name] Policy Assignment at the resource group scope'
- enableDefaultTelemetry: '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": "apargcom001"
- },
- "policyDefinitionId": {
- "value": "/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611"
- },
- // Non-required parameters
- "description": {
- "value": "[Description] Policy Assignment at the resource group scope"
- },
- "displayName": {
- "value": "[Display Name] Policy Assignment at the resource group scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyAssignment 'br:bicep/modules/authorization.policy-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apargmin'
- params: {
- // Required parameters
- name: 'apargmin001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d'
- // Non-required parameters
- enableDefaultTelemetry: '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": "apargmin001"
- },
- "policyDefinitionId": {
- "value": "/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyAssignment 'br:bicep/modules/authorization.policy-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apasubcom'
- params: {
- // Required parameters
- name: 'apasubcom001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611'
- // Non-required parameters
- description: '[Description] Policy Assignment at the subscription scope'
- displayName: '[Display Name] Policy Assignment at the subscription scope'
- enableDefaultTelemetry: '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": "apasubcom001"
- },
- "policyDefinitionId": {
- "value": "/providers/Microsoft.Authorization/policySetDefinitions/39a366e6-fdde-4f41-bbf8-3757f46d1611"
- },
- // Non-required parameters
- "description": {
- "value": "[Description] Policy Assignment at the subscription scope"
- },
- "displayName": {
- "value": "[Display Name] Policy Assignment at the subscription scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyAssignment 'br:bicep/modules/authorization.policy-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apasubmin'
- params: {
- // Required parameters
- name: 'apasubmin001'
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d'
- // Non-required parameters
- enableDefaultTelemetry: '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": "apasubmin001"
- },
- "policyDefinitionId": {
- "value": "/providers/Microsoft.Authorization/policyDefinitions/06a78e20-9358-41c9-923c-fb736d382a4d"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "Parameter JSON format
-
-```json
-"managementGroupId": {
- "value": "contoso-group"
-}
-```
-
-Bicep format
-
-```bicep
-managementGroupId: 'contoso-group'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-},
-"resourceGroupName": {
- "value": "target-resourceGroup"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-resourceGroupName: 'target-resourceGroup'
-```
-
-⚠️ Retired ⚠️
-This module deploys a Policy Definition at a Management Group or Subscription scope.
+This module has been retired without a replacement in Azure Verified Modules ([AVM](https://aka.ms/AVM)).
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/policy-definition).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyDefinitions` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-06-01/policyDefinitions) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.policy-definition:1.0.0`.
-
-- [Mg.Common](#example-1-mgcommon)
-- [Mg.Min](#example-2-mgmin)
-- [Sub.Common](#example-3-subcommon)
-- [Sub.Min](#example-4-submin)
-
-### Example 1: _Mg.Common_
-
-via Bicep module
-
-```bicep
-module policyDefinition 'br:bicep/modules/authorization.policy-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apdmgcom'
- params: {
- // Required parameters
- name: 'apdmgcom001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.Resources/subscriptions'
- field: 'type'
- }
- {
- exists: 'false'
- field: '[concat(\'tags[\' parameters(\'tagName\') \']\')]'
- }
- ]
- }
- then: {
- details: {
- operations: [
- {
- field: '[concat(\'tags[\' parameters(\'tagName\') \']\')]'
- operation: 'add'
- value: '[parameters(\'tagValue\')]'
- }
- ]
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f'
- ]
- }
- effect: 'modify'
- }
- }
- // Non-required parameters
- description: '[Description] This policy definition is deployed at the management group scope'
- displayName: '[DisplayName] This policy definition is deployed at the management group scope'
- enableDefaultTelemetry: '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": "apdmgcom001"
- },
- "policyRule": {
- "value": {
- "if": {
- "allOf": [
- {
- "equals": "Microsoft.Resources/subscriptions",
- "field": "type"
- },
- {
- "exists": "false",
- "field": "[concat(\"tags[\", parameters(\"tagName\"), \"]\")]"
- }
- ]
- },
- "then": {
- "details": {
- "operations": [
- {
- "field": "[concat(\"tags[\", parameters(\"tagName\"), \"]\")]",
- "operation": "add",
- "value": "[parameters(\"tagValue\")]"
- }
- ],
- "roleDefinitionIds": [
- "/providers/microsoft.authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f"
- ]
- },
- "effect": "modify"
- }
- }
- },
- // Non-required parameters
- "description": {
- "value": "[Description] This policy definition is deployed at the management group scope"
- },
- "displayName": {
- "value": "[DisplayName] This policy definition is deployed at the management group scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyDefinition 'br:bicep/modules/authorization.policy-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apdmgmin'
- params: {
- // Required parameters
- name: 'apdmgmin001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- // Non-required parameters
- enableDefaultTelemetry: '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": "apdmgmin001"
- },
- "policyRule": {
- "value": {
- "if": {
- "allOf": [
- {
- "equals": "Microsoft.KeyVault/vaults",
- "field": "type"
- }
- ]
- },
- "then": {
- "effect": "[parameters(\"effect\")]"
- }
- }
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyDefinition 'br:bicep/modules/authorization.policy-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apdsubcom'
- params: {
- // Required parameters
- name: 'apdsubcom001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.Resources/subscriptions'
- field: 'type'
- }
- {
- exists: 'false'
- field: '[concat(\'tags[\' parameters(\'tagName\') \']\')]'
- }
- ]
- }
- then: {
- details: {
- operations: [
- {
- field: '[concat(\'tags[\' parameters(\'tagName\') \']\')]'
- operation: 'add'
- value: '[parameters(\'tagValue\')]'
- }
- ]
- roleDefinitionIds: [
- '/providers/microsoft.authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f'
- ]
- }
- effect: 'modify'
- }
- }
- // Non-required parameters
- description: '[Description] This policy definition is deployed at subscription scope'
- displayName: '[DisplayName] This policy definition is deployed at subscription scope'
- enableDefaultTelemetry: '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": "apdsubcom001"
- },
- "policyRule": {
- "value": {
- "if": {
- "allOf": [
- {
- "equals": "Microsoft.Resources/subscriptions",
- "field": "type"
- },
- {
- "exists": "false",
- "field": "[concat(\"tags[\", parameters(\"tagName\"), \"]\")]"
- }
- ]
- },
- "then": {
- "details": {
- "operations": [
- {
- "field": "[concat(\"tags[\", parameters(\"tagName\"), \"]\")]",
- "operation": "add",
- "value": "[parameters(\"tagValue\")]"
- }
- ],
- "roleDefinitionIds": [
- "/providers/microsoft.authorization/roleDefinitions/4a9ae827-6dc8-4573-8ac7-8239d42aa03f"
- ]
- },
- "effect": "modify"
- }
- }
- },
- // Non-required parameters
- "description": {
- "value": "[Description] This policy definition is deployed at subscription scope"
- },
- "displayName": {
- "value": "[DisplayName] This policy definition is deployed at subscription scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policyDefinition 'br:bicep/modules/authorization.policy-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apdsubmin'
- params: {
- // Required parameters
- name: 'apdsubmin001'
- policyRule: {
- if: {
- allOf: [
- {
- equals: 'Microsoft.KeyVault/vaults'
- field: 'type'
- }
- ]
- }
- then: {
- effect: '[parameters(\'effect\')]'
- }
- }
- // Non-required parameters
- enableDefaultTelemetry: '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": "apdsubmin001"
- },
- "policyRule": {
- "value": {
- "if": {
- "allOf": [
- {
- "equals": "Microsoft.KeyVault/vaults",
- "field": "type"
- }
- ]
- },
- "then": {
- "effect": "[parameters(\"effect\")]"
- }
- }
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "Parameter JSON format
-
-```json
-"managementGroupId": {
- "value": "contoso-group"
-}
-```
-
-Bicep format
-
-```bicep
-managementGroupId: 'contoso-group'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-```
-
-⚠️ Retired ⚠️
-This module deploys a Policy Exemption at a Management Group, Subscription or Resource Group scope.
+This module has been retired without a replacement in Azure Verified Modules ([AVM](https://aka.ms/AVM)).
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/policy-exemption).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policyExemptions` | [2022-07-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-07-01-preview/policyExemptions) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.policy-exemption:1.0.0`.
-
-- [Mg.Common](#example-1-mgcommon)
-- [Mg.Min](#example-2-mgmin)
-- [Rg.Common](#example-3-rgcommon)
-- [Rg.Min](#example-4-rgmin)
-- [Sub.Common](#example-5-subcommon)
-- [Sub.Min](#example-6-submin)
-
-### Example 1: _Mg.Common_
-
-via Bicep module
-
-```bicep
-module policyExemption 'br:bicep/modules/authorization.policy-exemption:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apemgcom'
- params: {
- // Required parameters
- name: 'apemgcom001'
- policyAssignmentId: '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": "apemgcom001"
- },
- "policyAssignmentId": {
- "value": "via Bicep module
-
-```bicep
-module policyExemption 'br:bicep/modules/authorization.policy-exemption:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apemgmin'
- params: {
- // Required parameters
- name: 'apemgmin001'
- policyAssignmentId: '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": "apemgmin001"
- },
- "policyAssignmentId": {
- "value": "via Bicep module
-
-```bicep
-module policyExemption 'br:bicep/modules/authorization.policy-exemption:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apergcom'
- params: {
- // Required parameters
- name: 'apergcom001'
- policyAssignmentId: '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": "apergcom001"
- },
- "policyAssignmentId": {
- "value": "via Bicep module
-
-```bicep
-module policyExemption 'br:bicep/modules/authorization.policy-exemption:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apergmin'
- params: {
- // Required parameters
- name: 'apergmin001'
- policyAssignmentId: '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": "apergmin001"
- },
- "policyAssignmentId": {
- "value": "via Bicep module
-
-```bicep
-module policyExemption 'br:bicep/modules/authorization.policy-exemption:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apesubcom'
- params: {
- // Required parameters
- name: 'apesubcom001'
- policyAssignmentId: '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": "apesubcom001"
- },
- "policyAssignmentId": {
- "value": "via Bicep module
-
-```bicep
-module policyExemption 'br:bicep/modules/authorization.policy-exemption:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apesubmin'
- params: {
- // Required parameters
- name: 'apesubmin001'
- policyAssignmentId: '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": "apesubmin001"
- },
- "policyAssignmentId": {
- "value": "Parameter JSON format
-
-```json
-"managementGroupId": {
- "value": "contoso-group"
-}
-```
-
-Bicep format
-
-```bicep
-managementGroupId: 'contoso-group'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-```
-
-Parameter JSON format
-
-```json
-"resourceSelectors": [
- {
- "name": "TemporaryMitigation",
- "selectors": [
- {
- "kind": "resourceLocation",
- "in": [
- "westcentralus"
- ]
- }
- ]
- }
-]
-```
-
-Bicep format
-
-```bicep
-resourceSelectors: [
- {
- name: 'TemporaryMitigation'
- selectors: [
- {
- kind: 'resourceLocation'
- in: [
- 'westcentralus'
- ]
- }
- ]
- }
-]
-```
-
-⚠️ Retired ⚠️
-This module deploys a Policy Set Definition (Initiative) at a Management Group or Subscription scope.
+This module has been retired without a replacement in Azure Verified Modules ([AVM](https://aka.ms/AVM)).
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/policy-set-definition).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/policySetDefinitions` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-06-01/policySetDefinitions) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.policy-set-definition:1.0.0`.
-
-- [Mg.Common](#example-1-mgcommon)
-- [Mg.Min](#example-2-mgmin)
-- [Sub.Common](#example-3-subcommon)
-- [Sub.Min](#example-4-submin)
-
-### Example 1: _Mg.Common_
-
-via Bicep module
-
-```bicep
-module policySetDefinition 'br:bicep/modules/authorization.policy-set-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apsdmgcom'
- params: {
- // Required parameters
- name: 'apsdmgcom001'
- 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'
- enableDefaultTelemetry: '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": "apsdmgcom001"
- },
- "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"
- }
- ]
- },
- // Non-required parameters
- "description": {
- "value": "[Description] This policy set definition is deployed at management group scope"
- },
- "displayName": {
- "value": "[DisplayName] This policy set definition is deployed at management group scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policySetDefinition 'br:bicep/modules/authorization.policy-set-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apsdmgmin'
- params: {
- // Required parameters
- name: 'apsdmgmin001'
- policyDefinitions: [
- {
- parameters: {
- listOfAllowedLocations: {
- value: [
- 'australiaeast'
- ]
- }
- }
- policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c'
- }
- ]
- // Non-required parameters
- enableDefaultTelemetry: '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": "apsdmgmin001"
- },
- "policyDefinitions": {
- "value": [
- {
- "parameters": {
- "listOfAllowedLocations": {
- "value": [
- "australiaeast"
- ]
- }
- },
- "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c"
- }
- ]
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policySetDefinition 'br:bicep/modules/authorization.policy-set-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-apsdsubcom'
- params: {
- // Required parameters
- name: 'apsdsubcom001'
- 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'
- enableDefaultTelemetry: '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": "apsdsubcom001"
- },
- "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"
- }
- ]
- },
- // Non-required parameters
- "description": {
- "value": "[Description] This policy set definition is deployed at subscription scope"
- },
- "displayName": {
- "value": "[DisplayName] This policy set definition is deployed at subscription scope"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module policySetDefinition 'br:bicep/modules/authorization.policy-set-definition:1.0.0' = {
- 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
- enableDefaultTelemetry: '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
- "enableDefaultTelemetry": {
- "value": "Parameter JSON format
-
-```json
-"managementGroupId": {
- "value": "contoso-group"
-}
-```
-
-Bicep format
-
-```bicep
-managementGroupId: 'contoso-group'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a Role Assignment at a Management Group, Subscription or Resource Group scope.
+**This module has been evolved into the following AVM module: [avm/ptn/authorization/role-assignment](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/authorization/role-assignment).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/role-assignment).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.role-assignment:1.0.0`.
-
-- [Mg.Common](#example-1-mgcommon)
-- [Mg.Min](#example-2-mgmin)
-- [Rg.Common](#example-3-rgcommon)
-- [Rg.Min](#example-4-rgmin)
-- [Sub.Common](#example-5-subcommon)
-- [Sub.Min](#example-6-submin)
-
-### Example 1: _Mg.Common_
-
-via Bicep module
-
-```bicep
-module roleAssignment 'br:bicep/modules/authorization.role-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-aramgcom'
- params: {
- // Required parameters
- principalId: '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
- "principalId": {
- "value": "via Bicep module
-
-```bicep
-module roleAssignment 'br:bicep/modules/authorization.role-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-aramgmin'
- params: {
- // Required parameters
- principalId: '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
- "principalId": {
- "value": "via Bicep module
-
-```bicep
-module roleAssignment 'br:bicep/modules/authorization.role-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-arargcom'
- params: {
- // Required parameters
- principalId: '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
- "principalId": {
- "value": "via Bicep module
-
-```bicep
-module roleAssignment 'br:bicep/modules/authorization.role-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-arargmin'
- params: {
- // Required parameters
- principalId: '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
- "principalId": {
- "value": "via Bicep module
-
-```bicep
-module roleAssignment 'br:bicep/modules/authorization.role-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-arasubcom'
- params: {
- // Required parameters
- principalId: '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
- "principalId": {
- "value": "via Bicep module
-
-```bicep
-module roleAssignment 'br:bicep/modules/authorization.role-assignment:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-arasubmin'
- params: {
- // Required parameters
- principalId: '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
- "principalId": {
- "value": "Parameter JSON format
-
-```json
-"managementGroupId": {
- "value": "contoso-group"
-}
-```
-
-Bicep format
-
-```bicep
-managementGroupId: 'contoso-group'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-},
-"resourceGroupName": {
- "value": "target-resourceGroup"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-resourceGroupName: 'target-resourceGroup'
-```
-
-⚠️ Retired ⚠️
-This module deploys a Role Definition at a Management Group, Subscription or Resource Group scope.
+This module has been retired without a replacement in Azure Verified Modules ([AVM](https://aka.ms/AVM)).
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/authorization/role-definition).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleDefinitions` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleDefinitions) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/authorization.role-definition:1.0.0`.
-
-- [Mg.Common](#example-1-mgcommon)
-- [Mg.Min](#example-2-mgmin)
-- [Rg.Common](#example-3-rgcommon)
-- [Rg.Min](#example-4-rgmin)
-- [Sub.Common](#example-5-subcommon)
-- [Sub.Min](#example-6-submin)
-
-### Example 1: _Mg.Common_
-
-via Bicep module
-
-```bicep
-module roleDefinition 'br:bicep/modules/authorization.role-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-ardmgcom'
- params: {
- // Required parameters
- roleName: 'testRole-ardmgcom'
- // Non-required parameters
- actions: [
- 'Microsoft.Compute/galleries/*'
- 'Microsoft.Network/virtualNetworks/read'
- ]
- assignableScopes: [
- '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
- "roleName": {
- "value": "testRole-ardmgcom"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "Microsoft.Compute/galleries/*",
- "Microsoft.Network/virtualNetworks/read"
- ]
- },
- "assignableScopes": {
- "value": [
- "via Bicep module
-
-```bicep
-module roleDefinition 'br:bicep/modules/authorization.role-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-ardmgmin'
- params: {
- // Required parameters
- roleName: 'testRole-ardmgmin'
- // Non-required parameters
- actions: [
- 'Microsoft.Compute/galleries/images/read'
- 'Microsoft.Compute/galleries/read'
- ]
- enableDefaultTelemetry: '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
- "roleName": {
- "value": "testRole-ardmgmin"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "Microsoft.Compute/galleries/images/read",
- "Microsoft.Compute/galleries/read"
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module roleDefinition 'br:bicep/modules/authorization.role-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-ardrgcom'
- params: {
- // Required parameters
- roleName: 'testRole-ardrgcom'
- // Non-required parameters
- actions: [
- 'Microsoft.Compute/galleries/*'
- 'Microsoft.Network/virtualNetworks/read'
- ]
- assignableScopes: [
- '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
- "roleName": {
- "value": "testRole-ardrgcom"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "Microsoft.Compute/galleries/*",
- "Microsoft.Network/virtualNetworks/read"
- ]
- },
- "assignableScopes": {
- "value": [
- "via Bicep module
-
-```bicep
-module roleDefinition 'br:bicep/modules/authorization.role-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-ardrgmin'
- params: {
- // Required parameters
- roleName: 'testRole-ardrgmin'
- // Non-required parameters
- actions: [
- 'Microsoft.Compute/galleries/images/read'
- 'Microsoft.Compute/galleries/read'
- ]
- enableDefaultTelemetry: '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
- "roleName": {
- "value": "testRole-ardrgmin"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "Microsoft.Compute/galleries/images/read",
- "Microsoft.Compute/galleries/read"
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module roleDefinition 'br:bicep/modules/authorization.role-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-ardsubcom'
- params: {
- // Required parameters
- roleName: 'testRole-ardsubcom'
- // Non-required parameters
- actions: [
- 'Microsoft.Compute/galleries/*'
- 'Microsoft.Network/virtualNetworks/read'
- ]
- assignableScopes: [
- '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
- "roleName": {
- "value": "testRole-ardsubcom"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "Microsoft.Compute/galleries/*",
- "Microsoft.Network/virtualNetworks/read"
- ]
- },
- "assignableScopes": {
- "value": [
- "via Bicep module
-
-```bicep
-module roleDefinition 'br:bicep/modules/authorization.role-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-ardsubmin'
- params: {
- // Required parameters
- roleName: 'testRole-ardsubmin'
- // Non-required parameters
- actions: [
- 'Microsoft.Compute/galleries/images/read'
- 'Microsoft.Compute/galleries/read'
- ]
- enableDefaultTelemetry: '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
- "roleName": {
- "value": "testRole-ardsubmin"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "Microsoft.Compute/galleries/images/read",
- "Microsoft.Compute/galleries/read"
- ]
- },
- "enableDefaultTelemetry": {
- "value": "Parameter JSON format
-
-```json
-"managementGroupId": {
- "value": "contoso-group"
-}
-```
-
-Bicep format
-
-```bicep
-managementGroupId: 'contoso-group'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-```
-
-Parameter JSON format
-
-```json
-"subscriptionId": {
- "value": "12345678-b049-471c-95af-123456789012"
-},
-"resourceGroupName": {
- "value": "target-resourceGroup"
-}
-```
-
-Bicep format
-
-```bicep
-subscriptionId: '12345678-b049-471c-95af-123456789012'
-resourceGroupName: 'target-resourceGroup'
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys an Azure Automation Account.
+**This module has been evolved into the following AVM module: [avm/res/automation/automation-account](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/automation/automation-account).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/automation/automation-account).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Automation/automationAccounts` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts) |
-| `Microsoft.Automation/automationAccounts/jobSchedules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/jobSchedules) |
-| `Microsoft.Automation/automationAccounts/modules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/modules) |
-| `Microsoft.Automation/automationAccounts/runbooks` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/runbooks) |
-| `Microsoft.Automation/automationAccounts/schedules` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/schedules) |
-| `Microsoft.Automation/automationAccounts/softwareUpdateConfigurations` | [2019-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2019-06-01/automationAccounts/softwareUpdateConfigurations) |
-| `Microsoft.Automation/automationAccounts/variables` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Automation/2022-08-08/automationAccounts/variables) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-| `Microsoft.OperationalInsights/workspaces/linkedServices` | [2020-08-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.OperationalInsights/2020-08-01/workspaces/linkedServices) |
-| `Microsoft.OperationsManagement/solutions` | [2015-11-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.OperationsManagement/2015-11-01-preview/solutions) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/automation.automation-account:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [WAF-aligned](#example-4-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module automationAccount 'br:bicep/modules/automation.automation-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-aamin'
- params: {
- // Required parameters
- name: 'aamin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "aamin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module automationAccount 'br:bicep/modules/automation.automation-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-aaencr'
- params: {
- // Required parameters
- name: 'aaencr001'
- // Non-required parameters
- customerManagedKey: {
- keyName: '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": "aaencr001"
- },
- // Non-required parameters
- "customerManagedKey": {
- "value": {
- "keyName": "via Bicep module
-
-```bicep
-module automationAccount 'br:bicep/modules/automation.automation-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-aamax'
- params: {
- // Required parameters
- name: 'aamax001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "aamax001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module automationAccount 'br:bicep/modules/automation.automation-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-aawaf'
- params: {
- // Required parameters
- name: 'aawaf001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "aawaf001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "Parameter JSON format
-
-```json
-"scopeByTags": {
- "value": {
- "Update": [
- "Automatic"
- ],
- "MaintenanceWindow": [
- "1-Sat-22"
- ]
- }
-}
-```
-
-Bicep format
-
-```bicep
-scopeByTags: {
- Update: [
- 'Automatic'
- ]
- MaintenanceWindow: [
- '1-Sat-22'
- ]
-}
-```
-
-Parameter JSON format
-
-```json
-"monthlyOccurrences": {
- "value": [
- {
- "occurrence": 1,
- "day": "Monday"
- },
- {
- "occurrence": 2,
- "day": "Friday"
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-monthlyOccurrences: [
- {
- occurrence: 1
- day: 'Monday'
- }
- {
- occurrence: 2
- day: 'Friday'
- }
-]
-```
-
-Parameter JSON format
-
-```json
-//Boolean format
-"value": {
- "value": "false"
-}
-
-//DateTime format
-"value": {
- "value": "\"\\/Date(1637934042656)\\/\""
-}
-
-//Integer format
-"value": {
- "value": "500"
-}
-
-//String format
-"value": {
- "value": "\"TestString\""
-}
-```
-
-Bicep format
-
-```bicep
-//Boolean format
-value: 'false'
-
-//DateTime format
-value: '\'\\/Date(1637934042656)\\/\''
-
-//Integer format
-value: '500'
-
-//String format
-value: '\'TestString\''
-```
-
-⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/batch/batch-account](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/batch/batch-account).**
-This module deploys a Batch Account.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/batch/batch-account).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Batch/batchAccounts` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Batch/2022-06-01/batchAccounts) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/batch.batch-account:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [WAF-aligned](#example-4-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module batchAccount 'br:bicep/modules/batch.batch-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-bbamin'
- params: {
- // Required parameters
- name: 'bbamin001'
- storageAccountId: '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": "bbamin001"
- },
- "storageAccountId": {
- "value": "via Bicep module
-
-```bicep
-module batchAccount 'br:bicep/modules/batch.batch-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-bbaencr'
- params: {
- // Required parameters
- name: 'bbaencr001'
- storageAccountId: '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": "bbaencr001"
- },
- "storageAccountId": {
- "value": "via Bicep module
-
-```bicep
-module batchAccount 'br:bicep/modules/batch.batch-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-bbamax'
- params: {
- // Required parameters
- name: 'bbamax001'
- storageAccountId: '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": "bbamax001"
- },
- "storageAccountId": {
- "value": "via Bicep module
-
-```bicep
-module batchAccount 'br:bicep/modules/batch.batch-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-bbawaf'
- params: {
- // Required parameters
- name: 'bbawaf001'
- storageAccountId: '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": "bbawaf001"
- },
- "storageAccountId": {
- "value": "⚠️ Retired ⚠️
-This module deploys a Redis Cache Enterprise.
+This module has been retired without a replacement in Azure Verified Modules ([AVM](https://aka.ms/AVM)).
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/cache/redis-enterprise).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Cache/redisEnterprise` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cache/2022-01-01/redisEnterprise) |
-| `Microsoft.Cache/redisEnterprise/databases` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cache/2022-01-01/redisEnterprise/databases) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/cache.redis-enterprise:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Geo](#example-2-geo)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [WAF-aligned](#example-4-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module redisEnterprise 'br:bicep/modules/cache.redis-enterprise:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cremin'
- params: {
- // Required parameters
- name: 'cremin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "cremin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module redisEnterprise 'br:bicep/modules/cache.redis-enterprise:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cregeo'
- params: {
- // Required parameters
- name: '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": "via Bicep module
-
-```bicep
-module redisEnterprise 'br:bicep/modules/cache.redis-enterprise:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cremax'
- params: {
- // Required parameters
- name: 'cremax001'
- // Non-required parameters
- capacity: 2
- databases: [
- {
- clusteringPolicy: 'EnterpriseCluster'
- evictionPolicy: 'AllKeysLFU'
- modules: [
- {
- name: 'RedisBloom'
- }
- {
- args: 'RETENTION_POLICY 20'
- name: 'RedisTimeSeries'
- }
- ]
- persistenceAofEnabled: true
- persistenceAofFrequency: '1s'
- persistenceRdbEnabled: false
- port: 10000
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "cremax001"
- },
- // Non-required parameters
- "capacity": {
- "value": 2
- },
- "databases": {
- "value": [
- {
- "clusteringPolicy": "EnterpriseCluster",
- "evictionPolicy": "AllKeysLFU",
- "modules": [
- {
- "name": "RedisBloom"
- },
- {
- "args": "RETENTION_POLICY 20",
- "name": "RedisTimeSeries"
- }
- ],
- "persistenceAofEnabled": true,
- "persistenceAofFrequency": "1s",
- "persistenceRdbEnabled": false,
- "port": 10000
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module redisEnterprise 'br:bicep/modules/cache.redis-enterprise:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crewaf'
- params: {
- // Required parameters
- name: 'crewaf001'
- // Non-required parameters
- capacity: 2
- databases: [
- {
- clusteringPolicy: 'EnterpriseCluster'
- evictionPolicy: 'AllKeysLFU'
- modules: [
- {
- name: 'RedisBloom'
- }
- {
- args: 'RETENTION_POLICY 20'
- name: 'RedisTimeSeries'
- }
- ]
- persistenceAofEnabled: true
- persistenceAofFrequency: '1s'
- persistenceRdbEnabled: false
- port: 10000
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "crewaf001"
- },
- // Non-required parameters
- "capacity": {
- "value": 2
- },
- "databases": {
- "value": [
- {
- "clusteringPolicy": "EnterpriseCluster",
- "evictionPolicy": "AllKeysLFU",
- "modules": [
- {
- "name": "RedisBloom"
- },
- {
- "args": "RETENTION_POLICY 20",
- "name": "RedisTimeSeries"
- }
- ],
- "persistenceAofEnabled": true,
- "persistenceAofFrequency": "1s",
- "persistenceRdbEnabled": false,
- "port": 10000
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "Parameter JSON format
-
-```json
-"modules": {
- "value": [
- {
- "name": "RedisBloom",
- "args": "ERROR_RATE 0.00 INITIAL_SIZE 400"
- },
- {
- "name": "RedisTimeSeries",
- "args": "RETENTION_POLICY 20"
- },
- {
- "name": "RediSearch"
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-modules: [
- {
- name: 'RedisBloom'
- args: 'ERROR_RATE 1.00 INITIAL_SIZE 400'
- }
- {
- name: 'RedisTimeSeries'
- args: 'RETENTION_POLICY 20'
- }
- {
- name: 'RediSearch'
- }
-]
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a Redis Cache.
+**This module has been evolved into the following AVM module: [avm/res/cache/redis](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/cache/redis).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/cache/redis).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Cache/redis` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cache/2022-06-01/redis) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/cache.redis:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module redis 'br:bicep/modules/cache.redis:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crmin'
- params: {
- // Required parameters
- name: 'crmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "crmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module redis 'br:bicep/modules/cache.redis:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crmax'
- params: {
- // Required parameters
- name: 'crmax001'
- // Non-required parameters
- capacity: 2
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "crmax001"
- },
- // Non-required parameters
- "capacity": {
- "value": 2
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module redis 'br:bicep/modules/cache.redis:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crwaf'
- params: {
- // Required parameters
- name: 'crwaf001'
- // Non-required parameters
- capacity: 2
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "crwaf001"
- },
- // Non-required parameters
- "capacity": {
- "value": 2
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "Bicep format
-
-```bicep
-userAssignedIdentities: {
- '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001': {}
- '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002': {}
-}
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a CDN Profile.
+**This module has been evolved into the following AVM module: [avm/res/cdn/profile](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/cdn/profile).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/cdn/profile).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Cdn/profiles` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles) |
-| `Microsoft.Cdn/profiles/afdEndpoints` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/afdEndpoints) |
-| `Microsoft.Cdn/profiles/afdEndpoints/routes` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/afdEndpoints/routes) |
-| `Microsoft.Cdn/profiles/customDomains` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/customDomains) |
-| `Microsoft.Cdn/profiles/endpoints` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/2021-06-01/profiles/endpoints) |
-| `Microsoft.Cdn/profiles/endpoints/origins` | [2021-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/2021-06-01/profiles/endpoints/origins) |
-| `Microsoft.Cdn/profiles/originGroups` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/originGroups) |
-| `Microsoft.Cdn/profiles/originGroups/origins` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/originGroups/origins) |
-| `Microsoft.Cdn/profiles/ruleSets` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/ruleSets) |
-| `Microsoft.Cdn/profiles/ruleSets/rules` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/ruleSets/rules) |
-| `Microsoft.Cdn/profiles/secrets` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Cdn/profiles/secrets) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/cdn.profile:1.0.0`.
-
-- [Afd](#example-1-afd)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Afd_
-
-via Bicep module
-
-```bicep
-module profile 'br:bicep/modules/cdn.profile:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdnpafd'
- params: {
- // Required parameters
- name: 'dep-test-cdnpafd'
- sku: 'Standard_AzureFrontDoor'
- // Non-required parameters
- afdEndpoints: [
- {
- name: 'dep-test-cdnpafd-afd-endpoint'
- routes: [
- {
- customDomainName: 'dep-test-cdnpafd-custom-domain'
- name: 'dep-test-cdnpafd-afd-route'
- originGroupName: 'dep-test-cdnpafd-origin-group'
- ruleSets: [
- {
- name: 'deptestcdnpafdruleset'
- }
- ]
- }
- ]
- }
- ]
- customDomains: [
- {
- certificateType: 'ManagedCertificate'
- hostName: 'dep-test-cdnpafd-custom-domain.azurewebsites.net'
- name: 'dep-test-cdnpafd-custom-domain'
- }
- ]
- enableDefaultTelemetry: '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": "dep-test-cdnpafd"
- },
- "sku": {
- "value": "Standard_AzureFrontDoor"
- },
- // Non-required parameters
- "afdEndpoints": {
- "value": [
- {
- "name": "dep-test-cdnpafd-afd-endpoint",
- "routes": [
- {
- "customDomainName": "dep-test-cdnpafd-custom-domain",
- "name": "dep-test-cdnpafd-afd-route",
- "originGroupName": "dep-test-cdnpafd-origin-group",
- "ruleSets": [
- {
- "name": "deptestcdnpafdruleset"
- }
- ]
- }
- ]
- }
- ]
- },
- "customDomains": {
- "value": [
- {
- "certificateType": "ManagedCertificate",
- "hostName": "dep-test-cdnpafd-custom-domain.azurewebsites.net",
- "name": "dep-test-cdnpafd-custom-domain"
- }
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module profile 'br:bicep/modules/cdn.profile:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdnpmax'
- params: {
- // Required parameters
- name: 'dep-test-cdnpmax'
- sku: 'Standard_Verizon'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dep-test-cdnpmax"
- },
- "sku": {
- "value": "Standard_Verizon"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module profile 'br:bicep/modules/cdn.profile:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdnpwaf'
- params: {
- // Required parameters
- name: 'dep-test-cdnpwaf'
- sku: 'Standard_Verizon'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dep-test-cdnpwaf"
- },
- "sku": {
- "value": "Standard_Verizon"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/cognitive-services/account](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/cognitive-services/account).**
-This module deploys a Cognitive Service.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/cognitive-services/account).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.CognitiveServices/accounts` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.CognitiveServices/2022-12-01/accounts) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/cognitive-services.account:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [Speech](#example-4-speech)
-- [WAF-aligned](#example-5-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module account 'br:bicep/modules/cognitive-services.account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csamin'
- params: {
- // Required parameters
- kind: 'SpeechServices'
- name: 'csamin001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "kind": {
- "value": "SpeechServices"
- },
- "name": {
- "value": "csamin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module account 'br:bicep/modules/cognitive-services.account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csaencr'
- params: {
- // Required parameters
- kind: 'SpeechServices'
- name: 'csaencr001'
- // Non-required parameters
- cMKKeyName: '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
- "kind": {
- "value": "SpeechServices"
- },
- "name": {
- "value": "csaencr001"
- },
- // Non-required parameters
- "cMKKeyName": {
- "value": "via Bicep module
-
-```bicep
-module account 'br:bicep/modules/cognitive-services.account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csamax'
- params: {
- // Required parameters
- kind: 'Face'
- name: 'csamax001'
- // Non-required parameters
- customSubDomainName: 'xdomain'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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
- "kind": {
- "value": "Face"
- },
- "name": {
- "value": "csamax001"
- },
- // Non-required parameters
- "customSubDomainName": {
- "value": "xdomain"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module account 'br:bicep/modules/cognitive-services.account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csaspeech'
- params: {
- // Required parameters
- kind: 'SpeechServices'
- name: 'csaspeech001'
- // Non-required parameters
- customSubDomainName: 'speechdomain'
- enableDefaultTelemetry: '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
- "kind": {
- "value": "SpeechServices"
- },
- "name": {
- "value": "csaspeech001"
- },
- // Non-required parameters
- "customSubDomainName": {
- "value": "speechdomain"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module account 'br:bicep/modules/cognitive-services.account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csawaf'
- params: {
- // Required parameters
- kind: 'Face'
- name: 'csawaf001'
- // Non-required parameters
- customSubDomainName: 'xdomain'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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
- "kind": {
- "value": "Face"
- },
- "name": {
- "value": "csawaf001"
- },
- // Non-required parameters
- "customSubDomainName": {
- "value": "xdomain"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys an Availability Set.
+**This module has been evolved into the following AVM module: [avm/res/compute/availability-set](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/compute/availability-set).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/compute/availability-set).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Compute/availabilitySets` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Compute/2022-11-01/availabilitySets) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/compute.availability-set:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module availabilitySet 'br:bicep/modules/compute.availability-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-casmin'
- params: {
- // Required parameters
- name: 'casmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "casmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module availabilitySet 'br:bicep/modules/compute.availability-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-casmax'
- params: {
- // Required parameters
- name: 'casmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "casmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module availabilitySet 'br:bicep/modules/compute.availability-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-caswaf'
- params: {
- // Required parameters
- name: 'caswaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "caswaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-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
- "keyName": {
- "value": "
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module diskEncryptionSet 'br:bicep/modules/compute.disk-encryption-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdesmax'
- params: {
- // Required parameters
- keyName: '
-
-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
- "keyName": {
- "value": "
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module diskEncryptionSet 'br:bicep/modules/compute.disk-encryption-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdeswaf'
- params: {
- // Required parameters
- keyName: '
-
-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
- "keyName": {
- "value": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`keyName`](#parameter-keyname) | string | Key URL (with version) pointing to a key or secret in KeyVault. | -| [`keyVaultResourceId`](#parameter-keyvaultresourceid) | string | Resource ID of the KeyVault containing the key or secret. | -| [`name`](#parameter-name) | string | The name of the disk encryption set that is being created. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`encryptionType`](#parameter-encryptiontype) | string | The type of key used to encrypt the data of the disk. For security reasons, it is recommended to set encryptionType to EncryptionAtRestWithPlatformAndCustomerKeys. | -| [`federatedClientId`](#parameter-federatedclientid) | string | Multi-tenant application client ID to access key vault in a different tenant. Setting the value to "None" will clear the property. | -| [`keyVersion`](#parameter-keyversion) | string | The version of the customer managed key to reference for encryption. If not provided, the latest key version is used. | -| [`location`](#parameter-location) | string | Resource location. | -| [`lock`](#parameter-lock) | object | The lock settings of the service. | -| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. At least one identity type is required. | -| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | -| [`rotationToLatestKeyVersionEnabled`](#parameter-rotationtolatestkeyversionenabled) | bool | Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. | -| [`tags`](#parameter-tags) | object | Tags of the disk encryption resource. | - -### Parameter: `keyName` - -Key URL (with version) pointing to a key or secret in KeyVault. - -- Required: Yes -- Type: string - -### Parameter: `keyVaultResourceId` - -Resource ID of the KeyVault containing the key or secret. - -- Required: Yes -- Type: string - -### Parameter: `name` - -The name of the disk encryption set that is being created. - -- Required: Yes -- Type: string - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `encryptionType` - -The type of key used to encrypt the data of the disk. For security reasons, it is recommended to set encryptionType to EncryptionAtRestWithPlatformAndCustomerKeys. - -- Required: No -- Type: string -- Default: `'EncryptionAtRestWithPlatformAndCustomerKeys'` -- Allowed: - ```Bicep - [ - 'EncryptionAtRestWithCustomerKey' - 'EncryptionAtRestWithPlatformAndCustomerKeys' - ] - ``` - -### Parameter: `federatedClientId` - -Multi-tenant application client ID to access key vault in a different tenant. Setting the value to "None" will clear the property. - -- Required: No -- Type: string -- Default: `'None'` - -### Parameter: `keyVersion` - -The version of the customer managed key to reference for encryption. If not provided, the latest key version is used. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `location` - -Resource location. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `lock` - -The lock settings of the service. - -- Required: No -- Type: object - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`kind`](#parameter-lockkind) | string | Specify the type of lock. | -| [`name`](#parameter-lockname) | string | Specify the name of lock. | - -### Parameter: `lock.kind` - -Specify the type of lock. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'CanNotDelete' - 'None' - 'ReadOnly' - ] - ``` - -### Parameter: `lock.name` - -Specify the name of lock. - -- Required: No -- Type: string - -### Parameter: `managedIdentities` - -The managed identity definition for this resource. At least one identity type is required. - -- Required: No -- Type: object -- Default: - ```Bicep - { - systemAssigned: true - } - ``` - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. | -| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. | - -### Parameter: `managedIdentities.systemAssigned` - -Enables system assigned managed identity on the resource. - -- Required: No -- Type: bool - -### Parameter: `managedIdentities.userAssignedResourceIds` - -The resource ID(s) to assign to the resource. - -- Required: No -- Type: array - -### Parameter: `roleAssignments` - -Array of role assignments to create. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `rotationToLatestKeyVersionEnabled` - -Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. - -- Required: No -- Type: bool -- Default: `False` - -### Parameter: `tags` - -Tags of the disk encryption resource. - -- Required: No -- Type: object - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `identities` | object | The idenities of the disk encryption set. | -| `keyVaultName` | string | The name of the key vault with the disk encryption key. | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the disk encryption set. | -| `resourceGroupName` | string | The resource group the disk encryption set was deployed into. | -| `resourceId` | string | The resource ID of the disk encryption set. | -| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. | - -## Cross-referenced modules - -This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs). - -| Reference | Type | -| :-- | :-- | -| `modules/key-vault/vault/access-policy` | Local reference | +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/compute/disk-encryption-set/main.bicep b/modules/compute/disk-encryption-set/main.bicep deleted file mode 100644 index c31fc9e4b7..0000000000 --- a/modules/compute/disk-encryption-set/main.bicep +++ /dev/null @@ -1,210 +0,0 @@ -metadata name = 'Disk Encryption Sets' -metadata description = 'This module deploys a Disk Encryption Set.' -metadata owner = 'Azure/module-maintainers' - -@description('Required. The name of the disk encryption set that is being created.') -param name string - -@description('Optional. Resource location.') -param location string = resourceGroup().location - -@description('Optional. The lock settings of the service.') -param lock lockType - -@description('Required. Resource ID of the KeyVault containing the key or secret.') -param keyVaultResourceId string - -@description('Required. Key URL (with version) pointing to a key or secret in KeyVault.') -param keyName string - -@description('Optional. The version of the customer managed key to reference for encryption. If not provided, the latest key version is used.') -param keyVersion string = '' - -@description('Optional. The type of key used to encrypt the data of the disk. For security reasons, it is recommended to set encryptionType to EncryptionAtRestWithPlatformAndCustomerKeys.') -@allowed([ - 'EncryptionAtRestWithCustomerKey' - 'EncryptionAtRestWithPlatformAndCustomerKeys' -]) -param encryptionType string = 'EncryptionAtRestWithPlatformAndCustomerKeys' - -@description('Optional. Multi-tenant application client ID to access key vault in a different tenant. Setting the value to "None" will clear the property.') -param federatedClientId string = 'None' - -@description('Optional. Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.') -param rotationToLatestKeyVersionEnabled bool = false - -@description('Optional. The managed identity definition for this resource. At least one identity type is required.') -param managedIdentities managedIdentitiesType = { - systemAssigned: true -} - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -@description('Optional. Tags of the disk encryption resource.') -param tags object? - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} } - -var identity = !empty(managedIdentities) ? { - type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null) - userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null -} : null - -var builtInRoleNames = { - - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - 'Data Operator for Managed Disks': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e') - 'Disk Backup Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24') - 'Disk Pool Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840') - 'Disk Restore Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13') - 'Disk Snapshot Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource keyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = { - name: last(split(keyVaultResourceId, '/'))! - scope: resourceGroup(split(keyVaultResourceId, '/')[2], split(keyVaultResourceId, '/')[4]) - - resource key 'keys@2021-10-01' existing = { - name: keyName - } -} - -// Note: This is only enabled for user-assigned identities as the service's system-assigned identity isn't available during its initial deployment -module keyVaultPermissions 'modules/nested_keyVaultPermissions.bicep' = [for (userAssignedIdentityResourceId, index) in (managedIdentities.?userAssignedResourceIds ?? []): { - name: '${uniqueString(deployment().name, location)}-DiskEncrSet-KVPermissions-${index}' - params: { - keyName: keyName - keyVaultResourceId: keyVaultResourceId - userAssignedIdentityResourceId: userAssignedIdentityResourceId - rbacAuthorizationEnabled: keyVault.properties.enableRbacAuthorization - } - scope: resourceGroup(split(keyVaultResourceId, '/')[2], split(keyVaultResourceId, '/')[4]) -}] - -resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2022-07-02' = { - name: name - location: location - tags: tags - identity: identity - properties: { - activeKey: { - sourceVault: { - id: keyVaultResourceId - } - keyUrl: !empty(keyVersion) ? '${keyVault::key.properties.keyUri}/${keyVersion}' : keyVault::key.properties.keyUriWithVersion - } - encryptionType: encryptionType - federatedClientId: federatedClientId - rotationToLatestKeyVersionEnabled: rotationToLatestKeyVersionEnabled - } - dependsOn: [ - keyVaultPermissions - ] -} - -resource diskEncryptionSet_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(diskEncryptionSet.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: diskEncryptionSet -}] - -resource diskEncryptionSet_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: diskEncryptionSet -} - -@description('The resource ID of the disk encryption set.') -output resourceId string = diskEncryptionSet.id - -@description('The name of the disk encryption set.') -output name string = diskEncryptionSet.name - -@description('The resource group the disk encryption set was deployed into.') -output resourceGroupName string = resourceGroup().name - -@description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(diskEncryptionSet.identity, 'principalId') ? diskEncryptionSet.identity.principalId : '' - -@description('The idenities of the disk encryption set.') -output identities object = diskEncryptionSet.identity - -@description('The name of the key vault with the disk encryption key.') -output keyVaultName string = last(split(keyVaultResourceId, '/'))! - -@description('The location the resource was deployed into.') -output location string = diskEncryptionSet.location - -// =============== // -// Definitions // -// =============== // - -type managedIdentitiesType = { - @description('Optional. Enables system assigned managed identity on the resource.') - systemAssigned: bool? - - @description('Optional. The resource ID(s) to assign to the resource.') - userAssignedResourceIds: string[]? -} - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/disk-encryption-set/main.json b/modules/compute/disk-encryption-set/main.json deleted file mode 100644 index dbd6c27c6b..0000000000 --- a/modules/compute/disk-encryption-set/main.json +++ /dev/null @@ -1,671 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "3002808940290583221" - }, - "name": "Disk Encryption Sets", - "description": "This module deploys a Disk Encryption Set.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "managedIdentitiesType": { - "type": "object", - "properties": { - "systemAssigned": { - "type": "bool", - "nullable": true, - "metadata": { - "description": "Optional. Enables system assigned managed identity on the resource." - } - }, - "userAssignedResourceIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "metadata": { - "description": "Optional. The resource ID(s) to assign to the resource." - } - } - } - }, - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the disk encryption set that is being created." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Resource location." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "keyVaultResourceId": { - "type": "string", - "metadata": { - "description": "Required. Resource ID of the KeyVault containing the key or secret." - } - }, - "keyName": { - "type": "string", - "metadata": { - "description": "Required. Key URL (with version) pointing to a key or secret in KeyVault." - } - }, - "keyVersion": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, the latest key version is used." - } - }, - "encryptionType": { - "type": "string", - "defaultValue": "EncryptionAtRestWithPlatformAndCustomerKeys", - "allowedValues": [ - "EncryptionAtRestWithCustomerKey", - "EncryptionAtRestWithPlatformAndCustomerKeys" - ], - "metadata": { - "description": "Optional. The type of key used to encrypt the data of the disk. For security reasons, it is recommended to set encryptionType to EncryptionAtRestWithPlatformAndCustomerKeys." - } - }, - "federatedClientId": { - "type": "string", - "defaultValue": "None", - "metadata": { - "description": "Optional. Multi-tenant application client ID to access key vault in a different tenant. Setting the value to \"None\" will clear the property." - } - }, - "rotationToLatestKeyVersionEnabled": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Set this flag to true to enable auto-updating of this disk encryption set to the latest key version." - } - }, - "managedIdentities": { - "$ref": "#/definitions/managedIdentitiesType", - "defaultValue": { - "systemAssigned": true - }, - "metadata": { - "description": "Optional. The managed identity definition for this resource. At least one identity type is required." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the disk encryption resource." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]", - "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]", - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Data Operator for Managed Disks": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e')]", - "Disk Backup Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24')]", - "Disk Pool Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840')]", - "Disk Restore Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13')]", - "Disk Snapshot Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "keyVault::key": { - "existing": true, - "type": "Microsoft.KeyVault/vaults/keys", - "apiVersion": "2021-10-01", - "subscriptionId": "[split(parameters('keyVaultResourceId'), '/')[2]]", - "resourceGroup": "[split(parameters('keyVaultResourceId'), '/')[4]]", - "name": "[format('{0}/{1}', last(split(parameters('keyVaultResourceId'), '/')), parameters('keyName'))]", - "dependsOn": [ - "keyVault" - ] - }, - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "keyVault": { - "existing": true, - "type": "Microsoft.KeyVault/vaults", - "apiVersion": "2021-10-01", - "subscriptionId": "[split(parameters('keyVaultResourceId'), '/')[2]]", - "resourceGroup": "[split(parameters('keyVaultResourceId'), '/')[4]]", - "name": "[last(split(parameters('keyVaultResourceId'), '/'))]" - }, - "diskEncryptionSet": { - "type": "Microsoft.Compute/diskEncryptionSets", - "apiVersion": "2022-07-02", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "identity": "[variables('identity')]", - "properties": { - "activeKey": { - "sourceVault": { - "id": "[parameters('keyVaultResourceId')]" - }, - "keyUrl": "[if(not(empty(parameters('keyVersion'))), format('{0}/{1}', reference('keyVault::key').keyUri, parameters('keyVersion')), reference('keyVault::key').keyUriWithVersion)]" - }, - "encryptionType": "[parameters('encryptionType')]", - "federatedClientId": "[parameters('federatedClientId')]", - "rotationToLatestKeyVersionEnabled": "[parameters('rotationToLatestKeyVersionEnabled')]" - }, - "dependsOn": [ - "keyVault", - "keyVaultPermissions" - ] - }, - "diskEncryptionSet_roleAssignments": { - "copy": { - "name": "diskEncryptionSet_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/diskEncryptionSets/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/diskEncryptionSets', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "diskEncryptionSet" - ] - }, - "diskEncryptionSet_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.Compute/diskEncryptionSets/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "diskEncryptionSet" - ] - }, - "keyVaultPermissions": { - "copy": { - "name": "keyVaultPermissions", - "count": "[length(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()))]" - }, - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-DiskEncrSet-KVPermissions-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", - "subscriptionId": "[split(parameters('keyVaultResourceId'), '/')[2]]", - "resourceGroup": "[split(parameters('keyVaultResourceId'), '/')[4]]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "keyName": { - "value": "[parameters('keyName')]" - }, - "keyVaultResourceId": { - "value": "[parameters('keyVaultResourceId')]" - }, - "userAssignedIdentityResourceId": { - "value": "[coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray())[copyIndex()]]" - }, - "rbacAuthorizationEnabled": { - "value": "[reference('keyVault').enableRbacAuthorization]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "6347916704864142763" - } - }, - "parameters": { - "rbacAuthorizationEnabled": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Required. A boolean to specify whether or not the used Key Vault has RBAC authentication enabled or not." - } - }, - "userAssignedIdentityResourceId": { - "type": "string", - "metadata": { - "description": "Required. The resourceID of the User Assigned Identity to assign permissions to." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Resource location." - } - }, - "keyVaultResourceId": { - "type": "string", - "metadata": { - "description": "Required. Resource ID of the KeyVault containing the key or secret." - } - }, - "keyName": { - "type": "string", - "metadata": { - "description": "Required. Key URL (with version) pointing to a key or secret in KeyVault." - } - } - }, - "resources": [ - { - "condition": "[equals(parameters('rbacAuthorizationEnabled'), true())]", - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.KeyVault/vaults/{0}/keys/{1}', last(split(parameters('keyVaultResourceId'), '/')), parameters('keyName'))]", - "name": "[guid(format('msi-{0}-{1}-{2}-Key-Reader-RoleAssignment', resourceId('Microsoft.KeyVault/vaults/keys', last(split(parameters('keyVaultResourceId'), '/')), parameters('keyName')), parameters('location'), parameters('userAssignedIdentityResourceId')))]", - "properties": { - "principalId": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('userAssignedIdentityResourceId'), '/')[2], split(parameters('userAssignedIdentityResourceId'), '/')[4]), 'Microsoft.Resources/deployments', format('{0}-MSI-Reference', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.principalId.value]", - "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')]", - "principalType": "ServicePrincipal" - }, - "dependsOn": [ - "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('userAssignedIdentityResourceId'), '/')[2], split(parameters('userAssignedIdentityResourceId'), '/')[4]), 'Microsoft.Resources/deployments', format('{0}-MSI-Reference', uniqueString(deployment().name, parameters('location'))))]" - ] - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-MSI-Reference', uniqueString(deployment().name, parameters('location')))]", - "subscriptionId": "[split(parameters('userAssignedIdentityResourceId'), '/')[2]]", - "resourceGroup": "[split(parameters('userAssignedIdentityResourceId'), '/')[4]]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "userAssignedIdentityName": { - "value": "[last(split(parameters('userAssignedIdentityResourceId'), '/'))]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "2571756615431841166" - } - }, - "parameters": { - "userAssignedIdentityName": { - "type": "string", - "metadata": { - "description": "Required. The name of the User Assigned Identity to fetch the principal ID from." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Resource location." - } - } - }, - "resources": [ - { - "type": "Microsoft.ManagedIdentity/userAssignedIdentities", - "apiVersion": "2018-11-30", - "name": "[parameters('userAssignedIdentityName')]", - "location": "[parameters('location')]" - } - ], - "outputs": { - "principalId": { - "type": "string", - "value": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', parameters('userAssignedIdentityName')), '2018-11-30').principalId]" - } - } - } - } - }, - { - "condition": "[not(equals(parameters('rbacAuthorizationEnabled'), true()))]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-DiskEncrSet-KVAccessPolicies', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "keyVaultName": { - "value": "[last(split(parameters('keyVaultResourceId'), '/'))]" - }, - "accessPolicies": { - "value": [ - { - "tenantId": "[subscription().tenantId]", - "objectId": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('userAssignedIdentityResourceId'), '/')[2], split(parameters('userAssignedIdentityResourceId'), '/')[4]), 'Microsoft.Resources/deployments', format('{0}-MSI-Reference', uniqueString(deployment().name, parameters('location')))), '2022-09-01').outputs.principalId.value]", - "permissions": { - "keys": [ - "get", - "wrapKey", - "unwrapKey" - ] - } - } - ] - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "5636934877550105255" - }, - "name": "Key Vault Access Policies", - "description": "This module deploys a Key Vault Access Policy.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "keyVaultName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment." - } - }, - "accessPolicies": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "copy": [ - { - "name": "formattedAccessPolicies", - "count": "[length(parameters('accessPolicies'))]", - "input": { - "applicationId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'applicationId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].applicationId, '')]", - "objectId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'objectId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].objectId, '')]", - "permissions": "[parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].permissions]", - "tenantId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'tenantId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].tenantId, tenant().tenantId)]" - } - } - ] - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.KeyVault/vaults/accessPolicies", - "apiVersion": "2022-07-01", - "name": "[format('{0}/{1}', parameters('keyVaultName'), 'add')]", - "properties": { - "accessPolicies": "[variables('formattedAccessPolicies')]" - } - } - ], - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the resource group the access policies assignment was created in." - }, - "value": "[resourceGroup().name]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the access policies assignment." - }, - "value": "add" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the access policies assignment." - }, - "value": "[resourceId('Microsoft.KeyVault/vaults/accessPolicies', parameters('keyVaultName'), 'add')]" - } - } - } - }, - "dependsOn": [ - "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(parameters('userAssignedIdentityResourceId'), '/')[2], split(parameters('userAssignedIdentityResourceId'), '/')[4]), 'Microsoft.Resources/deployments', format('{0}-MSI-Reference', uniqueString(deployment().name, parameters('location'))))]" - ] - } - ] - } - }, - "dependsOn": [ - "keyVault" - ] - } - }, - "outputs": { - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the disk encryption set." - }, - "value": "[resourceId('Microsoft.Compute/diskEncryptionSets', parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the disk encryption set." - }, - "value": "[parameters('name')]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the disk encryption set was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "systemAssignedMIPrincipalId": { - "type": "string", - "metadata": { - "description": "The principal ID of the system assigned identity." - }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('diskEncryptionSet', '2022-07-02', 'full').identity, 'principalId')), reference('diskEncryptionSet', '2022-07-02', 'full').identity.principalId, '')]" - }, - "identities": { - "type": "object", - "metadata": { - "description": "The idenities of the disk encryption set." - }, - "value": "[reference('diskEncryptionSet', '2022-07-02', 'full').identity]" - }, - "keyVaultName": { - "type": "string", - "metadata": { - "description": "The name of the key vault with the disk encryption key." - }, - "value": "[last(split(parameters('keyVaultResourceId'), '/'))]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('diskEncryptionSet', '2022-07-02', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/disk-encryption-set/modules/nested_keyVaultPermissions.bicep b/modules/compute/disk-encryption-set/modules/nested_keyVaultPermissions.bicep deleted file mode 100644 index 22a719438c..0000000000 --- a/modules/compute/disk-encryption-set/modules/nested_keyVaultPermissions.bicep +++ /dev/null @@ -1,68 +0,0 @@ -@description('Required. A boolean to specify whether or not the used Key Vault has RBAC authentication enabled or not.') -param rbacAuthorizationEnabled bool = true - -@description('Required. The resourceID of the User Assigned Identity to assign permissions to.') -param userAssignedIdentityResourceId string - -@description('Optional. Resource location.') -param location string = resourceGroup().location - -@description('Required. Resource ID of the KeyVault containing the key or secret.') -param keyVaultResourceId string - -@description('Required. Key URL (with version) pointing to a key or secret in KeyVault.') -param keyName string - -resource keyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = { - name: last(split(keyVaultResourceId, '/'))! - - resource key 'keys@2021-10-01' existing = { - name: keyName - } -} - -module userAssignedIdentity 'nested_managedIdentityReference.bicep' = { - name: '${uniqueString(deployment().name, location)}-MSI-Reference' - params: { - userAssignedIdentityName: last(split(userAssignedIdentityResourceId, '/'))! - } - scope: resourceGroup(split(userAssignedIdentityResourceId, '/')[2], split(userAssignedIdentityResourceId, '/')[4]) -} - -// =============== // -// Role Assignment // -// =============== // - -resource keyVaultKeyRBAC 'Microsoft.Authorization/roleAssignments@2022-04-01' = if (rbacAuthorizationEnabled == true) { - name: guid('msi-${keyVault::key.id}-${location}-${userAssignedIdentityResourceId}-Key-Reader-RoleAssignment') - scope: keyVault::key - properties: { - principalId: userAssignedIdentity.outputs.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User - principalType: 'ServicePrincipal' - } -} - -// ============= // -// Access Policy // -// ============= // - -module keyVaultAccessPolicies '../../../key-vault/vault/access-policy/main.bicep' = if (rbacAuthorizationEnabled != true) { - name: '${uniqueString(deployment().name, location)}-DiskEncrSet-KVAccessPolicies' - params: { - keyVaultName: last(split(keyVaultResourceId, '/'))! - accessPolicies: [ - { - tenantId: subscription().tenantId - objectId: userAssignedIdentity.outputs.principalId - permissions: { - keys: [ - 'get' - 'wrapKey' - 'unwrapKey' - ] - } - } - ] - } -} diff --git a/modules/compute/disk-encryption-set/modules/nested_managedIdentityReference.bicep b/modules/compute/disk-encryption-set/modules/nested_managedIdentityReference.bicep deleted file mode 100644 index 970ad5148c..0000000000 --- a/modules/compute/disk-encryption-set/modules/nested_managedIdentityReference.bicep +++ /dev/null @@ -1,12 +0,0 @@ -@description('Required. The name of the User Assigned Identity to fetch the principal ID from.') -param userAssignedIdentityName string - -@description('Optional. Resource location.') -param location string = resourceGroup().location - -resource userAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: userAssignedIdentityName - location: location -} - -output principalId string = userAssignedIdentity.properties.principalId diff --git a/modules/compute/disk-encryption-set/tests/e2e/accessPolicies/dependencies.bicep b/modules/compute/disk-encryption-set/tests/e2e/accessPolicies/dependencies.bicep deleted file mode 100644 index 2024e8644e..0000000000 --- a/modules/compute/disk-encryption-set/tests/e2e/accessPolicies/dependencies.bicep +++ /dev/null @@ -1,51 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: true // Required by disk encryption set - softDeleteRetentionInDays: 7 - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: false - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'keyEncryptionKey' - properties: { - kty: 'RSA' - } - } -} - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The name of the created encryption key.') -output keyName string = keyVault::key.name - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep b/modules/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep deleted file mode 100644 index c7ca375354..0000000000 --- a/modules/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep +++ /dev/null @@ -1,89 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${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 = 'cdesap' - -@description('Generated. Used as a basis for unique resource names.') -param baseTime string = utcNow('u') - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total) - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - keyName: nestedDependencies.outputs.keyName - keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - managedIdentities: { - systemAssigned: true - userAssignedResourceIds: [ - nestedDependencies.outputs.managedIdentityResourceId - ] - } - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk-encryption-set/tests/e2e/max/dependencies.bicep b/modules/compute/disk-encryption-set/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 62321ebe98..0000000000 --- a/modules/compute/disk-encryption-set/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,51 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: true // Required by disk encryption set - softDeleteRetentionInDays: 7 - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'keyEncryptionKey' - properties: { - kty: 'RSA' - } - } -} - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The name of the created encryption key.') -output keyName string = keyVault::key.name - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/compute/disk-encryption-set/tests/e2e/max/main.test.bicep b/modules/compute/disk-encryption-set/tests/e2e/max/main.test.bicep deleted file mode 100644 index 23cb40bc46..0000000000 --- a/modules/compute/disk-encryption-set/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,95 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${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 = 'cdesmax' - -@description('Generated. Used as a basis for unique resource names.') -param baseTime string = utcNow('u') - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total) - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - keyName: nestedDependencies.outputs.keyName - keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - managedIdentities: { - userAssignedResourceIds: [ - nestedDependencies.outputs.managedIdentityResourceId - ] - } - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk-encryption-set/tests/e2e/waf-aligned/dependencies.bicep b/modules/compute/disk-encryption-set/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index 62321ebe98..0000000000 --- a/modules/compute/disk-encryption-set/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,51 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: true // Required by disk encryption set - softDeleteRetentionInDays: 7 - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'keyEncryptionKey' - properties: { - kty: 'RSA' - } - } -} - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The name of the created encryption key.') -output keyName string = keyVault::key.name - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep b/modules/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index f27ccfe1eb..0000000000 --- a/modules/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,78 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${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 = 'cdeswaf' - -@description('Generated. Used as a basis for unique resource names.') -param baseTime string = utcNow('u') - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total) - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - keyName: nestedDependencies.outputs.keyName - keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - managedIdentities: { - userAssignedResourceIds: [ - nestedDependencies.outputs.managedIdentityResourceId - ] - } - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk-encryption-set/version.json b/modules/compute/disk-encryption-set/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/disk-encryption-set/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/disk/README.md b/modules/compute/disk/README.md index 3bc00fac1b..2b313c2934 100644 --- a/modules/compute/disk/README.md +++ b/modules/compute/disk/README.md @@ -1,990 +1,7 @@ -# Compute Disks `[Microsoft.Compute/disks]` +
-
-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": "cdmin001"
- },
- "sku": {
- "value": "Standard_LRS"
- },
- // Non-required parameters
- "diskSizeGB": {
- "value": 1
- },
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Image_
-
-via Bicep module
-
-```bicep
-module disk 'br:bicep/modules/compute.disk:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdimg'
- params: {
- // Required parameters
- name: 'cdimg001'
- sku: 'Standard_LRS'
- // Non-required parameters
- createOption: 'FromImage'
- enableDefaultTelemetry: '
-
-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": "cdimg001"
- },
- "sku": {
- "value": "Standard_LRS"
- },
- // Non-required parameters
- "createOption": {
- "value": "FromImage"
- },
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 3: _Import_
-
-via Bicep module
-
-```bicep
-module disk 'br:bicep/modules/compute.disk:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdimp'
- params: {
- // Required parameters
- name: 'cdimp001'
- sku: 'Standard_LRS'
- // Non-required parameters
- createOption: 'Import'
- enableDefaultTelemetry: '
-
-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": "cdimp001"
- },
- "sku": {
- "value": "Standard_LRS"
- },
- // Non-required parameters
- "createOption": {
- "value": "Import"
- },
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 4: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module disk 'br:bicep/modules/compute.disk:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdmax'
- params: {
- // Required parameters
- name: 'cdmax001'
- sku: 'UltraSSD_LRS'
- // Non-required parameters
- diskIOPSReadWrite: 500
- diskMBpsReadWrite: 60
- diskSizeGB: 128
- enableDefaultTelemetry: '
-
-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": "cdmax001"
- },
- "sku": {
- "value": "UltraSSD_LRS"
- },
- // Non-required parameters
- "diskIOPSReadWrite": {
- "value": 500
- },
- "diskMBpsReadWrite": {
- "value": 60
- },
- "diskSizeGB": {
- "value": 128
- },
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module disk 'br:bicep/modules/compute.disk:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cdwaf'
- params: {
- // Required parameters
- name: 'cdwaf001'
- sku: 'UltraSSD_LRS'
- // Non-required parameters
- diskIOPSReadWrite: 500
- diskMBpsReadWrite: 60
- diskSizeGB: 128
- enableDefaultTelemetry: '
-
-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": "cdwaf001"
- },
- "sku": {
- "value": "UltraSSD_LRS"
- },
- // Non-required parameters
- "diskIOPSReadWrite": {
- "value": 500
- },
- "diskMBpsReadWrite": {
- "value": 60
- },
- "diskSizeGB": {
- "value": 128
- },
- "enableDefaultTelemetry": {
- "value": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`name`](#parameter-name) | string | The name of the disk that is being created. | -| [`sku`](#parameter-sku) | string | The disks sku name. Can be . | - -**Conditional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`diskSizeGB`](#parameter-disksizegb) | int | The size of the disk to create. Required if create option is Empty. | -| [`storageAccountId`](#parameter-storageaccountid) | string | The resource ID of the storage account containing the blob to import as a disk. Required if create option is Import. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`acceleratedNetwork`](#parameter-acceleratednetwork) | bool | True if the image from which the OS disk is created supports accelerated networking. | -| [`architecture`](#parameter-architecture) | string | CPU architecture supported by an OS disk. | -| [`burstingEnabled`](#parameter-burstingenabled) | bool | Set to true to enable bursting beyond the provisioned performance target of the disk. | -| [`completionPercent`](#parameter-completionpercent) | int | Percentage complete for the background copy when a resource is created via the CopyStart operation. | -| [`createOption`](#parameter-createoption) | string | Sources of a disk creation. | -| [`diskIOPSReadWrite`](#parameter-diskiopsreadwrite) | int | The number of IOPS allowed for this disk; only settable for UltraSSD disks. | -| [`diskMBpsReadWrite`](#parameter-diskmbpsreadwrite) | int | The bandwidth allowed for this disk; only settable for UltraSSD disks. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`hyperVGeneration`](#parameter-hypervgeneration) | string | The hypervisor generation of the Virtual Machine. Applicable to OS disks only. | -| [`imageReferenceId`](#parameter-imagereferenceid) | string | A relative uri containing either a Platform Image Repository or user image reference. | -| [`location`](#parameter-location) | string | Resource location. | -| [`lock`](#parameter-lock) | object | The lock settings of the service. | -| [`logicalSectorSize`](#parameter-logicalsectorsize) | int | Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. | -| [`maxShares`](#parameter-maxshares) | int | The maximum number of VMs that can attach to the disk at the same time. Default value is 0. | -| [`networkAccessPolicy`](#parameter-networkaccesspolicy) | string | Policy for accessing the disk via network. | -| [`optimizedForFrequentAttach`](#parameter-optimizedforfrequentattach) | bool | Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. | -| [`osType`](#parameter-ostype) | string | Sources of a disk creation. | -| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Policy for controlling export on the disk. | -| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | -| [`securityDataUri`](#parameter-securitydatauri) | string | If create option is ImportSecure, this is the URI of a blob to be imported into VM guest state. | -| [`sourceResourceId`](#parameter-sourceresourceid) | string | If create option is Copy, this is the ARM ID of the source snapshot or disk. | -| [`sourceUri`](#parameter-sourceuri) | string | If create option is Import, this is the URI of a blob to be imported into a managed disk. | -| [`tags`](#parameter-tags) | object | Tags of the availability set resource. | -| [`uploadSizeBytes`](#parameter-uploadsizebytes) | int | If create option is Upload, this is the size of the contents of the upload including the VHD footer. | - -### Parameter: `name` - -The name of the disk that is being created. - -- Required: Yes -- Type: string - -### Parameter: `sku` - -The disks sku name. Can be . - -- Required: Yes -- Type: string -- Allowed: - ```Bicep - [ - 'Premium_LRS' - 'Premium_ZRS' - 'Premium_ZRS' - 'PremiumV2_LRS' - 'Standard_LRS' - 'StandardSSD_LRS' - 'UltraSSD_LRS' - ] - ``` - -### Parameter: `diskSizeGB` - -The size of the disk to create. Required if create option is Empty. - -- Required: No -- Type: int -- Default: `0` - -### Parameter: `storageAccountId` - -The resource ID of the storage account containing the blob to import as a disk. Required if create option is Import. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `acceleratedNetwork` - -True if the image from which the OS disk is created supports accelerated networking. - -- Required: No -- Type: bool -- Default: `False` - -### Parameter: `architecture` - -CPU architecture supported by an OS disk. - -- Required: No -- Type: string -- Default: `''` -- Allowed: - ```Bicep - [ - '' - 'Arm64' - 'x64' - ] - ``` - -### Parameter: `burstingEnabled` - -Set to true to enable bursting beyond the provisioned performance target of the disk. - -- Required: No -- Type: bool -- Default: `False` - -### Parameter: `completionPercent` - -Percentage complete for the background copy when a resource is created via the CopyStart operation. - -- Required: No -- Type: int -- Default: `100` - -### Parameter: `createOption` - -Sources of a disk creation. - -- Required: No -- Type: string -- Default: `'Empty'` -- Allowed: - ```Bicep - [ - 'Attach' - 'Copy' - 'CopyStart' - 'Empty' - 'FromImage' - 'Import' - 'ImportSecure' - 'Restore' - 'Upload' - 'UploadPreparedSecure' - ] - ``` - -### Parameter: `diskIOPSReadWrite` - -The number of IOPS allowed for this disk; only settable for UltraSSD disks. - -- Required: No -- Type: int -- Default: `0` - -### Parameter: `diskMBpsReadWrite` - -The bandwidth allowed for this disk; only settable for UltraSSD disks. - -- Required: No -- Type: int -- Default: `0` - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `hyperVGeneration` - -The hypervisor generation of the Virtual Machine. Applicable to OS disks only. - -- Required: No -- Type: string -- Default: `'V2'` -- Allowed: - ```Bicep - [ - 'V1' - 'V2' - ] - ``` - -### Parameter: `imageReferenceId` - -A relative uri containing either a Platform Image Repository or user image reference. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `location` - -Resource location. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `lock` - -The lock settings of the service. - -- Required: No -- Type: object - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`kind`](#parameter-lockkind) | string | Specify the type of lock. | -| [`name`](#parameter-lockname) | string | Specify the name of lock. | - -### Parameter: `lock.kind` - -Specify the type of lock. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'CanNotDelete' - 'None' - 'ReadOnly' - ] - ``` - -### Parameter: `lock.name` - -Specify the name of lock. - -- Required: No -- Type: string - -### Parameter: `logicalSectorSize` - -Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. - -- Required: No -- Type: int -- Default: `4096` - -### Parameter: `maxShares` - -The maximum number of VMs that can attach to the disk at the same time. Default value is 0. - -- Required: No -- Type: int -- Default: `1` - -### Parameter: `networkAccessPolicy` - -Policy for accessing the disk via network. - -- Required: No -- Type: string -- Default: `'DenyAll'` -- Allowed: - ```Bicep - [ - 'AllowAll' - 'AllowPrivate' - 'DenyAll' - ] - ``` - -### Parameter: `optimizedForFrequentAttach` - -Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. - -- Required: No -- Type: bool -- Default: `False` - -### Parameter: `osType` - -Sources of a disk creation. - -- Required: No -- Type: string -- Default: `''` -- Allowed: - ```Bicep - [ - '' - 'Linux' - 'Windows' - ] - ``` - -### Parameter: `publicNetworkAccess` - -Policy for controlling export on the disk. - -- Required: No -- Type: string -- Default: `'Disabled'` -- Allowed: - ```Bicep - [ - 'Disabled' - 'Enabled' - ] - ``` - -### Parameter: `roleAssignments` - -Array of role assignments to create. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `securityDataUri` - -If create option is ImportSecure, this is the URI of a blob to be imported into VM guest state. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `sourceResourceId` - -If create option is Copy, this is the ARM ID of the source snapshot or disk. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `sourceUri` - -If create option is Import, this is the URI of a blob to be imported into a managed disk. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `tags` - -Tags of the availability set resource. - -- Required: No -- Type: object - -### Parameter: `uploadSizeBytes` - -If create option is Upload, this is the size of the contents of the upload including the VHD footer. - -- Required: No -- Type: int -- Default: `20972032` - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the disk. | -| `resourceGroupName` | string | The resource group the disk was deployed into. | -| `resourceId` | string | The resource ID of the disk. | - -## Cross-referenced modules - -_None_ +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/compute/disk/main.bicep b/modules/compute/disk/main.bicep deleted file mode 100644 index 7989977bb4..0000000000 --- a/modules/compute/disk/main.bicep +++ /dev/null @@ -1,264 +0,0 @@ -metadata name = 'Compute Disks' -metadata description = 'This module deploys a Compute Disk' -metadata owner = 'Azure/module-maintainers' - -@description('Required. The name of the disk that is being created.') -param name string - -@description('Optional. Resource location.') -param location string = resourceGroup().location - -@allowed([ - 'Standard_LRS' - 'Premium_LRS' - 'StandardSSD_LRS' - 'UltraSSD_LRS' - 'Premium_ZRS' - 'Premium_ZRS' - 'PremiumV2_LRS' -]) -@description('Required. The disks sku name. Can be .') -param sku string - -@allowed([ - 'x64' - 'Arm64' - '' -]) -@description('Optional. CPU architecture supported by an OS disk.') -param architecture string = '' - -@description('Optional. Set to true to enable bursting beyond the provisioned performance target of the disk.') -param burstingEnabled bool = false - -@description('Optional. Percentage complete for the background copy when a resource is created via the CopyStart operation.') -param completionPercent int = 100 - -@allowed([ - 'Attach' - 'Copy' - 'CopyStart' - 'Empty' - 'FromImage' - 'Import' - 'ImportSecure' - 'Restore' - 'Upload' - 'UploadPreparedSecure' -]) -@description('Optional. Sources of a disk creation.') -param createOption string = 'Empty' - -@description('Optional. A relative uri containing either a Platform Image Repository or user image reference.') -param imageReferenceId string = '' - -@description('Optional. Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096.') -param logicalSectorSize int = 4096 - -@description('Optional. If create option is ImportSecure, this is the URI of a blob to be imported into VM guest state.') -param securityDataUri string = '' - -@description('Optional. If create option is Copy, this is the ARM ID of the source snapshot or disk.') -param sourceResourceId string = '' - -@description('Optional. If create option is Import, this is the URI of a blob to be imported into a managed disk.') -param sourceUri string = '' - -@description('Conditional. The resource ID of the storage account containing the blob to import as a disk. Required if create option is Import.') -param storageAccountId string = '' - -@description('Optional. If create option is Upload, this is the size of the contents of the upload including the VHD footer.') -param uploadSizeBytes int = 20972032 - -@description('Conditional. The size of the disk to create. Required if create option is Empty.') -param diskSizeGB int = 0 - -@description('Optional. The number of IOPS allowed for this disk; only settable for UltraSSD disks.') -param diskIOPSReadWrite int = 0 - -@description('Optional. The bandwidth allowed for this disk; only settable for UltraSSD disks.') -param diskMBpsReadWrite int = 0 - -@allowed([ - 'V1' - 'V2' -]) -@description('Optional. The hypervisor generation of the Virtual Machine. Applicable to OS disks only.') -param hyperVGeneration string = 'V2' - -@description('Optional. The maximum number of VMs that can attach to the disk at the same time. Default value is 0.') -param maxShares int = 1 - -@allowed([ - 'AllowAll' - 'AllowPrivate' - 'DenyAll' -]) -@description('Optional. Policy for accessing the disk via network.') -param networkAccessPolicy string = 'DenyAll' - -@description('Optional. Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.') -param optimizedForFrequentAttach bool = false - -@allowed([ - 'Windows' - 'Linux' - '' -]) -@description('Optional. Sources of a disk creation.') -param osType string = '' - -@allowed([ - 'Disabled' - 'Enabled' -]) -@description('Optional. Policy for controlling export on the disk.') -param publicNetworkAccess string = 'Disabled' - -@description('Optional. True if the image from which the OS disk is created supports accelerated networking.') -param acceleratedNetwork bool = false - -@description('Optional. The lock settings of the service.') -param lock lockType - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -@description('Optional. Tags of the availability set resource.') -param tags object? - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - 'Data Operator for Managed Disks': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e') - 'Disk Backup Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24') - 'Disk Pool Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840') - 'Disk Restore Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13') - 'Disk Snapshot Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource disk 'Microsoft.Compute/disks@2022-07-02' = { - name: name - location: location - tags: tags - sku: { - name: sku - } - properties: { - burstingEnabled: burstingEnabled - completionPercent: completionPercent - creationData: { - createOption: createOption - imageReference: createOption != 'FromImage' ? null : { - id: imageReferenceId - } - logicalSectorSize: contains(sku, 'Ultra') ? logicalSectorSize : null - securityDataUri: createOption == 'ImportSecure' ? securityDataUri : null - sourceResourceId: createOption == 'Copy' ? sourceResourceId : null - sourceUri: createOption == 'Import' ? sourceUri : null - storageAccountId: createOption == 'Import' ? storageAccountId : null - uploadSizeBytes: createOption == 'Upload' ? uploadSizeBytes : null - } - diskIOPSReadWrite: contains(sku, 'Ultra') ? diskIOPSReadWrite : null - diskMBpsReadWrite: contains(sku, 'Ultra') ? diskMBpsReadWrite : null - diskSizeGB: createOption == 'Empty' ? diskSizeGB : null - hyperVGeneration: empty(osType) ? null : hyperVGeneration - maxShares: maxShares - networkAccessPolicy: networkAccessPolicy - optimizedForFrequentAttach: optimizedForFrequentAttach - osType: empty(osType) ? any(null) : osType - publicNetworkAccess: publicNetworkAccess - supportedCapabilities: empty(osType) ? {} : { - acceleratedNetwork: acceleratedNetwork - architecture: empty(architecture) ? null : architecture - } - } -} - -resource disk_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: disk -} - -resource disk_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(disk.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: disk -}] - -@description('The resource group the disk was deployed into.') -output resourceGroupName string = resourceGroup().name - -@description('The resource ID of the disk.') -output resourceId string = disk.id - -@description('The name of the disk.') -output name string = disk.name - -@description('The location the resource was deployed into.') -output location string = disk.location - -// =============== // -// Definitions // -// =============== // - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/disk/main.json b/modules/compute/disk/main.json deleted file mode 100644 index 37e7361de7..0000000000 --- a/modules/compute/disk/main.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "8419179965275134660" - }, - "name": "Compute Disks", - "description": "This module deploys a Compute Disk", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the disk that is being created." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Resource location." - } - }, - "sku": { - "type": "string", - "allowedValues": [ - "Standard_LRS", - "Premium_LRS", - "StandardSSD_LRS", - "UltraSSD_LRS", - "Premium_ZRS", - "Premium_ZRS", - "PremiumV2_LRS" - ], - "metadata": { - "description": "Required. The disks sku name. Can be ." - } - }, - "architecture": { - "type": "string", - "defaultValue": "", - "allowedValues": [ - "x64", - "Arm64", - "" - ], - "metadata": { - "description": "Optional. CPU architecture supported by an OS disk." - } - }, - "burstingEnabled": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Set to true to enable bursting beyond the provisioned performance target of the disk." - } - }, - "completionPercent": { - "type": "int", - "defaultValue": 100, - "metadata": { - "description": "Optional. Percentage complete for the background copy when a resource is created via the CopyStart operation." - } - }, - "createOption": { - "type": "string", - "defaultValue": "Empty", - "allowedValues": [ - "Attach", - "Copy", - "CopyStart", - "Empty", - "FromImage", - "Import", - "ImportSecure", - "Restore", - "Upload", - "UploadPreparedSecure" - ], - "metadata": { - "description": "Optional. Sources of a disk creation." - } - }, - "imageReferenceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. A relative uri containing either a Platform Image Repository or user image reference." - } - }, - "logicalSectorSize": { - "type": "int", - "defaultValue": 4096, - "metadata": { - "description": "Optional. Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096." - } - }, - "securityDataUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. If create option is ImportSecure, this is the URI of a blob to be imported into VM guest state." - } - }, - "sourceResourceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. If create option is Copy, this is the ARM ID of the source snapshot or disk." - } - }, - "sourceUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. If create option is Import, this is the URI of a blob to be imported into a managed disk." - } - }, - "storageAccountId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Conditional. The resource ID of the storage account containing the blob to import as a disk. Required if create option is Import." - } - }, - "uploadSizeBytes": { - "type": "int", - "defaultValue": 20972032, - "metadata": { - "description": "Optional. If create option is Upload, this is the size of the contents of the upload including the VHD footer." - } - }, - "diskSizeGB": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "Conditional. The size of the disk to create. Required if create option is Empty." - } - }, - "diskIOPSReadWrite": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "Optional. The number of IOPS allowed for this disk; only settable for UltraSSD disks." - } - }, - "diskMBpsReadWrite": { - "type": "int", - "defaultValue": 0, - "metadata": { - "description": "Optional. The bandwidth allowed for this disk; only settable for UltraSSD disks." - } - }, - "hyperVGeneration": { - "type": "string", - "defaultValue": "V2", - "allowedValues": [ - "V1", - "V2" - ], - "metadata": { - "description": "Optional. The hypervisor generation of the Virtual Machine. Applicable to OS disks only." - } - }, - "maxShares": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "Optional. The maximum number of VMs that can attach to the disk at the same time. Default value is 0." - } - }, - "networkAccessPolicy": { - "type": "string", - "defaultValue": "DenyAll", - "allowedValues": [ - "AllowAll", - "AllowPrivate", - "DenyAll" - ], - "metadata": { - "description": "Optional. Policy for accessing the disk via network." - } - }, - "optimizedForFrequentAttach": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine." - } - }, - "osType": { - "type": "string", - "defaultValue": "", - "allowedValues": [ - "Windows", - "Linux", - "" - ], - "metadata": { - "description": "Optional. Sources of a disk creation." - } - }, - "publicNetworkAccess": { - "type": "string", - "defaultValue": "Disabled", - "allowedValues": [ - "Disabled", - "Enabled" - ], - "metadata": { - "description": "Optional. Policy for controlling export on the disk." - } - }, - "acceleratedNetwork": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. True if the image from which the OS disk is created supports accelerated networking." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the availability set resource." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Data Operator for Managed Disks": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e')]", - "Disk Backup Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24')]", - "Disk Pool Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840')]", - "Disk Restore Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13')]", - "Disk Snapshot Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "disk": { - "type": "Microsoft.Compute/disks", - "apiVersion": "2022-07-02", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "sku": { - "name": "[parameters('sku')]" - }, - "properties": { - "burstingEnabled": "[parameters('burstingEnabled')]", - "completionPercent": "[parameters('completionPercent')]", - "creationData": { - "createOption": "[parameters('createOption')]", - "imageReference": "[if(not(equals(parameters('createOption'), 'FromImage')), null(), createObject('id', parameters('imageReferenceId')))]", - "logicalSectorSize": "[if(contains(parameters('sku'), 'Ultra'), parameters('logicalSectorSize'), null())]", - "securityDataUri": "[if(equals(parameters('createOption'), 'ImportSecure'), parameters('securityDataUri'), null())]", - "sourceResourceId": "[if(equals(parameters('createOption'), 'Copy'), parameters('sourceResourceId'), null())]", - "sourceUri": "[if(equals(parameters('createOption'), 'Import'), parameters('sourceUri'), null())]", - "storageAccountId": "[if(equals(parameters('createOption'), 'Import'), parameters('storageAccountId'), null())]", - "uploadSizeBytes": "[if(equals(parameters('createOption'), 'Upload'), parameters('uploadSizeBytes'), null())]" - }, - "diskIOPSReadWrite": "[if(contains(parameters('sku'), 'Ultra'), parameters('diskIOPSReadWrite'), null())]", - "diskMBpsReadWrite": "[if(contains(parameters('sku'), 'Ultra'), parameters('diskMBpsReadWrite'), null())]", - "diskSizeGB": "[if(equals(parameters('createOption'), 'Empty'), parameters('diskSizeGB'), null())]", - "hyperVGeneration": "[if(empty(parameters('osType')), null(), parameters('hyperVGeneration'))]", - "maxShares": "[parameters('maxShares')]", - "networkAccessPolicy": "[parameters('networkAccessPolicy')]", - "optimizedForFrequentAttach": "[parameters('optimizedForFrequentAttach')]", - "osType": "[if(empty(parameters('osType')), null(), parameters('osType'))]", - "publicNetworkAccess": "[parameters('publicNetworkAccess')]", - "supportedCapabilities": "[if(empty(parameters('osType')), createObject(), createObject('acceleratedNetwork', parameters('acceleratedNetwork'), 'architecture', if(empty(parameters('architecture')), null(), parameters('architecture'))))]" - } - }, - "disk_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.Compute/disks/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "disk" - ] - }, - "disk_roleAssignments": { - "copy": { - "name": "disk_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/disks/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/disks', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "disk" - ] - } - }, - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the disk was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the disk." - }, - "value": "[resourceId('Microsoft.Compute/disks', parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the disk." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('disk', '2022-07-02', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/disk/tests/e2e/defaults/main.test.bicep b/modules/compute/disk/tests/e2e/defaults/main.test.bicep deleted file mode 100644 index 95b44f7771..0000000000 --- a/modules/compute/disk/tests/e2e/defaults/main.test.bicep +++ /dev/null @@ -1,50 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using only defaults' -metadata description = 'This instance deploys the module with the minimum set of required parameters.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'cdmin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-${serviceShort}001' - sku: 'Standard_LRS' - diskSizeGB: 1 - } -}] diff --git a/modules/compute/disk/tests/e2e/image/dependencies.bicep b/modules/compute/disk/tests/e2e/image/dependencies.bicep deleted file mode 100644 index 616cf219fe..0000000000 --- a/modules/compute/disk/tests/e2e/image/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/disk/tests/e2e/image/main.test.bicep b/modules/compute/disk/tests/e2e/image/main.test.bicep deleted file mode 100644 index 67fd259073..0000000000 --- a/modules/compute/disk/tests/e2e/image/main.test.bicep +++ /dev/null @@ -1,78 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'cdimg' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-${serviceShort}001' - sku: 'Standard_LRS' - createOption: 'FromImage' - imageReferenceId: '${subscription().id}/Providers/Microsoft.Compute/Locations/westeurope/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-azure-edition/Versions/20348.1006.220908' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk/tests/e2e/import/dependencies.bicep b/modules/compute/disk/tests/e2e/import/dependencies.bicep deleted file mode 100644 index aa2912f2ec..0000000000 --- a/modules/compute/disk/tests/e2e/import/dependencies.bicep +++ /dev/null @@ -1,152 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Storage Account to create and to copy the VHD into.') -param storageAccountName string - -@description('Required. The name prefix of the Image Template to create.') -param imageTemplateNamePrefix string - -@description('Generated. Do not provide a value! This date value is used to generate a unique image template name.') -param baseTime string = utcNow('yyyy-MM-dd-HH-mm-ss') - -@description('Required. The name of the Deployment Script to create for triggering the image creation.') -param triggerImageDeploymentScriptName string - -@description('Required. The name of the Deployment Script to copy the VHD to a destination storage account.') -param copyVhdDeploymentScriptName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { - name: storageAccountName - location: location - kind: 'StorageV2' - sku: { - name: 'Standard_LRS' - } - properties: { - allowBlobPublicAccess: false - } - resource blobServices 'blobServices@2022-09-01' = { - name: 'default' - resource container 'containers@2022-09-01' = { - name: 'vhds' - properties: { - publicAccess: 'None' - } - } - } -} - -module roleAssignment 'dependencies_rbac.bicep' = { - name: '${deployment().name}-MSI-roleAssignment' - scope: subscription() - params: { - managedIdentityPrincipalId: managedIdentity.properties.principalId - managedIdentityResourceId: managedIdentity.id - } -} - -// Deploy image template -resource imageTemplate 'Microsoft.VirtualMachineImages/imageTemplates@2022-02-14' = { - name: '${imageTemplateNamePrefix}-${baseTime}' - location: location - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - buildTimeoutInMinutes: 0 - vmProfile: { - vmSize: 'Standard_D2s_v3' - osDiskSizeGB: 127 - } - source: { - type: 'PlatformImage' - publisher: 'MicrosoftWindowsDesktop' - offer: 'Windows-11' - sku: 'win11-21h2-avd' - version: 'latest' - } - distribute: [ - { - type: 'VHD' - runOutputName: '${imageTemplateNamePrefix}-VHD' - artifactTags: {} - } - ] - customize: [ - { - restartTimeout: '30m' - type: 'WindowsRestart' - } - ] - } -} - -// Trigger VHD creation -resource triggerImageDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: triggerImageDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ImageTemplateName \\"${imageTemplate.name}\\" -ImageTemplateResourceGroup \\"${resourceGroup().name}\\"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Start-ImageTemplate.ps1') - cleanupPreference: 'OnSuccess' - forceUpdateTag: baseTime - } - dependsOn: [ - roleAssignment - ] -} - -// Copy VHD to destination storage account -resource copyVhdDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: copyVhdDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ImageTemplateName \\"${imageTemplate.name}\\" -ImageTemplateResourceGroup \\"${resourceGroup().name}\\" -DestinationStorageAccountName \\"${storageAccount.name}\\" -VhdName \\"${imageTemplateNamePrefix}\\" -WaitForComplete' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Copy-VhdToStorageAccount.ps1') - cleanupPreference: 'OnSuccess' - forceUpdateTag: baseTime - } - dependsOn: [ triggerImageDeploymentScript ] -} - -@description('The URI of the created VHD.') -output vhdUri string = 'https://${storageAccount.name}.blob.${environment().suffixes.storage}/vhds/${imageTemplateNamePrefix}.vhd' - -@description('The resource ID of the created Storage Account.') -output storageAccountResourceId string = storageAccount.id - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/compute/disk/tests/e2e/import/dependencies_rbac.bicep b/modules/compute/disk/tests/e2e/import/dependencies_rbac.bicep deleted file mode 100644 index cdca1b63bd..0000000000 --- a/modules/compute/disk/tests/e2e/import/dependencies_rbac.bicep +++ /dev/null @@ -1,16 +0,0 @@ -targetScope = 'subscription' - -@description('Required. The resource ID of the created Managed Identity.') -param managedIdentityResourceId string - -@description('Required. The principal ID of the created Managed Identity.') -param managedIdentityPrincipalId string - -resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(subscription().subscriptionId, 'Contributor', managedIdentityResourceId) - properties: { - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalId: managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } -} diff --git a/modules/compute/disk/tests/e2e/import/main.test.bicep b/modules/compute/disk/tests/e2e/import/main.test.bicep deleted file mode 100644 index 0622d78455..0000000000 --- a/modules/compute/disk/tests/e2e/import/main.test.bicep +++ /dev/null @@ -1,83 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'cdimp' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - storageAccountName: 'dep${namePrefix}sa${serviceShort}01' - imageTemplateNamePrefix: 'dep-${namePrefix}-imgt-${serviceShort}' - triggerImageDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-triggerImageTemplate' - copyVhdDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-copyVhdToStorage' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-${serviceShort}001' - sku: 'Standard_LRS' - createOption: 'Import' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sourceUri: nestedDependencies.outputs.vhdUri - storageAccountId: nestedDependencies.outputs.storageAccountResourceId - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk/tests/e2e/max/dependencies.bicep b/modules/compute/disk/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 616cf219fe..0000000000 --- a/modules/compute/disk/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/disk/tests/e2e/max/main.test.bicep b/modules/compute/disk/tests/e2e/max/main.test.bicep deleted file mode 100644 index 25ab818edd..0000000000 --- a/modules/compute/disk/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,89 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'cdmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-${serviceShort}001' - sku: 'UltraSSD_LRS' - diskIOPSReadWrite: 500 - diskMBpsReadWrite: 60 - diskSizeGB: 128 - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - logicalSectorSize: 512 - osType: 'Windows' - publicNetworkAccess: 'Enabled' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk/tests/e2e/waf-aligned/dependencies.bicep b/modules/compute/disk/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index 616cf219fe..0000000000 --- a/modules/compute/disk/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created managed identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/disk/tests/e2e/waf-aligned/main.test.bicep b/modules/compute/disk/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index e22035fb5e..0000000000 --- a/modules/compute/disk/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,72 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'cdwaf' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-${serviceShort}001' - sku: 'UltraSSD_LRS' - diskIOPSReadWrite: 500 - diskMBpsReadWrite: 60 - diskSizeGB: 128 - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - logicalSectorSize: 512 - osType: 'Windows' - publicNetworkAccess: 'Enabled' - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/disk/version.json b/modules/compute/disk/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/disk/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/gallery/README.md b/modules/compute/gallery/README.md index b23170f00f..87f694ea4f 100644 --- a/modules/compute/gallery/README.md +++ b/modules/compute/gallery/README.md @@ -1,948 +1,7 @@ -# Azure Compute Galleries `[Microsoft.Compute/galleries]` +
-
-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": "cgmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module gallery 'br:bicep/modules/compute.gallery:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cgmax'
- params: {
- // Required parameters
- name: 'cgmax001'
- // Non-required parameters
- applications: [
- {
- name: 'cgmax-appd-001'
- }
- {
- name: 'cgmax-appd-002'
- roleAssignments: [
- {
- principalId: '
-
-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": "cgmax001"
- },
- // Non-required parameters
- "applications": {
- "value": [
- {
- "name": "cgmax-appd-001"
- },
- {
- "name": "cgmax-appd-002",
- "roleAssignments": [
- {
- "principalId": "
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module gallery 'br:bicep/modules/compute.gallery:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cgwaf'
- params: {
- // Required parameters
- name: 'cgwaf001'
- // Non-required parameters
- applications: [
- {
- name: 'cgwaf-appd-001'
- }
- {
- name: 'cgwaf-appd-002'
- roleAssignments: [
- {
- principalId: '
-
-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": "cgwaf001"
- },
- // Non-required parameters
- "applications": {
- "value": [
- {
- "name": "cgwaf-appd-001"
- },
- {
- "name": "cgwaf-appd-002",
- "roleAssignments": [
- {
- "principalId": "
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Azure Compute Gallery. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applications`](#parameter-applications) | array | Applications to create. |
-| [`description`](#parameter-description) | string | Description of the Azure Shared Image Gallery. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`images`](#parameter-images) | array | Images to create. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Tags for all resources. |
-
-### Parameter: `name`
-
-Name of the Azure Compute Gallery.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `applications`
-
-Applications to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-Description of the Azure Shared Image Gallery.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `images`
-
-Images to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags for all resources.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed image gallery. |
-| `resourceGroupName` | string | The resource group of the deployed image gallery. |
-| `resourceId` | string | The resource ID of the deployed image gallery. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/compute/gallery/application/README.md b/modules/compute/gallery/application/README.md
deleted file mode 100644
index e07919f955..0000000000
--- a/modules/compute/gallery/application/README.md
+++ /dev/null
@@ -1,352 +0,0 @@
-# Compute Galleries Applications `[Microsoft.Compute/galleries/applications]`
-
-This module deploys an Azure Compute Gallery Application.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Compute/galleries/applications` | [2022-03-03](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Compute/2022-03-03/galleries/applications) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the application definition. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`galleryName`](#parameter-galleryname) | string | The name of the parent Azure Compute Gallery. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`customActions`](#parameter-customactions) | array | A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. |
-| [`description`](#parameter-description) | string | The description of this gallery Application Definition resource. This property is updatable. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`endOfLifeDate`](#parameter-endoflifedate) | string | The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z. |
-| [`eula`](#parameter-eula) | string | The Eula agreement for the gallery Application Definition. Has to be a valid URL. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`privacyStatementUri`](#parameter-privacystatementuri) | string | The privacy statement uri. Has to be a valid URL. |
-| [`releaseNoteUri`](#parameter-releasenoteuri) | string | The release note uri. Has to be a valid URL. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`supportedOSType`](#parameter-supportedostype) | string | This property allows you to specify the supported type of the OS that application is built for. |
-| [`tags`](#parameter-tags) | object | Tags for all resources. |
-
-### Parameter: `name`
-
-Name of the application definition.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `galleryName`
-
-The name of the parent Azure Compute Gallery. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customActions`
-
-A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-The description of this gallery Application Definition resource. This property is updatable.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `endOfLifeDate`
-
-The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `eula`
-
-The Eula agreement for the gallery Application Definition. Has to be a valid URL.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `privacyStatementUri`
-
-The privacy statement uri. Has to be a valid URL.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `releaseNoteUri`
-
-The release note uri. Has to be a valid URL.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `supportedOSType`
-
-This property allows you to specify the supported type of the OS that application is built for.
-
-- Required: No
-- Type: string
-- Default: `'Windows'`
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags for all resources.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the image. |
-| `resourceGroupName` | string | The resource group the image was deployed into. |
-| `resourceId` | string | The resource ID of the image. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `customActions`
-
-Create a list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.
-
-Parameter JSON format
-
-```json
-"customActions": {
- "value": [
- {
- "description": "This is a sample custom action",
- "name": "Name of the custom action 1 (Required). Must be unique within the Compute Gallery",
- "parameters": [
- {
- "defaultValue": "Default Value of Parameter1. Only applies to string types.",
- "description": "a description value to help others understands what it means.",
- "name": "The parameter name. (Required)",
- "required": True,
- "type": "ConfigurationDataBlob, LogOutputBlob, or String"
- },
- {
- "defaultValue": "Default Value of Parameter2. Only applies to string types.",
- "description": "a description value to help others understands what it means.",
- "name": "The parameter name. (Required)",
- "required": False,
- "type": "ConfigurationDataBlob, LogOutputBlob, or String"
- }
- ],
- "script": "The script to run when executing this custom action. (Required)"
- },
- {
- "description": "This is another sample custom action",
- "name": "Name of the custom action 2 (Required). Must be unique within the Compute Gallery",
- "parameters": [
- {
- "defaultValue": "Default Value of Parameter1. Only applies to string types.",
- "description": "a description value to help others understands what it means.",
- "name": "The parameter name. (Required)",
- "required": True,
- "type": "ConfigurationDataBlob, LogOutputBlob, or String"
- }
- ],
- "script": "The script to run when executing this custom action. (Required)"
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-customActions: [
- {
- description: "This is a sample custom action"
- name: "Name of the custom action 1 (Required). Must be unique within the Compute Gallery"
- parameters: [
- {
- defaultValue: "Default Value of Parameter 1. Only applies to string types."
- description: "a description value to help others understands what it means."
- name: "The parameter name. (Required)"
- required: True,
- type: "ConfigurationDataBlob, LogOutputBlob, or String"
- }
- {
- defaultValue: "Default Value of Parameter 2. Only applies to string types."
- description: "a description value to help others understands what it means."
- name: "The parameter name. (Required)"
- required: True,
- type: "ConfigurationDataBlob, LogOutputBlob, or String"
- }
- ]
- script: "The script to run when executing this custom action. (Required)"
- }
- {
- description: "This is another sample custom action"
- name: "Name of the custom action 2 (Required). Must be unique within the Compute Gallery"
- parameters: [
- {
- defaultValue: "Default Value of Parameter. Only applies to string types."
- description: "a description value to help others understands what it means."
- name: "The paramter name. (Required)"
- required: True,
- type: "ConfigurationDataBlob, LogOutputBlob, or String"
- }
- ]
- script: "The script to run when executing this custom action. (Required)"
- }
-]
-```
-
-
diff --git a/modules/compute/gallery/application/main.bicep b/modules/compute/gallery/application/main.bicep deleted file mode 100644 index dcb745225b..0000000000 --- a/modules/compute/gallery/application/main.bicep +++ /dev/null @@ -1,140 +0,0 @@ -metadata name = 'Compute Galleries Applications' -metadata description = 'This module deploys an Azure Compute Gallery Application.' -metadata owner = 'Azure/module-maintainers' - -@sys.description('Required. Name of the application definition.') -param name string - -@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@sys.description('Optional. Location for all resources.') -param location string = resourceGroup().location - -@sys.description('Conditional. The name of the parent Azure Compute Gallery. Required if the template is used in a standalone deployment.') -@minLength(1) -param galleryName string - -@sys.description('Optional. The description of this gallery Application Definition resource. This property is updatable.') -param description string = '' - -@sys.description('Optional. The Eula agreement for the gallery Application Definition. Has to be a valid URL.') -param eula string = '' - -@sys.description('Optional. The privacy statement uri. Has to be a valid URL.') -param privacyStatementUri string = '' - -@sys.description('Optional. The release note uri. Has to be a valid URL.') -param releaseNoteUri string = '' - -@sys.description('Optional. This property allows you to specify the supported type of the OS that application is built for.') -@allowed([ - 'Windows' - 'Linux' -]) -param supportedOSType string = 'Windows' - -@sys.description('Optional. The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z.') -param endOfLifeDate string = '' - -@sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') -param roleAssignments roleAssignmentType - -@sys.description('Optional. Tags for all resources.') -param tags object? - -@sys.description('Optional. A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.') -param customActions array = [] - -var builtInRoleNames = { - 'Compute Gallery Sharing Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b') - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource gallery 'Microsoft.Compute/galleries@2022-03-03' existing = { - name: galleryName -} - -resource application 'Microsoft.Compute/galleries/applications@2022-03-03' = { - name: name - parent: gallery - location: location - tags: tags - properties: { - customActions: !empty(customActions) ? customActions : null - description: description - endOfLifeDate: endOfLifeDate - eula: eula - privacyStatementUri: privacyStatementUri - releaseNoteUri: releaseNoteUri - supportedOSType: supportedOSType - } -} - -resource application_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(application.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: application -}] - -@sys.description('The resource group the image was deployed into.') -output resourceGroupName string = resourceGroup().name - -@sys.description('The resource ID of the image.') -output resourceId string = application.id - -@sys.description('The name of the image.') -output name string = application.name - -@sys.description('The location the resource was deployed into.') -output location string = application.location -// =============== // -// Definitions // -// =============== // - -type roleAssignmentType = { - @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.') - roleDefinitionIdOrName: string - - @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @sys.description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @sys.description('Optional. The description of the role assignment.') - description: string? - - @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @sys.description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @sys.description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/gallery/application/main.json b/modules/compute/gallery/application/main.json deleted file mode 100644 index 173a43d0c8..0000000000 --- a/modules/compute/gallery/application/main.json +++ /dev/null @@ -1,281 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "13733131047823769084" - }, - "name": "Compute Galleries Applications", - "description": "This module deploys an Azure Compute Gallery Application.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. Name of the application definition." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "galleryName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Conditional. The name of the parent Azure Compute Gallery. Required if the template is used in a standalone deployment." - } - }, - "description": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The description of this gallery Application Definition resource. This property is updatable." - } - }, - "eula": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The Eula agreement for the gallery Application Definition. Has to be a valid URL." - } - }, - "privacyStatementUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The privacy statement uri. Has to be a valid URL." - } - }, - "releaseNoteUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The release note uri. Has to be a valid URL." - } - }, - "supportedOSType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "Optional. This property allows you to specify the supported type of the OS that application is built for." - } - }, - "endOfLifeDate": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags for all resources." - } - }, - "customActions": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application." - } - } - }, - "variables": { - "builtInRoleNames": { - "Compute Gallery Sharing Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b')]", - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "gallery": { - "existing": true, - "type": "Microsoft.Compute/galleries", - "apiVersion": "2022-03-03", - "name": "[parameters('galleryName')]" - }, - "application": { - "type": "Microsoft.Compute/galleries/applications", - "apiVersion": "2022-03-03", - "name": "[format('{0}/{1}', parameters('galleryName'), parameters('name'))]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "customActions": "[if(not(empty(parameters('customActions'))), parameters('customActions'), null())]", - "description": "[parameters('description')]", - "endOfLifeDate": "[parameters('endOfLifeDate')]", - "eula": "[parameters('eula')]", - "privacyStatementUri": "[parameters('privacyStatementUri')]", - "releaseNoteUri": "[parameters('releaseNoteUri')]", - "supportedOSType": "[parameters('supportedOSType')]" - }, - "dependsOn": [ - "gallery" - ] - }, - "application_roleAssignments": { - "copy": { - "name": "application_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/galleries/{0}/applications/{1}', parameters('galleryName'), parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/galleries/applications', parameters('galleryName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "application" - ] - } - }, - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the image was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the image." - }, - "value": "[resourceId('Microsoft.Compute/galleries/applications', parameters('galleryName'), parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the image." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('application', '2022-03-03', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/gallery/application/version.json b/modules/compute/gallery/application/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/gallery/application/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/gallery/image/README.md b/modules/compute/gallery/image/README.md deleted file mode 100644 index a1299ecc52..0000000000 --- a/modules/compute/gallery/image/README.md +++ /dev/null @@ -1,423 +0,0 @@ -# Compute Galleries Image Definitions `[Microsoft.Compute/galleries/images]` - -This module deploys an Azure Compute Gallery Image Definition. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) -- [Cross-referenced modules](#Cross-referenced-modules) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) | -| `Microsoft.Compute/galleries/images` | [2022-03-03](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Compute/2022-03-03/galleries/images) | - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`name`](#parameter-name) | string | Name of the image definition. | - -**Conditional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`galleryName`](#parameter-galleryname) | string | The name of the parent Azure Shared Image Gallery. Required if the template is used in a standalone deployment. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`description`](#parameter-description) | string | The description of this gallery Image Definition resource. This property is updatable. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`endOfLife`](#parameter-endoflife) | string | The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z. | -| [`eula`](#parameter-eula) | string | The Eula agreement for the gallery Image Definition. Has to be a valid URL. | -| [`excludedDiskTypes`](#parameter-excludeddisktypes) | array | List of the excluded disk types. E.g. Standard_LRS. | -| [`hyperVGeneration`](#parameter-hypervgeneration) | string | The hypervisor generation of the Virtual Machine.
- If this value is not specified, then it is determined by the securityType parameter.- If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1. | -| [`isAcceleratedNetworkSupported`](#parameter-isacceleratednetworksupported) | string | The image supports accelerated networking.Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance.This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the most demanding network workloads on supported VM types. | -| [`isHibernateSupported`](#parameter-ishibernatesupported) | string | The image will support hibernation. | -| [`location`](#parameter-location) | string | Location for all resources. | -| [`maxRecommendedMemory`](#parameter-maxrecommendedmemory) | int | The maximum amount of RAM in GB recommended for this image. | -| [`maxRecommendedvCPUs`](#parameter-maxrecommendedvcpus) | int | The maximum number of the CPU cores recommended for this image. | -| [`minRecommendedMemory`](#parameter-minrecommendedmemory) | int | The minimum amount of RAM in GB recommended for this image. | -| [`minRecommendedvCPUs`](#parameter-minrecommendedvcpus) | int | The minimum number of the CPU cores recommended for this image. | -| [`offer`](#parameter-offer) | string | The name of the gallery Image Definition offer. | -| [`osState`](#parameter-osstate) | string | This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. | -| [`osType`](#parameter-ostype) | string | OS type of the image to be created. | -| [`planName`](#parameter-planname) | string | The plan ID. | -| [`planPublisherName`](#parameter-planpublishername) | string | The publisher ID. | -| [`privacyStatementUri`](#parameter-privacystatementuri) | string | The privacy statement uri. Has to be a valid URL. | -| [`productName`](#parameter-productname) | string | The product ID. | -| [`publisher`](#parameter-publisher) | string | The name of the gallery Image Definition publisher. | -| [`releaseNoteUri`](#parameter-releasenoteuri) | string | The release note uri. Has to be a valid URL. | -| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| [`securityType`](#parameter-securitytype) | string | The security type of the image. Requires a hyperVGeneration V2. | -| [`sku`](#parameter-sku) | string | The name of the gallery Image Definition SKU. | -| [`tags`](#parameter-tags) | object | Tags for all resources. | - -### Parameter: `name` - -Name of the image definition. - -- Required: Yes -- Type: string - -### Parameter: `galleryName` - -The name of the parent Azure Shared Image Gallery. Required if the template is used in a standalone deployment. - -- Required: Yes -- Type: string - -### Parameter: `description` - -The description of this gallery Image Definition resource. This property is updatable. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `endOfLife` - -The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `eula` - -The Eula agreement for the gallery Image Definition. Has to be a valid URL. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `excludedDiskTypes` - -List of the excluded disk types. E.g. Standard_LRS. - -- Required: No -- Type: array -- Default: `[]` - -### Parameter: `hyperVGeneration` - -The hypervisor generation of the Virtual Machine.- If this value is not specified, then it is determined by the securityType parameter.- If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1. - -- Required: No -- Type: string -- Default: `''` -- Allowed: - ```Bicep - [ - '' - 'V1' - 'V2' - ] - ``` - -### Parameter: `isAcceleratedNetworkSupported` - -The image supports accelerated networking.Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance.This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the most demanding network workloads on supported VM types. - -- Required: No -- Type: string -- Default: `'false'` -- Allowed: - ```Bicep - [ - 'false' - 'true' - ] - ``` - -### Parameter: `isHibernateSupported` - -The image will support hibernation. - -- Required: No -- Type: string -- Default: `'false'` -- Allowed: - ```Bicep - [ - 'false' - 'true' - ] - ``` - -### Parameter: `location` - -Location for all resources. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `maxRecommendedMemory` - -The maximum amount of RAM in GB recommended for this image. - -- Required: No -- Type: int -- Default: `16` - -### Parameter: `maxRecommendedvCPUs` - -The maximum number of the CPU cores recommended for this image. - -- Required: No -- Type: int -- Default: `4` - -### Parameter: `minRecommendedMemory` - -The minimum amount of RAM in GB recommended for this image. - -- Required: No -- Type: int -- Default: `4` - -### Parameter: `minRecommendedvCPUs` - -The minimum number of the CPU cores recommended for this image. - -- Required: No -- Type: int -- Default: `1` - -### Parameter: `offer` - -The name of the gallery Image Definition offer. - -- Required: No -- Type: string -- Default: `'WindowsServer'` - -### Parameter: `osState` - -This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. - -- Required: No -- Type: string -- Default: `'Generalized'` -- Allowed: - ```Bicep - [ - 'Generalized' - 'Specialized' - ] - ``` - -### Parameter: `osType` - -OS type of the image to be created. - -- Required: No -- Type: string -- Default: `'Windows'` -- Allowed: - ```Bicep - [ - 'Linux' - 'Windows' - ] - ``` - -### Parameter: `planName` - -The plan ID. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `planPublisherName` - -The publisher ID. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `privacyStatementUri` - -The privacy statement uri. Has to be a valid URL. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `productName` - -The product ID. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `publisher` - -The name of the gallery Image Definition publisher. - -- Required: No -- Type: string -- Default: `'MicrosoftWindowsServer'` - -### Parameter: `releaseNoteUri` - -The release note uri. Has to be a valid URL. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `roleAssignments` - -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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The name of the role to assign. If it cannot be found you can specify the role definition ID instead. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `securityType` - -The security type of the image. Requires a hyperVGeneration V2. - -- Required: No -- Type: string -- Default: `'Standard'` -- Allowed: - ```Bicep - [ - 'ConfidentialVM' - 'ConfidentialVMSupported' - 'Standard' - 'TrustedLaunch' - ] - ``` - -### Parameter: `sku` - -The name of the gallery Image Definition SKU. - -- Required: No -- Type: string -- Default: `'2019-Datacenter'` - -### Parameter: `tags` - -Tags for all resources. - -- Required: No -- Type: object - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the image. | -| `resourceGroupName` | string | The resource group the image was deployed into. | -| `resourceId` | string | The resource ID of the image. | - -## Cross-referenced modules - -_None_ diff --git a/modules/compute/gallery/image/main.bicep b/modules/compute/gallery/image/main.bicep deleted file mode 100644 index a922e5e74b..0000000000 --- a/modules/compute/gallery/image/main.bicep +++ /dev/null @@ -1,263 +0,0 @@ -metadata name = 'Compute Galleries Image Definitions' -metadata description = 'This module deploys an Azure Compute Gallery Image Definition.' -metadata owner = 'Azure/module-maintainers' - -@sys.description('Required. Name of the image definition.') -param name string - -@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@sys.description('Optional. Location for all resources.') -param location string = resourceGroup().location - -@sys.description('Conditional. The name of the parent Azure Shared Image Gallery. Required if the template is used in a standalone deployment.') -@minLength(1) -param galleryName string - -@sys.description('Optional. OS type of the image to be created.') -@allowed([ - 'Windows' - 'Linux' -]) -param osType string = 'Windows' - -@sys.description('Optional. This property allows the user to specify whether the virtual machines created under this image are \'Generalized\' or \'Specialized\'.') -@allowed([ - 'Generalized' - 'Specialized' -]) -param osState string = 'Generalized' - -@sys.description('Optional. The name of the gallery Image Definition publisher.') -param publisher string = 'MicrosoftWindowsServer' - -@sys.description('Optional. The name of the gallery Image Definition offer.') -param offer string = 'WindowsServer' - -@sys.description('Optional. The name of the gallery Image Definition SKU.') -param sku string = '2019-Datacenter' - -@sys.description('Optional. The minimum number of the CPU cores recommended for this image.') -@minValue(1) -@maxValue(128) -param minRecommendedvCPUs int = 1 - -@sys.description('Optional. The maximum number of the CPU cores recommended for this image.') -@minValue(1) -@maxValue(128) -param maxRecommendedvCPUs int = 4 - -@sys.description('Optional. The minimum amount of RAM in GB recommended for this image.') -@minValue(1) -@maxValue(4000) -param minRecommendedMemory int = 4 - -@sys.description('Optional. The maximum amount of RAM in GB recommended for this image.') -@minValue(1) -@maxValue(4000) -param maxRecommendedMemory int = 16 - -@sys.description('Optional. The hypervisor generation of the Virtual Machine.- If this value is not specified, then it is determined by the securityType parameter.- If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1.') -@allowed([ - '' - 'V1' - 'V2' -]) -param hyperVGeneration string = '' - -@sys.description('Optional. The security type of the image. Requires a hyperVGeneration V2.') -@allowed([ - 'Standard' - 'TrustedLaunch' - 'ConfidentialVM' - 'ConfidentialVMSupported' -]) -param securityType string = 'Standard' - -@sys.description('Optional. The image will support hibernation.') -@allowed([ - 'true' - 'false' -]) -param isHibernateSupported string = 'false' - -@sys.description('Optional. The image supports accelerated networking.Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance.This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the most demanding network workloads on supported VM types.') -@allowed([ - 'true' - 'false' -]) -param isAcceleratedNetworkSupported string = 'false' - -@sys.description('Optional. The description of this gallery Image Definition resource. This property is updatable.') -param description string = '' - -@sys.description('Optional. The Eula agreement for the gallery Image Definition. Has to be a valid URL.') -param eula string = '' - -@sys.description('Optional. The privacy statement uri. Has to be a valid URL.') -param privacyStatementUri string = '' - -@sys.description('Optional. The release note uri. Has to be a valid URL.') -param releaseNoteUri string = '' - -@sys.description('Optional. The product ID.') -param productName string = '' - -@sys.description('Optional. The plan ID.') -param planName string = '' - -@sys.description('Optional. The publisher ID.') -param planPublisherName string = '' - -@sys.description('Optional. The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z.') -param endOfLife string = '' - -@sys.description('Optional. List of the excluded disk types. E.g. Standard_LRS.') -param excludedDiskTypes array = [] - -@sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') -param roleAssignments roleAssignmentType - -@sys.description('Optional. Tags for all resources.') -param tags object? - -var builtInRoleNames = { - 'Compute Gallery Sharing Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b') - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource gallery 'Microsoft.Compute/galleries@2022-03-03' existing = { - name: galleryName -} - -resource image 'Microsoft.Compute/galleries/images@2022-03-03' = { - name: name - parent: gallery - location: location - tags: tags - properties: { - osType: osType - osState: osState - identifier: { - publisher: publisher - offer: offer - sku: sku - } - recommended: { - vCPUs: { - min: minRecommendedvCPUs - max: maxRecommendedvCPUs - } - memory: { - min: minRecommendedMemory - max: maxRecommendedMemory - } - } - hyperVGeneration: !empty(hyperVGeneration) ? hyperVGeneration : (!empty(securityType) ? 'V2' : 'V1') - features: !empty(securityType) && securityType != 'Standard' ? [ - { - name: 'SecurityType' - value: securityType - } - { - name: 'IsAcceleratedNetworkSupported' - value: isAcceleratedNetworkSupported - } - { - name: 'IsHibernateSupported' - value: isHibernateSupported - } - ] : [ - { - name: 'IsAcceleratedNetworkSupported' - value: isAcceleratedNetworkSupported - } - { - name: 'IsHibernateSupported' - value: isHibernateSupported - } - ] - description: description - eula: eula - privacyStatementUri: privacyStatementUri - releaseNoteUri: releaseNoteUri - purchasePlan: { - product: !empty(productName) ? productName : null - name: !empty(planName) ? planName : null - publisher: !empty(planPublisherName) ? planPublisherName : null - } - endOfLifeDate: endOfLife - disallowed: { - diskTypes: excludedDiskTypes - } - } -} - -resource image_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(image.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: image -}] - -@sys.description('The resource group the image was deployed into.') -output resourceGroupName string = resourceGroup().name - -@sys.description('The resource ID of the image.') -output resourceId string = image.id - -@sys.description('The name of the image.') -output name string = image.name - -@sys.description('The location the resource was deployed into.') -output location string = image.location -// =============== // -// Definitions // -// =============== // - -type roleAssignmentType = { - @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.') - roleDefinitionIdOrName: string - - @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @sys.description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @sys.description('Optional. The description of the role assignment.') - description: string? - - @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @sys.description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @sys.description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/gallery/image/main.json b/modules/compute/gallery/image/main.json deleted file mode 100644 index 966b22684c..0000000000 --- a/modules/compute/gallery/image/main.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "17846161223611480196" - }, - "name": "Compute Galleries Image Definitions", - "description": "This module deploys an Azure Compute Gallery Image Definition.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. Name of the image definition." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "galleryName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Conditional. The name of the parent Azure Shared Image Gallery. Required if the template is used in a standalone deployment." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "Optional. OS type of the image to be created." - } - }, - "osState": { - "type": "string", - "defaultValue": "Generalized", - "allowedValues": [ - "Generalized", - "Specialized" - ], - "metadata": { - "description": "Optional. This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'." - } - }, - "publisher": { - "type": "string", - "defaultValue": "MicrosoftWindowsServer", - "metadata": { - "description": "Optional. The name of the gallery Image Definition publisher." - } - }, - "offer": { - "type": "string", - "defaultValue": "WindowsServer", - "metadata": { - "description": "Optional. The name of the gallery Image Definition offer." - } - }, - "sku": { - "type": "string", - "defaultValue": "2019-Datacenter", - "metadata": { - "description": "Optional. The name of the gallery Image Definition SKU." - } - }, - "minRecommendedvCPUs": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "maxValue": 128, - "metadata": { - "description": "Optional. The minimum number of the CPU cores recommended for this image." - } - }, - "maxRecommendedvCPUs": { - "type": "int", - "defaultValue": 4, - "minValue": 1, - "maxValue": 128, - "metadata": { - "description": "Optional. The maximum number of the CPU cores recommended for this image." - } - }, - "minRecommendedMemory": { - "type": "int", - "defaultValue": 4, - "minValue": 1, - "maxValue": 4000, - "metadata": { - "description": "Optional. The minimum amount of RAM in GB recommended for this image." - } - }, - "maxRecommendedMemory": { - "type": "int", - "defaultValue": 16, - "minValue": 1, - "maxValue": 4000, - "metadata": { - "description": "Optional. The maximum amount of RAM in GB recommended for this image." - } - }, - "hyperVGeneration": { - "type": "string", - "defaultValue": "", - "allowedValues": [ - "", - "V1", - "V2" - ], - "metadata": { - "description": "Optional. The hypervisor generation of the Virtual Machine.- If this value is not specified, then it is determined by the securityType parameter.- If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1." - } - }, - "securityType": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "TrustedLaunch", - "ConfidentialVM", - "ConfidentialVMSupported" - ], - "metadata": { - "description": "Optional. The security type of the image. Requires a hyperVGeneration V2." - } - }, - "isHibernateSupported": { - "type": "string", - "defaultValue": "false", - "allowedValues": [ - "true", - "false" - ], - "metadata": { - "description": "Optional. The image will support hibernation." - } - }, - "isAcceleratedNetworkSupported": { - "type": "string", - "defaultValue": "false", - "allowedValues": [ - "true", - "false" - ], - "metadata": { - "description": "Optional. The image supports accelerated networking.Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance.This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the most demanding network workloads on supported VM types." - } - }, - "description": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The description of this gallery Image Definition resource. This property is updatable." - } - }, - "eula": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The Eula agreement for the gallery Image Definition. Has to be a valid URL." - } - }, - "privacyStatementUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The privacy statement uri. Has to be a valid URL." - } - }, - "releaseNoteUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The release note uri. Has to be a valid URL." - } - }, - "productName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The product ID." - } - }, - "planName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The plan ID." - } - }, - "planPublisherName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The publisher ID." - } - }, - "endOfLife": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z." - } - }, - "excludedDiskTypes": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. List of the excluded disk types. E.g. Standard_LRS." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags for all resources." - } - } - }, - "variables": { - "builtInRoleNames": { - "Compute Gallery Sharing Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b')]", - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "gallery": { - "existing": true, - "type": "Microsoft.Compute/galleries", - "apiVersion": "2022-03-03", - "name": "[parameters('galleryName')]" - }, - "image": { - "type": "Microsoft.Compute/galleries/images", - "apiVersion": "2022-03-03", - "name": "[format('{0}/{1}', parameters('galleryName'), parameters('name'))]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "osType": "[parameters('osType')]", - "osState": "[parameters('osState')]", - "identifier": { - "publisher": "[parameters('publisher')]", - "offer": "[parameters('offer')]", - "sku": "[parameters('sku')]" - }, - "recommended": { - "vCPUs": { - "min": "[parameters('minRecommendedvCPUs')]", - "max": "[parameters('maxRecommendedvCPUs')]" - }, - "memory": { - "min": "[parameters('minRecommendedMemory')]", - "max": "[parameters('maxRecommendedMemory')]" - } - }, - "hyperVGeneration": "[if(not(empty(parameters('hyperVGeneration'))), parameters('hyperVGeneration'), if(not(empty(parameters('securityType'))), 'V2', 'V1'))]", - "features": "[if(and(not(empty(parameters('securityType'))), not(equals(parameters('securityType'), 'Standard'))), createArray(createObject('name', 'SecurityType', 'value', parameters('securityType')), createObject('name', 'IsAcceleratedNetworkSupported', 'value', parameters('isAcceleratedNetworkSupported')), createObject('name', 'IsHibernateSupported', 'value', parameters('isHibernateSupported'))), createArray(createObject('name', 'IsAcceleratedNetworkSupported', 'value', parameters('isAcceleratedNetworkSupported')), createObject('name', 'IsHibernateSupported', 'value', parameters('isHibernateSupported'))))]", - "description": "[parameters('description')]", - "eula": "[parameters('eula')]", - "privacyStatementUri": "[parameters('privacyStatementUri')]", - "releaseNoteUri": "[parameters('releaseNoteUri')]", - "purchasePlan": { - "product": "[if(not(empty(parameters('productName'))), parameters('productName'), null())]", - "name": "[if(not(empty(parameters('planName'))), parameters('planName'), null())]", - "publisher": "[if(not(empty(parameters('planPublisherName'))), parameters('planPublisherName'), null())]" - }, - "endOfLifeDate": "[parameters('endOfLife')]", - "disallowed": { - "diskTypes": "[parameters('excludedDiskTypes')]" - } - }, - "dependsOn": [ - "gallery" - ] - }, - "image_roleAssignments": { - "copy": { - "name": "image_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/galleries/{0}/images/{1}', parameters('galleryName'), parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/galleries/images', parameters('galleryName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "image" - ] - } - }, - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the image was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the image." - }, - "value": "[resourceId('Microsoft.Compute/galleries/images', parameters('galleryName'), parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the image." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('image', '2022-03-03', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/gallery/image/version.json b/modules/compute/gallery/image/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/gallery/image/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/gallery/main.bicep b/modules/compute/gallery/main.bicep deleted file mode 100644 index 54aaf1e3f9..0000000000 --- a/modules/compute/gallery/main.bicep +++ /dev/null @@ -1,185 +0,0 @@ -metadata name = 'Azure Compute Galleries' -metadata description = 'This module deploys an Azure Compute Gallery (formerly known as Shared Image Gallery).' -metadata owner = 'Azure/module-maintainers' - -@minLength(1) -@sys.description('Required. Name of the Azure Compute Gallery.') -param name string - -@sys.description('Optional. Location for all resources.') -param location string = resourceGroup().location - -@sys.description('Optional. Description of the Azure Shared Image Gallery.') -param description string = '' - -@sys.description('Optional. Applications to create.') -param applications array = [] - -@sys.description('Optional. Images to create.') -param images array = [] - -@sys.description('Optional. The lock settings of the service.') -param lock lockType - -@sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') -param roleAssignments roleAssignmentType - -@sys.description('Optional. Tags for all resources.') -param tags object? - -@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -var enableReferencedModulesTelemetry = false - -var builtInRoleNames = { - 'Compute Gallery Sharing Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b') - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource gallery 'Microsoft.Compute/galleries@2022-03-03' = { - name: name - location: location - tags: tags - properties: { - description: description - identifier: {} - } -} - -resource gallery_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: gallery -} - -resource gallery_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(gallery.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: gallery -}] - -// Applications -module galleries_applications 'application/main.bicep' = [for (application, index) in applications: { - name: '${uniqueString(deployment().name, location)}-Gallery-Application-${index}' - params: { - name: application.name - galleryName: gallery.name - supportedOSType: contains(application, 'supportOSType') ? application.supportedOSType : 'Windows' - description: contains(application, 'description') ? application.description : '' - eula: contains(application, 'eula') ? application.eula : '' - privacyStatementUri: contains(application, 'privacyStatementUri') ? application.privacyStatementUri : '' - releaseNoteUri: contains(application, 'releaseNoteUri') ? application.releaseNoteUri : '' - endOfLifeDate: contains(application, 'endOfLifeDate') ? application.endOfLifeDate : '' - roleAssignments: contains(application, 'roleAssignments') ? application.roleAssignments : [] - customActions: contains(application, 'customActions') ? application.customActions : [] - tags: application.?tags ?? tags - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -}] - -// Images -module galleries_images 'image/main.bicep' = [for (image, index) in images: { - name: '${uniqueString(deployment().name, location)}-Gallery-Image-${index}' - params: { - name: image.name - galleryName: gallery.name - osType: contains(image, 'osType') ? image.osType : 'Windows' - osState: contains(image, 'osState') ? image.osState : 'Generalized' - publisher: contains(image, 'publisher') ? image.publisher : 'MicrosoftWindowsServer' - offer: contains(image, 'offer') ? image.offer : 'WindowsServer' - sku: contains(image, 'sku') ? image.sku : '2019-Datacenter' - minRecommendedvCPUs: contains(image, 'minRecommendedvCPUs') ? image.minRecommendedvCPUs : 1 - maxRecommendedvCPUs: contains(image, 'maxRecommendedvCPUs') ? image.maxRecommendedvCPUs : 4 - minRecommendedMemory: contains(image, 'minRecommendedMemory') ? image.minRecommendedMemory : 4 - maxRecommendedMemory: contains(image, 'maxRecommendedMemory') ? image.maxRecommendedMemory : 16 - hyperVGeneration: contains(image, 'hyperVGeneration') ? image.hyperVGeneration : 'V1' - securityType: contains(image, 'securityType') ? image.securityType : 'Standard' - description: contains(image, 'description') ? image.description : '' - eula: contains(image, 'eula') ? image.eula : '' - privacyStatementUri: contains(image, 'privacyStatementUri') ? image.privacyStatementUri : '' - releaseNoteUri: contains(image, 'releaseNoteUri') ? image.releaseNoteUri : '' - productName: contains(image, 'productName') ? image.productName : '' - planName: contains(image, 'planName') ? image.planName : '' - planPublisherName: contains(image, 'planPublisherName') ? image.planPublisherName : '' - endOfLife: contains(image, 'endOfLife') ? image.endOfLife : '' - excludedDiskTypes: contains(image, 'excludedDiskTypes') ? image.excludedDiskTypes : [] - roleAssignments: contains(image, 'roleAssignments') ? image.roleAssignments : [] - tags: image.?tags ?? tags - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -}] - -@sys.description('The resource ID of the deployed image gallery.') -output resourceId string = gallery.id - -@sys.description('The resource group of the deployed image gallery.') -output resourceGroupName string = resourceGroup().name - -@sys.description('The name of the deployed image gallery.') -output name string = gallery.name - -@sys.description('The location the resource was deployed into.') -output location string = gallery.location - -// =============== // -// Definitions // -// =============== // - -type lockType = { - @sys.description('Optional. Specify the name of lock.') - name: string? - - @sys.description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.') - roleDefinitionIdOrName: string - - @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @sys.description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @sys.description('Optional. The description of the role assignment.') - description: string? - - @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @sys.description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @sys.description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/gallery/main.json b/modules/compute/gallery/main.json deleted file mode 100644 index 44e5d0a6f9..0000000000 --- a/modules/compute/gallery/main.json +++ /dev/null @@ -1,1091 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "15313131097423380423" - }, - "name": "Azure Compute Galleries", - "description": "This module deploys an Azure Compute Gallery (formerly known as Shared Image Gallery).", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Required. Name of the Azure Compute Gallery." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "description": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Description of the Azure Shared Image Gallery." - } - }, - "applications": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Applications to create." - } - }, - "images": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Images to create." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags for all resources." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "enableReferencedModulesTelemetry": false, - "builtInRoleNames": { - "Compute Gallery Sharing Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b')]", - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "gallery": { - "type": "Microsoft.Compute/galleries", - "apiVersion": "2022-03-03", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "description": "[parameters('description')]", - "identifier": {} - } - }, - "gallery_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.Compute/galleries/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "gallery" - ] - }, - "gallery_roleAssignments": { - "copy": { - "name": "gallery_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/galleries/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/galleries', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "gallery" - ] - }, - "galleries_applications": { - "copy": { - "name": "galleries_applications", - "count": "[length(parameters('applications'))]" - }, - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-Gallery-Application-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "name": { - "value": "[parameters('applications')[copyIndex()].name]" - }, - "galleryName": { - "value": "[parameters('name')]" - }, - "supportedOSType": "[if(contains(parameters('applications')[copyIndex()], 'supportOSType'), createObject('value', parameters('applications')[copyIndex()].supportedOSType), createObject('value', 'Windows'))]", - "description": "[if(contains(parameters('applications')[copyIndex()], 'description'), createObject('value', parameters('applications')[copyIndex()].description), createObject('value', ''))]", - "eula": "[if(contains(parameters('applications')[copyIndex()], 'eula'), createObject('value', parameters('applications')[copyIndex()].eula), createObject('value', ''))]", - "privacyStatementUri": "[if(contains(parameters('applications')[copyIndex()], 'privacyStatementUri'), createObject('value', parameters('applications')[copyIndex()].privacyStatementUri), createObject('value', ''))]", - "releaseNoteUri": "[if(contains(parameters('applications')[copyIndex()], 'releaseNoteUri'), createObject('value', parameters('applications')[copyIndex()].releaseNoteUri), createObject('value', ''))]", - "endOfLifeDate": "[if(contains(parameters('applications')[copyIndex()], 'endOfLifeDate'), createObject('value', parameters('applications')[copyIndex()].endOfLifeDate), createObject('value', ''))]", - "roleAssignments": "[if(contains(parameters('applications')[copyIndex()], 'roleAssignments'), createObject('value', parameters('applications')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "customActions": "[if(contains(parameters('applications')[copyIndex()], 'customActions'), createObject('value', parameters('applications')[copyIndex()].customActions), createObject('value', createArray()))]", - "tags": { - "value": "[coalesce(tryGet(parameters('applications')[copyIndex()], 'tags'), parameters('tags'))]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "13733131047823769084" - }, - "name": "Compute Galleries Applications", - "description": "This module deploys an Azure Compute Gallery Application.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. Name of the application definition." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "galleryName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Conditional. The name of the parent Azure Compute Gallery. Required if the template is used in a standalone deployment." - } - }, - "description": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The description of this gallery Application Definition resource. This property is updatable." - } - }, - "eula": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The Eula agreement for the gallery Application Definition. Has to be a valid URL." - } - }, - "privacyStatementUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The privacy statement uri. Has to be a valid URL." - } - }, - "releaseNoteUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The release note uri. Has to be a valid URL." - } - }, - "supportedOSType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "Optional. This property allows you to specify the supported type of the OS that application is built for." - } - }, - "endOfLifeDate": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags for all resources." - } - }, - "customActions": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application." - } - } - }, - "variables": { - "builtInRoleNames": { - "Compute Gallery Sharing Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b')]", - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "gallery": { - "existing": true, - "type": "Microsoft.Compute/galleries", - "apiVersion": "2022-03-03", - "name": "[parameters('galleryName')]" - }, - "application": { - "type": "Microsoft.Compute/galleries/applications", - "apiVersion": "2022-03-03", - "name": "[format('{0}/{1}', parameters('galleryName'), parameters('name'))]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "customActions": "[if(not(empty(parameters('customActions'))), parameters('customActions'), null())]", - "description": "[parameters('description')]", - "endOfLifeDate": "[parameters('endOfLifeDate')]", - "eula": "[parameters('eula')]", - "privacyStatementUri": "[parameters('privacyStatementUri')]", - "releaseNoteUri": "[parameters('releaseNoteUri')]", - "supportedOSType": "[parameters('supportedOSType')]" - }, - "dependsOn": [ - "gallery" - ] - }, - "application_roleAssignments": { - "copy": { - "name": "application_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/galleries/{0}/applications/{1}', parameters('galleryName'), parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/galleries/applications', parameters('galleryName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "application" - ] - } - }, - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the image was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the image." - }, - "value": "[resourceId('Microsoft.Compute/galleries/applications', parameters('galleryName'), parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the image." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('application', '2022-03-03', 'full').location]" - } - } - } - }, - "dependsOn": [ - "gallery" - ] - }, - "galleries_images": { - "copy": { - "name": "galleries_images", - "count": "[length(parameters('images'))]" - }, - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-Gallery-Image-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "name": { - "value": "[parameters('images')[copyIndex()].name]" - }, - "galleryName": { - "value": "[parameters('name')]" - }, - "osType": "[if(contains(parameters('images')[copyIndex()], 'osType'), createObject('value', parameters('images')[copyIndex()].osType), createObject('value', 'Windows'))]", - "osState": "[if(contains(parameters('images')[copyIndex()], 'osState'), createObject('value', parameters('images')[copyIndex()].osState), createObject('value', 'Generalized'))]", - "publisher": "[if(contains(parameters('images')[copyIndex()], 'publisher'), createObject('value', parameters('images')[copyIndex()].publisher), createObject('value', 'MicrosoftWindowsServer'))]", - "offer": "[if(contains(parameters('images')[copyIndex()], 'offer'), createObject('value', parameters('images')[copyIndex()].offer), createObject('value', 'WindowsServer'))]", - "sku": "[if(contains(parameters('images')[copyIndex()], 'sku'), createObject('value', parameters('images')[copyIndex()].sku), createObject('value', '2019-Datacenter'))]", - "minRecommendedvCPUs": "[if(contains(parameters('images')[copyIndex()], 'minRecommendedvCPUs'), createObject('value', parameters('images')[copyIndex()].minRecommendedvCPUs), createObject('value', 1))]", - "maxRecommendedvCPUs": "[if(contains(parameters('images')[copyIndex()], 'maxRecommendedvCPUs'), createObject('value', parameters('images')[copyIndex()].maxRecommendedvCPUs), createObject('value', 4))]", - "minRecommendedMemory": "[if(contains(parameters('images')[copyIndex()], 'minRecommendedMemory'), createObject('value', parameters('images')[copyIndex()].minRecommendedMemory), createObject('value', 4))]", - "maxRecommendedMemory": "[if(contains(parameters('images')[copyIndex()], 'maxRecommendedMemory'), createObject('value', parameters('images')[copyIndex()].maxRecommendedMemory), createObject('value', 16))]", - "hyperVGeneration": "[if(contains(parameters('images')[copyIndex()], 'hyperVGeneration'), createObject('value', parameters('images')[copyIndex()].hyperVGeneration), createObject('value', 'V1'))]", - "securityType": "[if(contains(parameters('images')[copyIndex()], 'securityType'), createObject('value', parameters('images')[copyIndex()].securityType), createObject('value', 'Standard'))]", - "description": "[if(contains(parameters('images')[copyIndex()], 'description'), createObject('value', parameters('images')[copyIndex()].description), createObject('value', ''))]", - "eula": "[if(contains(parameters('images')[copyIndex()], 'eula'), createObject('value', parameters('images')[copyIndex()].eula), createObject('value', ''))]", - "privacyStatementUri": "[if(contains(parameters('images')[copyIndex()], 'privacyStatementUri'), createObject('value', parameters('images')[copyIndex()].privacyStatementUri), createObject('value', ''))]", - "releaseNoteUri": "[if(contains(parameters('images')[copyIndex()], 'releaseNoteUri'), createObject('value', parameters('images')[copyIndex()].releaseNoteUri), createObject('value', ''))]", - "productName": "[if(contains(parameters('images')[copyIndex()], 'productName'), createObject('value', parameters('images')[copyIndex()].productName), createObject('value', ''))]", - "planName": "[if(contains(parameters('images')[copyIndex()], 'planName'), createObject('value', parameters('images')[copyIndex()].planName), createObject('value', ''))]", - "planPublisherName": "[if(contains(parameters('images')[copyIndex()], 'planPublisherName'), createObject('value', parameters('images')[copyIndex()].planPublisherName), createObject('value', ''))]", - "endOfLife": "[if(contains(parameters('images')[copyIndex()], 'endOfLife'), createObject('value', parameters('images')[copyIndex()].endOfLife), createObject('value', ''))]", - "excludedDiskTypes": "[if(contains(parameters('images')[copyIndex()], 'excludedDiskTypes'), createObject('value', parameters('images')[copyIndex()].excludedDiskTypes), createObject('value', createArray()))]", - "roleAssignments": "[if(contains(parameters('images')[copyIndex()], 'roleAssignments'), createObject('value', parameters('images')[copyIndex()].roleAssignments), createObject('value', createArray()))]", - "tags": { - "value": "[coalesce(tryGet(parameters('images')[copyIndex()], 'tags'), parameters('tags'))]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "17846161223611480196" - }, - "name": "Compute Galleries Image Definitions", - "description": "This module deploys an Azure Compute Gallery Image Definition.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. Name of the image definition." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "galleryName": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Conditional. The name of the parent Azure Shared Image Gallery. Required if the template is used in a standalone deployment." - } - }, - "osType": { - "type": "string", - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "Optional. OS type of the image to be created." - } - }, - "osState": { - "type": "string", - "defaultValue": "Generalized", - "allowedValues": [ - "Generalized", - "Specialized" - ], - "metadata": { - "description": "Optional. This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'." - } - }, - "publisher": { - "type": "string", - "defaultValue": "MicrosoftWindowsServer", - "metadata": { - "description": "Optional. The name of the gallery Image Definition publisher." - } - }, - "offer": { - "type": "string", - "defaultValue": "WindowsServer", - "metadata": { - "description": "Optional. The name of the gallery Image Definition offer." - } - }, - "sku": { - "type": "string", - "defaultValue": "2019-Datacenter", - "metadata": { - "description": "Optional. The name of the gallery Image Definition SKU." - } - }, - "minRecommendedvCPUs": { - "type": "int", - "defaultValue": 1, - "minValue": 1, - "maxValue": 128, - "metadata": { - "description": "Optional. The minimum number of the CPU cores recommended for this image." - } - }, - "maxRecommendedvCPUs": { - "type": "int", - "defaultValue": 4, - "minValue": 1, - "maxValue": 128, - "metadata": { - "description": "Optional. The maximum number of the CPU cores recommended for this image." - } - }, - "minRecommendedMemory": { - "type": "int", - "defaultValue": 4, - "minValue": 1, - "maxValue": 4000, - "metadata": { - "description": "Optional. The minimum amount of RAM in GB recommended for this image." - } - }, - "maxRecommendedMemory": { - "type": "int", - "defaultValue": 16, - "minValue": 1, - "maxValue": 4000, - "metadata": { - "description": "Optional. The maximum amount of RAM in GB recommended for this image." - } - }, - "hyperVGeneration": { - "type": "string", - "defaultValue": "", - "allowedValues": [ - "", - "V1", - "V2" - ], - "metadata": { - "description": "Optional. The hypervisor generation of the Virtual Machine.- If this value is not specified, then it is determined by the securityType parameter.- If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1." - } - }, - "securityType": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "TrustedLaunch", - "ConfidentialVM", - "ConfidentialVMSupported" - ], - "metadata": { - "description": "Optional. The security type of the image. Requires a hyperVGeneration V2." - } - }, - "isHibernateSupported": { - "type": "string", - "defaultValue": "false", - "allowedValues": [ - "true", - "false" - ], - "metadata": { - "description": "Optional. The image will support hibernation." - } - }, - "isAcceleratedNetworkSupported": { - "type": "string", - "defaultValue": "false", - "allowedValues": [ - "true", - "false" - ], - "metadata": { - "description": "Optional. The image supports accelerated networking.Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance.This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the most demanding network workloads on supported VM types." - } - }, - "description": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The description of this gallery Image Definition resource. This property is updatable." - } - }, - "eula": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The Eula agreement for the gallery Image Definition. Has to be a valid URL." - } - }, - "privacyStatementUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The privacy statement uri. Has to be a valid URL." - } - }, - "releaseNoteUri": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The release note uri. Has to be a valid URL." - } - }, - "productName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The product ID." - } - }, - "planName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The plan ID." - } - }, - "planPublisherName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The publisher ID." - } - }, - "endOfLife": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable. Allowed format: 2020-01-10T23:00:00.000Z." - } - }, - "excludedDiskTypes": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. List of the excluded disk types. E.g. Standard_LRS." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags for all resources." - } - } - }, - "variables": { - "builtInRoleNames": { - "Compute Gallery Sharing Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1ef6a3be-d0ac-425d-8c01-acb62866290b')]", - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "gallery": { - "existing": true, - "type": "Microsoft.Compute/galleries", - "apiVersion": "2022-03-03", - "name": "[parameters('galleryName')]" - }, - "image": { - "type": "Microsoft.Compute/galleries/images", - "apiVersion": "2022-03-03", - "name": "[format('{0}/{1}', parameters('galleryName'), parameters('name'))]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "osType": "[parameters('osType')]", - "osState": "[parameters('osState')]", - "identifier": { - "publisher": "[parameters('publisher')]", - "offer": "[parameters('offer')]", - "sku": "[parameters('sku')]" - }, - "recommended": { - "vCPUs": { - "min": "[parameters('minRecommendedvCPUs')]", - "max": "[parameters('maxRecommendedvCPUs')]" - }, - "memory": { - "min": "[parameters('minRecommendedMemory')]", - "max": "[parameters('maxRecommendedMemory')]" - } - }, - "hyperVGeneration": "[if(not(empty(parameters('hyperVGeneration'))), parameters('hyperVGeneration'), if(not(empty(parameters('securityType'))), 'V2', 'V1'))]", - "features": "[if(and(not(empty(parameters('securityType'))), not(equals(parameters('securityType'), 'Standard'))), createArray(createObject('name', 'SecurityType', 'value', parameters('securityType')), createObject('name', 'IsAcceleratedNetworkSupported', 'value', parameters('isAcceleratedNetworkSupported')), createObject('name', 'IsHibernateSupported', 'value', parameters('isHibernateSupported'))), createArray(createObject('name', 'IsAcceleratedNetworkSupported', 'value', parameters('isAcceleratedNetworkSupported')), createObject('name', 'IsHibernateSupported', 'value', parameters('isHibernateSupported'))))]", - "description": "[parameters('description')]", - "eula": "[parameters('eula')]", - "privacyStatementUri": "[parameters('privacyStatementUri')]", - "releaseNoteUri": "[parameters('releaseNoteUri')]", - "purchasePlan": { - "product": "[if(not(empty(parameters('productName'))), parameters('productName'), null())]", - "name": "[if(not(empty(parameters('planName'))), parameters('planName'), null())]", - "publisher": "[if(not(empty(parameters('planPublisherName'))), parameters('planPublisherName'), null())]" - }, - "endOfLifeDate": "[parameters('endOfLife')]", - "disallowed": { - "diskTypes": "[parameters('excludedDiskTypes')]" - } - }, - "dependsOn": [ - "gallery" - ] - }, - "image_roleAssignments": { - "copy": { - "name": "image_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/galleries/{0}/images/{1}', parameters('galleryName'), parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/galleries/images', parameters('galleryName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "image" - ] - } - }, - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the image was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the image." - }, - "value": "[resourceId('Microsoft.Compute/galleries/images', parameters('galleryName'), parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the image." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('image', '2022-03-03', 'full').location]" - } - } - } - }, - "dependsOn": [ - "gallery" - ] - } - }, - "outputs": { - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the deployed image gallery." - }, - "value": "[resourceId('Microsoft.Compute/galleries', parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group of the deployed image gallery." - }, - "value": "[resourceGroup().name]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the deployed image gallery." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('gallery', '2022-03-03', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/gallery/tests/e2e/defaults/main.test.bicep b/modules/compute/gallery/tests/e2e/defaults/main.test.bicep deleted file mode 100644 index f7a09d997c..0000000000 --- a/modules/compute/gallery/tests/e2e/defaults/main.test.bicep +++ /dev/null @@ -1,49 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using only defaults' -metadata description = 'This instance deploys the module with the minimum set of required parameters.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.galleries-${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 = 'cgmin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - } -}] diff --git a/modules/compute/gallery/tests/e2e/max/dependencies.bicep b/modules/compute/gallery/tests/e2e/max/dependencies.bicep deleted file mode 100644 index a7f42aee7b..0000000000 --- a/modules/compute/gallery/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/gallery/tests/e2e/max/main.test.bicep b/modules/compute/gallery/tests/e2e/max/main.test.bicep deleted file mode 100644 index 2562a048e5..0000000000 --- a/modules/compute/gallery/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,200 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.galleries-${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 = 'cgmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - applications: [ - { - name: '${namePrefix}-${serviceShort}-appd-001' - } - { - name: '${namePrefix}-${serviceShort}-appd-002' - supportedOSType: 'Windows' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - } - ] - images: [ - { - name: '${namePrefix}-az-imgd-ws-001' - } - { - hyperVGeneration: 'V1' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 8 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-ws-002' - offer: 'WindowsServer' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsServer' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: '2022-datacenter-azure-edition' - } - { - hyperVGeneration: 'V2' - isHibernateSupported: 'true' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 8 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-ws-003' - offer: 'WindowsServer' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsServer' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: '2022-datacenter-azure-edition-hibernate' - } - { - hyperVGeneration: 'V2' - isAcceleratedNetworkSupported: 'true' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 8 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-ws-004' - offer: 'WindowsServer' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsServer' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: '2022-datacenter-azure-edition-accnet' - } - { - hyperVGeneration: 'V2' - securityType: 'TrustedLaunch' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 4 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-wdtl-002' - offer: 'WindowsDesktop' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsDesktop' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: 'Win11-21H2' - } - { - hyperVGeneration: 'V2' - maxRecommendedMemory: 32 - maxRecommendedvCPUs: 4 - minRecommendedMemory: 4 - minRecommendedvCPUs: 1 - name: '${namePrefix}-az-imgd-us-001' - offer: '0001-com-ubuntu-server-focal' - osState: 'Generalized' - osType: 'Linux' - publisher: 'canonical' - sku: '20_04-lts-gen2' - } - ] - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/gallery/tests/e2e/waf-aligned/dependencies.bicep b/modules/compute/gallery/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index a7f42aee7b..0000000000 --- a/modules/compute/gallery/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/gallery/tests/e2e/waf-aligned/main.test.bicep b/modules/compute/gallery/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index 7d759c2f2a..0000000000 --- a/modules/compute/gallery/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,183 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.galleries-${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 = 'cgwaf' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - applications: [ - { - name: '${namePrefix}-${serviceShort}-appd-001' - } - { - name: '${namePrefix}-${serviceShort}-appd-002' - supportedOSType: 'Windows' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - } - ] - images: [ - { - name: '${namePrefix}-az-imgd-ws-001' - } - { - hyperVGeneration: 'V1' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 8 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-ws-002' - offer: 'WindowsServer' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsServer' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: '2022-datacenter-azure-edition' - } - { - hyperVGeneration: 'V2' - isHibernateSupported: 'true' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 8 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-ws-003' - offer: 'WindowsServer' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsServer' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: '2022-datacenter-azure-edition-hibernate' - } - { - hyperVGeneration: 'V2' - isAcceleratedNetworkSupported: 'true' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 8 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-ws-004' - offer: 'WindowsServer' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsServer' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: '2022-datacenter-azure-edition-accnet' - } - { - hyperVGeneration: 'V2' - securityType: 'TrustedLaunch' - maxRecommendedMemory: 16 - maxRecommendedvCPUs: 4 - minRecommendedMemory: 4 - minRecommendedvCPUs: 2 - name: '${namePrefix}-az-imgd-wdtl-002' - offer: 'WindowsDesktop' - osState: 'Generalized' - osType: 'Windows' - publisher: 'MicrosoftWindowsDesktop' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - sku: 'Win11-21H2' - } - { - hyperVGeneration: 'V2' - maxRecommendedMemory: 32 - maxRecommendedvCPUs: 4 - minRecommendedMemory: 4 - minRecommendedvCPUs: 1 - name: '${namePrefix}-az-imgd-us-001' - offer: '0001-com-ubuntu-server-focal' - osState: 'Generalized' - osType: 'Linux' - publisher: 'canonical' - sku: '20_04-lts-gen2' - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/gallery/version.json b/modules/compute/gallery/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/gallery/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/image/README.md b/modules/compute/image/README.md index dbfd145add..34da8019f1 100644 --- a/modules/compute/image/README.md +++ b/modules/compute/image/README.md @@ -1,537 +1,7 @@ -# Images `[Microsoft.Compute/images]` +
-
-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": "cimax001"
- },
- "osAccountType": {
- "value": "Premium_LRS"
- },
- "osDiskBlobUri": {
- "value": "
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module image 'br:bicep/modules/compute.image:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ciwaf'
- params: {
- // Required parameters
- name: 'ciwaf001'
- osAccountType: 'Premium_LRS'
- osDiskBlobUri: '
-
-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": "ciwaf001"
- },
- "osAccountType": {
- "value": "Premium_LRS"
- },
- "osDiskBlobUri": {
- "value": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`name`](#parameter-name) | string | The name of the image. | -| [`osDiskBlobUri`](#parameter-osdiskbloburi) | string | The Virtual Hard Disk. | -| [`osType`](#parameter-ostype) | string | This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. - Windows or Linux. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`dataDisks`](#parameter-datadisks) | array | Specifies the parameters that are used to add a data disk to a virtual machine. | -| [`diskEncryptionSetResourceId`](#parameter-diskencryptionsetresourceid) | string | Specifies the customer managed disk encryption set resource ID for the managed image disk. | -| [`diskSizeGB`](#parameter-disksizegb) | int | Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`extendedLocation`](#parameter-extendedlocation) | object | The extended location of the Image. | -| [`hyperVGeneration`](#parameter-hypervgeneration) | string | Gets the HyperVGenerationType of the VirtualMachine created from the image. - V1 or V2. | -| [`location`](#parameter-location) | string | Location for all resources. | -| [`managedDiskResourceId`](#parameter-manageddiskresourceid) | string | The managedDisk. | -| [`osAccountType`](#parameter-osaccounttype) | string | Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. - Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS. | -| [`osDiskCaching`](#parameter-osdiskcaching) | string | Specifies the caching requirements. Default: None for Standard storage. ReadOnly for Premium storage. - None, ReadOnly, ReadWrite. | -| [`osState`](#parameter-osstate) | string | The OS State. For managed images, use Generalized. | -| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | -| [`snapshotResourceId`](#parameter-snapshotresourceid) | string | The snapshot resource ID. | -| [`sourceVirtualMachineResourceId`](#parameter-sourcevirtualmachineresourceid) | string | The source virtual machine from which Image is created. | -| [`tags`](#parameter-tags) | object | Tags of the resource. | -| [`zoneResilient`](#parameter-zoneresilient) | bool | Default is false. Specifies whether an image is zone resilient or not. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). | - -### Parameter: `name` - -The name of the image. - -- Required: Yes -- Type: string - -### Parameter: `osDiskBlobUri` - -The Virtual Hard Disk. - -- Required: Yes -- Type: string - -### Parameter: `osType` - -This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. - Windows or Linux. - -- Required: Yes -- Type: string - -### Parameter: `dataDisks` - -Specifies the parameters that are used to add a data disk to a virtual machine. - -- Required: No -- Type: array -- Default: `[]` - -### Parameter: `diskEncryptionSetResourceId` - -Specifies the customer managed disk encryption set resource ID for the managed image disk. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `diskSizeGB` - -Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. - -- Required: No -- Type: int -- Default: `128` - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `extendedLocation` - -The extended location of the Image. - -- Required: No -- Type: object -- Default: `{}` - -### Parameter: `hyperVGeneration` - -Gets the HyperVGenerationType of the VirtualMachine created from the image. - V1 or V2. - -- Required: No -- Type: string -- Default: `'V1'` - -### Parameter: `location` - -Location for all resources. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `managedDiskResourceId` - -The managedDisk. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `osAccountType` - -Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. - Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS. - -- Required: Yes -- Type: string - -### Parameter: `osDiskCaching` - -Specifies the caching requirements. Default: None for Standard storage. ReadOnly for Premium storage. - None, ReadOnly, ReadWrite. - -- Required: Yes -- Type: string - -### Parameter: `osState` - -The OS State. For managed images, use Generalized. - -- Required: No -- Type: string -- Default: `'Generalized'` -- Allowed: - ```Bicep - [ - 'Generalized' - 'Specialized' - ] - ``` - -### Parameter: `roleAssignments` - -Array of role assignments to create. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `snapshotResourceId` - -The snapshot resource ID. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `sourceVirtualMachineResourceId` - -The source virtual machine from which Image is created. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `tags` - -Tags of the resource. - -- Required: No -- Type: object - -### Parameter: `zoneResilient` - -Default is false. Specifies whether an image is zone resilient or not. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). - -- Required: No -- Type: bool -- Default: `False` - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the image. | -| `resourceGroupName` | string | The resource group the image was deployed into. | -| `resourceId` | string | The resource ID of the image. | - -## Cross-referenced modules - -_None_ +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/compute/image/main.bicep b/modules/compute/image/main.bicep deleted file mode 100644 index 20e3e6ea11..0000000000 --- a/modules/compute/image/main.bicep +++ /dev/null @@ -1,170 +0,0 @@ -metadata name = 'Images' -metadata description = 'This module deploys a Compute Image.' -metadata owner = 'Azure/module-maintainers' - -@description('Required. The name of the image.') -param name string - -@description('Optional. Location for all resources.') -param location string = resourceGroup().location - -@description('Required. The Virtual Hard Disk.') -param osDiskBlobUri string - -@description('Required. This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. - Windows or Linux.') -param osType string - -@description('Optional. Specifies the caching requirements. Default: None for Standard storage. ReadOnly for Premium storage. - None, ReadOnly, ReadWrite.') -param osDiskCaching string - -@description('Optional. Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. - Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS.') -param osAccountType string - -@description('Optional. Default is false. Specifies whether an image is zone resilient or not. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).') -param zoneResilient bool = false - -@description('Optional. Gets the HyperVGenerationType of the VirtualMachine created from the image. - V1 or V2.') -param hyperVGeneration string = 'V1' - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -@description('Optional. Tags of the resource.') -param tags object? - -@description('Optional. The extended location of the Image.') -param extendedLocation object = {} - -@description('Optional. The source virtual machine from which Image is created.') -param sourceVirtualMachineResourceId string = '' - -@description('Optional. Specifies the customer managed disk encryption set resource ID for the managed image disk.') -param diskEncryptionSetResourceId string = '' - -@description('Optional. The managedDisk.') -param managedDiskResourceId string = '' - -@description('Optional. Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.') -param diskSizeGB int = 128 - -@description('Optional. The OS State. For managed images, use Generalized.') -@allowed([ - 'Generalized' - 'Specialized' -]) -param osState string = 'Generalized' - -@description('Optional. The snapshot resource ID.') -param snapshotResourceId string = '' - -@description('Optional. Specifies the parameters that are used to add a data disk to a virtual machine.') -param dataDisks array = [] - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource image 'Microsoft.Compute/images@2022-11-01' = { - name: name - location: location - tags: tags - extendedLocation: !empty(extendedLocation) ? extendedLocation : null - properties: { - storageProfile: { - osDisk: { - osType: osType - blobUri: osDiskBlobUri - caching: osDiskCaching - storageAccountType: osAccountType - osState: osState - diskEncryptionSet: !empty(diskEncryptionSetResourceId) ? { - id: diskEncryptionSetResourceId - } : null - diskSizeGB: diskSizeGB - managedDisk: !empty(managedDiskResourceId) ? { - id: managedDiskResourceId - } : null - snapshot: !empty(snapshotResourceId) ? { - id: snapshotResourceId - } : null - } - dataDisks: dataDisks - zoneResilient: zoneResilient - } - hyperVGeneration: hyperVGeneration - sourceVirtualMachine: !empty(sourceVirtualMachineResourceId) ? { - id: sourceVirtualMachineResourceId - } : null - } -} - -resource image_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(image.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: image -}] - -@description('The resource ID of the image.') -output resourceId string = image.id - -@description('The resource group the image was deployed into.') -output resourceGroupName string = resourceGroup().name - -@description('The name of the image.') -output name string = image.name - -@description('The location the resource was deployed into.') -output location string = image.location -// =============== // -// Definitions // -// =============== // - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/image/main.json b/modules/compute/image/main.json deleted file mode 100644 index b3099a9dec..0000000000 --- a/modules/compute/image/main.json +++ /dev/null @@ -1,320 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "6473488393825855372" - }, - "name": "Images", - "description": "This module deploys a Compute Image.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the image." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "osDiskBlobUri": { - "type": "string", - "metadata": { - "description": "Required. The Virtual Hard Disk." - } - }, - "osType": { - "type": "string", - "metadata": { - "description": "Required. This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. - Windows or Linux." - } - }, - "osDiskCaching": { - "type": "string", - "metadata": { - "description": "Optional. Specifies the caching requirements. Default: None for Standard storage. ReadOnly for Premium storage. - None, ReadOnly, ReadWrite." - } - }, - "osAccountType": { - "type": "string", - "metadata": { - "description": "Optional. Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. - Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS." - } - }, - "zoneResilient": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Default is false. Specifies whether an image is zone resilient or not. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS)." - } - }, - "hyperVGeneration": { - "type": "string", - "defaultValue": "V1", - "metadata": { - "description": "Optional. Gets the HyperVGenerationType of the VirtualMachine created from the image. - V1 or V2." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the resource." - } - }, - "extendedLocation": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. The extended location of the Image." - } - }, - "sourceVirtualMachineResourceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The source virtual machine from which Image is created." - } - }, - "diskEncryptionSetResourceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Specifies the customer managed disk encryption set resource ID for the managed image disk." - } - }, - "managedDiskResourceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The managedDisk." - } - }, - "diskSizeGB": { - "type": "int", - "defaultValue": 128, - "metadata": { - "description": "Optional. Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB." - } - }, - "osState": { - "type": "string", - "defaultValue": "Generalized", - "allowedValues": [ - "Generalized", - "Specialized" - ], - "metadata": { - "description": "Optional. The OS State. For managed images, use Generalized." - } - }, - "snapshotResourceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. The snapshot resource ID." - } - }, - "dataDisks": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Specifies the parameters that are used to add a data disk to a virtual machine." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "image": { - "type": "Microsoft.Compute/images", - "apiVersion": "2022-11-01", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "extendedLocation": "[if(not(empty(parameters('extendedLocation'))), parameters('extendedLocation'), null())]", - "properties": { - "storageProfile": { - "osDisk": { - "osType": "[parameters('osType')]", - "blobUri": "[parameters('osDiskBlobUri')]", - "caching": "[parameters('osDiskCaching')]", - "storageAccountType": "[parameters('osAccountType')]", - "osState": "[parameters('osState')]", - "diskEncryptionSet": "[if(not(empty(parameters('diskEncryptionSetResourceId'))), createObject('id', parameters('diskEncryptionSetResourceId')), null())]", - "diskSizeGB": "[parameters('diskSizeGB')]", - "managedDisk": "[if(not(empty(parameters('managedDiskResourceId'))), createObject('id', parameters('managedDiskResourceId')), null())]", - "snapshot": "[if(not(empty(parameters('snapshotResourceId'))), createObject('id', parameters('snapshotResourceId')), null())]" - }, - "dataDisks": "[parameters('dataDisks')]", - "zoneResilient": "[parameters('zoneResilient')]" - }, - "hyperVGeneration": "[parameters('hyperVGeneration')]", - "sourceVirtualMachine": "[if(not(empty(parameters('sourceVirtualMachineResourceId'))), createObject('id', parameters('sourceVirtualMachineResourceId')), null())]" - } - }, - "image_roleAssignments": { - "copy": { - "name": "image_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/images/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/images', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "image" - ] - } - }, - "outputs": { - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the image." - }, - "value": "[resourceId('Microsoft.Compute/images', parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the image was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the image." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('image', '2022-11-01', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/image/tests/e2e/max/dependencies.bicep b/modules/compute/image/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 2a31d8730b..0000000000 --- a/modules/compute/image/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,218 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Storage Account to create and to copy the VHD into.') -param storageAccountName string - -@description('Required. The name of the Disk Encryption Set to create.') -param diskEncryptionSetName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name prefix of the Image Template to create.') -param imageTemplateNamePrefix string - -@description('Generated. Do not provide a value! This date value is used to generate a unique image template name.') -param baseTime string = utcNow('yyyy-MM-dd-HH-mm-ss') - -@description('Required. The name of the Deployment Script to create for triggering the image creation.') -param triggerImageDeploymentScriptName string - -@description('Required. The name of the Deployment Script to copy the VHD to a destination storage account.') -param copyVhdDeploymentScriptName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { - name: storageAccountName - location: location - kind: 'StorageV2' - sku: { - name: 'Standard_LRS' - } - properties: { - allowBlobPublicAccess: false - } - resource blobServices 'blobServices@2022-09-01' = { - name: 'default' - resource container 'containers@2022-09-01' = { - name: 'vhds' - properties: { - publicAccess: 'None' - } - } - } -} - -module roleAssignment 'dependencies_rbac.bicep' = { - name: '${deployment().name}-MSI-roleAssignment' - scope: subscription() - params: { - managedIdentityPrincipalId: managedIdentity.properties.principalId - managedIdentityResourceId: managedIdentity.id - } -} - -// Deploy image template -resource imageTemplate 'Microsoft.VirtualMachineImages/imageTemplates@2022-02-14' = { - #disable-next-line use-stable-resource-identifiers - name: '${imageTemplateNamePrefix}-${baseTime}' - location: location - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - buildTimeoutInMinutes: 0 - vmProfile: { - vmSize: 'Standard_D2s_v3' - osDiskSizeGB: 127 - } - source: { - type: 'PlatformImage' - publisher: 'MicrosoftWindowsDesktop' - offer: 'Windows-11' - sku: 'win11-21h2-avd' - version: 'latest' - } - distribute: [ - { - type: 'VHD' - runOutputName: '${imageTemplateNamePrefix}-VHD' - artifactTags: {} - } - ] - customize: [ - { - restartTimeout: '30m' - type: 'WindowsRestart' - } - ] - } -} - -// Trigger VHD creation -resource triggerImageDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: triggerImageDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ImageTemplateName \\"${imageTemplate.name}\\" -ImageTemplateResourceGroup \\"${resourceGroup().name}\\"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Start-ImageTemplate.ps1') - cleanupPreference: 'OnSuccess' - forceUpdateTag: baseTime - } - dependsOn: [ - roleAssignment - ] -} - -// Copy VHD to destination storage account -resource copyVhdDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: copyVhdDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ImageTemplateName \\"${imageTemplate.name}\\" -ImageTemplateResourceGroup \\"${resourceGroup().name}\\" -DestinationStorageAccountName \\"${storageAccount.name}\\" -VhdName \\"${imageTemplateNamePrefix}\\" -WaitForComplete' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Copy-VhdToStorageAccount.ps1') - cleanupPreference: 'OnSuccess' - forceUpdateTag: baseTime - } - dependsOn: [ triggerImageDeploymentScript ] -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: true // Required for encrption to work - softDeleteRetentionInDays: 7 - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'encryptionKey' - properties: { - kty: 'RSA' - } - } -} - -resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment') - scope: keyVault::key - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User - principalType: 'ServicePrincipal' - } -} - -resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2022-07-02' = { - name: diskEncryptionSetName - location: location - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - activeKey: { - sourceVault: { - id: keyVault.id - } - keyUrl: keyVault::key.properties.keyUriWithVersion - } - encryptionType: 'EncryptionAtRestWithCustomerKey' - } - dependsOn: [ - keyPermissions - ] -} - -@description('The URI of the created VHD.') -output vhdUri string = 'https://${storageAccount.name}.blob.${environment().suffixes.storage}/vhds/${imageTemplateNamePrefix}.vhd' - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id - -@description('The resource ID of the created Disk Encryption Set.') -output diskEncryptionSetResourceId string = diskEncryptionSet.id diff --git a/modules/compute/image/tests/e2e/max/dependencies_rbac.bicep b/modules/compute/image/tests/e2e/max/dependencies_rbac.bicep deleted file mode 100644 index cdca1b63bd..0000000000 --- a/modules/compute/image/tests/e2e/max/dependencies_rbac.bicep +++ /dev/null @@ -1,16 +0,0 @@ -targetScope = 'subscription' - -@description('Required. The resource ID of the created Managed Identity.') -param managedIdentityResourceId string - -@description('Required. The principal ID of the created Managed Identity.') -param managedIdentityPrincipalId string - -resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(subscription().subscriptionId, 'Contributor', managedIdentityResourceId) - properties: { - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalId: managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } -} diff --git a/modules/compute/image/tests/e2e/max/main.test.bicep b/modules/compute/image/tests/e2e/max/main.test.bicep deleted file mode 100644 index 4ef529aeea..0000000000 --- a/modules/compute/image/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,97 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'cimax' - -@description('Generated. Used as a basis for unique resource names.') -param baseTime string = utcNow('u') - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total) - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' - diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}' - storageAccountName: 'dep${namePrefix}sa${serviceShort}01' - imageTemplateNamePrefix: 'dep-${namePrefix}-imgt-${serviceShort}' - triggerImageDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-triggerImageTemplate' - copyVhdDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-copyVhdToStorage' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - osAccountType: 'Premium_LRS' - osDiskBlobUri: nestedDependencies.outputs.vhdUri - osDiskCaching: 'ReadWrite' - osType: 'Windows' - hyperVGeneration: 'V1' - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - zoneResilient: true - diskEncryptionSetResourceId: nestedDependencies.outputs.diskEncryptionSetResourceId - osState: 'Generalized' - diskSizeGB: 128 - tags: { - 'hidden-title': 'This is visible in the resource name' - tagA: 'You\'re it' - tagB: 'Player' - } - } -}] diff --git a/modules/compute/image/tests/e2e/waf-aligned/dependencies.bicep b/modules/compute/image/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index 2a31d8730b..0000000000 --- a/modules/compute/image/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,218 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Storage Account to create and to copy the VHD into.') -param storageAccountName string - -@description('Required. The name of the Disk Encryption Set to create.') -param diskEncryptionSetName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name prefix of the Image Template to create.') -param imageTemplateNamePrefix string - -@description('Generated. Do not provide a value! This date value is used to generate a unique image template name.') -param baseTime string = utcNow('yyyy-MM-dd-HH-mm-ss') - -@description('Required. The name of the Deployment Script to create for triggering the image creation.') -param triggerImageDeploymentScriptName string - -@description('Required. The name of the Deployment Script to copy the VHD to a destination storage account.') -param copyVhdDeploymentScriptName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { - name: storageAccountName - location: location - kind: 'StorageV2' - sku: { - name: 'Standard_LRS' - } - properties: { - allowBlobPublicAccess: false - } - resource blobServices 'blobServices@2022-09-01' = { - name: 'default' - resource container 'containers@2022-09-01' = { - name: 'vhds' - properties: { - publicAccess: 'None' - } - } - } -} - -module roleAssignment 'dependencies_rbac.bicep' = { - name: '${deployment().name}-MSI-roleAssignment' - scope: subscription() - params: { - managedIdentityPrincipalId: managedIdentity.properties.principalId - managedIdentityResourceId: managedIdentity.id - } -} - -// Deploy image template -resource imageTemplate 'Microsoft.VirtualMachineImages/imageTemplates@2022-02-14' = { - #disable-next-line use-stable-resource-identifiers - name: '${imageTemplateNamePrefix}-${baseTime}' - location: location - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - buildTimeoutInMinutes: 0 - vmProfile: { - vmSize: 'Standard_D2s_v3' - osDiskSizeGB: 127 - } - source: { - type: 'PlatformImage' - publisher: 'MicrosoftWindowsDesktop' - offer: 'Windows-11' - sku: 'win11-21h2-avd' - version: 'latest' - } - distribute: [ - { - type: 'VHD' - runOutputName: '${imageTemplateNamePrefix}-VHD' - artifactTags: {} - } - ] - customize: [ - { - restartTimeout: '30m' - type: 'WindowsRestart' - } - ] - } -} - -// Trigger VHD creation -resource triggerImageDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: triggerImageDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ImageTemplateName \\"${imageTemplate.name}\\" -ImageTemplateResourceGroup \\"${resourceGroup().name}\\"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Start-ImageTemplate.ps1') - cleanupPreference: 'OnSuccess' - forceUpdateTag: baseTime - } - dependsOn: [ - roleAssignment - ] -} - -// Copy VHD to destination storage account -resource copyVhdDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: copyVhdDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ImageTemplateName \\"${imageTemplate.name}\\" -ImageTemplateResourceGroup \\"${resourceGroup().name}\\" -DestinationStorageAccountName \\"${storageAccount.name}\\" -VhdName \\"${imageTemplateNamePrefix}\\" -WaitForComplete' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Copy-VhdToStorageAccount.ps1') - cleanupPreference: 'OnSuccess' - forceUpdateTag: baseTime - } - dependsOn: [ triggerImageDeploymentScript ] -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: true // Required for encrption to work - softDeleteRetentionInDays: 7 - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'encryptionKey' - properties: { - kty: 'RSA' - } - } -} - -resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment') - scope: keyVault::key - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User - principalType: 'ServicePrincipal' - } -} - -resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2022-07-02' = { - name: diskEncryptionSetName - location: location - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - activeKey: { - sourceVault: { - id: keyVault.id - } - keyUrl: keyVault::key.properties.keyUriWithVersion - } - encryptionType: 'EncryptionAtRestWithCustomerKey' - } - dependsOn: [ - keyPermissions - ] -} - -@description('The URI of the created VHD.') -output vhdUri string = 'https://${storageAccount.name}.blob.${environment().suffixes.storage}/vhds/${imageTemplateNamePrefix}.vhd' - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id - -@description('The resource ID of the created Disk Encryption Set.') -output diskEncryptionSetResourceId string = diskEncryptionSet.id diff --git a/modules/compute/image/tests/e2e/waf-aligned/dependencies_rbac.bicep b/modules/compute/image/tests/e2e/waf-aligned/dependencies_rbac.bicep deleted file mode 100644 index cdca1b63bd..0000000000 --- a/modules/compute/image/tests/e2e/waf-aligned/dependencies_rbac.bicep +++ /dev/null @@ -1,16 +0,0 @@ -targetScope = 'subscription' - -@description('Required. The resource ID of the created Managed Identity.') -param managedIdentityResourceId string - -@description('Required. The principal ID of the created Managed Identity.') -param managedIdentityPrincipalId string - -resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(subscription().subscriptionId, 'Contributor', managedIdentityResourceId) - properties: { - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalId: managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } -} diff --git a/modules/compute/image/tests/e2e/waf-aligned/main.test.bicep b/modules/compute/image/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index ee4dfe3db0..0000000000 --- a/modules/compute/image/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,80 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.images-${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 = 'ciwaf' - -@description('Generated. Used as a basis for unique resource names.') -param baseTime string = utcNow('u') - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total) - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' - diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}' - storageAccountName: 'dep${namePrefix}sa${serviceShort}01' - imageTemplateNamePrefix: 'dep-${namePrefix}-imgt-${serviceShort}' - triggerImageDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-triggerImageTemplate' - copyVhdDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-copyVhdToStorage' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - osAccountType: 'Premium_LRS' - osDiskBlobUri: nestedDependencies.outputs.vhdUri - osDiskCaching: 'ReadWrite' - osType: 'Windows' - hyperVGeneration: 'V1' - zoneResilient: true - diskEncryptionSetResourceId: nestedDependencies.outputs.diskEncryptionSetResourceId - osState: 'Generalized' - diskSizeGB: 128 - tags: { - 'hidden-title': 'This is visible in the resource name' - tagA: 'You\'re it' - tagB: 'Player' - } - } -}] diff --git a/modules/compute/image/version.json b/modules/compute/image/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/image/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/proximity-placement-group/README.md b/modules/compute/proximity-placement-group/README.md index 613055ce67..0afddae7c8 100644 --- a/modules/compute/proximity-placement-group/README.md +++ b/modules/compute/proximity-placement-group/README.md @@ -1,566 +1,7 @@ -# Proximity Placement Groups `[Microsoft.Compute/proximityPlacementGroups]` +
-
-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": "cppgmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module proximityPlacementGroup 'br:bicep/modules/compute.proximity-placement-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cppgmax'
- params: {
- // Required parameters
- name: 'cppgmax001'
- // Non-required parameters
- colocationStatus: {
- code: 'ColocationStatus/Aligned'
- displayStatus: 'Aligned'
- level: 'Info'
- message: 'I\'m a default error message'
- }
- enableDefaultTelemetry: '
-
-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": "cppgmax001"
- },
- // Non-required parameters
- "colocationStatus": {
- "value": {
- "code": "ColocationStatus/Aligned",
- "displayStatus": "Aligned",
- "level": "Info",
- "message": "I\"m a default error message"
- }
- },
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module proximityPlacementGroup 'br:bicep/modules/compute.proximity-placement-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cppgwaf'
- params: {
- // Required parameters
- name: 'cppgwaf001'
- // Non-required parameters
- colocationStatus: {
- code: 'ColocationStatus/Aligned'
- displayStatus: 'Aligned'
- level: 'Info'
- message: 'I\'m a default error message'
- }
- enableDefaultTelemetry: '
-
-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": "cppgwaf001"
- },
- // Non-required parameters
- "colocationStatus": {
- "value": {
- "code": "ColocationStatus/Aligned",
- "displayStatus": "Aligned",
- "level": "Info",
- "message": "I\"m a default error message"
- }
- },
- "enableDefaultTelemetry": {
- "value": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`name`](#parameter-name) | string | The name of the proximity placement group that is being created. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`colocationStatus`](#parameter-colocationstatus) | object | Describes colocation status of the Proximity Placement Group. | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`intent`](#parameter-intent) | object | Specifies the user intent of the proximity placement group. | -| [`location`](#parameter-location) | string | Resource location. | -| [`lock`](#parameter-lock) | object | The lock settings of the service. | -| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. | -| [`tags`](#parameter-tags) | object | Tags of the proximity placement group resource. | -| [`type`](#parameter-type) | string | Specifies the type of the proximity placement group. | -| [`zones`](#parameter-zones) | array | Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. | - -### Parameter: `name` - -The name of the proximity placement group that is being created. - -- Required: Yes -- Type: string - -### Parameter: `colocationStatus` - -Describes colocation status of the Proximity Placement Group. - -- Required: No -- Type: object -- Default: `{}` - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `intent` - -Specifies the user intent of the proximity placement group. - -- Required: No -- Type: object -- Default: `{}` - -### Parameter: `location` - -Resource location. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `lock` - -The lock settings of the service. - -- Required: No -- Type: object - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`kind`](#parameter-lockkind) | string | Specify the type of lock. | -| [`name`](#parameter-lockname) | string | Specify the name of lock. | - -### Parameter: `lock.kind` - -Specify the type of lock. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'CanNotDelete' - 'None' - 'ReadOnly' - ] - ``` - -### Parameter: `lock.name` - -Specify the name of lock. - -- Required: No -- Type: string - -### Parameter: `roleAssignments` - -Array of role assignments to create. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `tags` - -Tags of the proximity placement group resource. - -- Required: No -- Type: object - -### Parameter: `type` - -Specifies the type of the proximity placement group. - -- Required: No -- Type: string -- Default: `'Standard'` -- Allowed: - ```Bicep - [ - 'Standard' - 'Ultra' - ] - ``` - -### Parameter: `zones` - -Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. - -- Required: No -- Type: array -- Default: `[]` - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the proximity placement group. | -| `resourceGroupName` | string | The resource group the proximity placement group was deployed into. | -| `resourceId` | string | The resourceId the proximity placement group. | - -## Cross-referenced modules - -_None_ +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/compute/proximity-placement-group/main.bicep b/modules/compute/proximity-placement-group/main.bicep deleted file mode 100644 index 45047683d4..0000000000 --- a/modules/compute/proximity-placement-group/main.bicep +++ /dev/null @@ -1,139 +0,0 @@ -metadata name = 'Proximity Placement Groups' -metadata description = 'This module deploys a Proximity Placement Group.' -metadata owner = 'Azure/module-maintainers' - -@description('Required. The name of the proximity placement group that is being created.') -param name string - -@description('Optional. Specifies the type of the proximity placement group.') -@allowed([ - 'Standard' - 'Ultra' -]) -param type string = 'Standard' - -@description('Optional. Resource location.') -param location string = resourceGroup().location - -@description('Optional. The lock settings of the service.') -param lock lockType - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -@description('Optional. Tags of the proximity placement group resource.') -param tags object? - -@description('Optional. Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created.') -param zones array = [] - -@description('Optional. Describes colocation status of the Proximity Placement Group.') -param colocationStatus object = {} - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. Specifies the user intent of the proximity placement group.') -param intent object = {} - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource proximityPlacementGroup 'Microsoft.Compute/proximityPlacementGroups@2022-08-01' = { - name: name - location: location - tags: tags - zones: zones - properties: { - proximityPlacementGroupType: type - colocationStatus: colocationStatus - intent: !empty(intent) ? intent : null - } -} - -resource proximityPlacementGroup_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: proximityPlacementGroup -} - -resource proximityPlacementGroup_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(proximityPlacementGroup.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: proximityPlacementGroup -}] - -@description('The name of the proximity placement group.') -output name string = proximityPlacementGroup.name - -@description('The resourceId the proximity placement group.') -output resourceId string = proximityPlacementGroup.id - -@description('The resource group the proximity placement group was deployed into.') -output resourceGroupName string = resourceGroup().name - -@description('The location the resource was deployed into.') -output location string = proximityPlacementGroup.location - -// =============== // -// Definitions // -// =============== // - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/proximity-placement-group/main.json b/modules/compute/proximity-placement-group/main.json deleted file mode 100644 index 6d3f4e9580..0000000000 --- a/modules/compute/proximity-placement-group/main.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "1474026739792714088" - }, - "name": "Proximity Placement Groups", - "description": "This module deploys a Proximity Placement Group.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the proximity placement group that is being created." - } - }, - "type": { - "type": "string", - "defaultValue": "Standard", - "allowedValues": [ - "Standard", - "Ultra" - ], - "metadata": { - "description": "Optional. Specifies the type of the proximity placement group." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Resource location." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the proximity placement group resource." - } - }, - "zones": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created." - } - }, - "colocationStatus": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Describes colocation status of the Proximity Placement Group." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "intent": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Specifies the user intent of the proximity placement group." - } - } - }, - "variables": { - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "proximityPlacementGroup": { - "type": "Microsoft.Compute/proximityPlacementGroups", - "apiVersion": "2022-08-01", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "zones": "[parameters('zones')]", - "properties": { - "proximityPlacementGroupType": "[parameters('type')]", - "colocationStatus": "[parameters('colocationStatus')]", - "intent": "[if(not(empty(parameters('intent'))), parameters('intent'), null())]" - } - }, - "proximityPlacementGroup_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.Compute/proximityPlacementGroups/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "proximityPlacementGroup" - ] - }, - "proximityPlacementGroup_roleAssignments": { - "copy": { - "name": "proximityPlacementGroup_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/proximityPlacementGroups/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/proximityPlacementGroups', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "proximityPlacementGroup" - ] - } - }, - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the proximity placement group." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resourceId the proximity placement group." - }, - "value": "[resourceId('Microsoft.Compute/proximityPlacementGroups', parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group the proximity placement group was deployed into." - }, - "value": "[resourceGroup().name]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('proximityPlacementGroup', '2022-08-01', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep b/modules/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep deleted file mode 100644 index 9ac35b31d9..0000000000 --- a/modules/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep +++ /dev/null @@ -1,49 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using only defaults' -metadata description = 'This instance deploys the module with the minimum set of required parameters.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.proximityplacementgroups-${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 = 'cppgmin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - } -}] diff --git a/modules/compute/proximity-placement-group/tests/e2e/max/dependencies.bicep b/modules/compute/proximity-placement-group/tests/e2e/max/dependencies.bicep deleted file mode 100644 index a7f42aee7b..0000000000 --- a/modules/compute/proximity-placement-group/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/proximity-placement-group/tests/e2e/max/main.test.bicep b/modules/compute/proximity-placement-group/tests/e2e/max/main.test.bicep deleted file mode 100644 index a0e4f0cbc6..0000000000 --- a/modules/compute/proximity-placement-group/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,99 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.proximityplacementgroups-${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 = 'cppgmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - roleAssignments: [ - { - roleDefinitionIdOrName: 'Owner' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c' - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - { - roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - principalType: 'ServicePrincipal' - } - ] - zones: [ - '1' - ] - type: 'Standard' - tags: { - 'hidden-title': 'This is visible in the resource name' - TagA: 'Would you kindly...' - TagB: 'Tags for sale' - } - colocationStatus: { - code: 'ColocationStatus/Aligned' - displayStatus: 'Aligned' - level: 'Info' - message: 'I\'m a default error message' - } - intent: { - vmSizes: [ - 'Standard_B1ms' - 'Standard_B4ms' - ] - } - } -}] diff --git a/modules/compute/proximity-placement-group/tests/e2e/waf-aligned/dependencies.bicep b/modules/compute/proximity-placement-group/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index a7f42aee7b..0000000000 --- a/modules/compute/proximity-placement-group/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,13 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep b/modules/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index db7c9800b0..0000000000 --- a/modules/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,82 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.proximityplacementgroups-${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 = 'cppgwaf' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - zones: [ - '1' - ] - type: 'Standard' - tags: { - 'hidden-title': 'This is visible in the resource name' - TagA: 'Would you kindly...' - TagB: 'Tags for sale' - } - colocationStatus: { - code: 'ColocationStatus/Aligned' - displayStatus: 'Aligned' - level: 'Info' - message: 'I\'m a default error message' - } - intent: { - vmSizes: [ - 'Standard_B1ms' - 'Standard_B4ms' - ] - } - } -}] diff --git a/modules/compute/proximity-placement-group/version.json b/modules/compute/proximity-placement-group/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/proximity-placement-group/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/ssh-public-key/MOVED-TO-AVM.md b/modules/compute/ssh-public-key/MOVED-TO-AVM.md deleted file mode 100644 index cec0941d12..0000000000 --- a/modules/compute/ssh-public-key/MOVED-TO-AVM.md +++ /dev/null @@ -1 +0,0 @@ -This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml). diff --git a/modules/compute/ssh-public-key/README.md b/modules/compute/ssh-public-key/README.md index 509a83961d..c137535989 100644 --- a/modules/compute/ssh-public-key/README.md +++ b/modules/compute/ssh-public-key/README.md @@ -1,384 +1,7 @@ -# Public SSH Keys `[Microsoft.Compute/sshPublicKeys]` +
-
-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": "cspkmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module sshPublicKey 'br:bicep/modules/compute.ssh-public-key:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cspkmax'
- params: {
- // Required parameters
- name: 'sshkey-cspkmax001'
- // Non-required parameters
- enableDefaultTelemetry: '
-
-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": "sshkey-cspkmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-via Bicep module
-
-```bicep
-module sshPublicKey 'br:bicep/modules/compute.ssh-public-key:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cspkwaf'
- params: {
- // Required parameters
- name: 'sshkey-cspkwaf001'
- // Non-required parameters
- enableDefaultTelemetry: '
-
-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": "sshkey-cspkwaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "
- - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`name`](#parameter-name) | string | The name of the SSH public Key that is being created. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`location`](#parameter-location) | string | Resource location. | -| [`lock`](#parameter-lock) | object | The lock settings of the service. | -| [`publicKey`](#parameter-publickey) | string | SSH public key used to authenticate to a virtual machine through SSH. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. | -| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| [`tags`](#parameter-tags) | object | Tags of the availability set resource. | - -### Parameter: `name` - -The name of the SSH public Key that is being created. - -- Required: Yes -- Type: string - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `location` - -Resource location. - -- Required: No -- Type: string -- Default: `[resourceGroup().location]` - -### Parameter: `lock` - -The lock settings of the service. - -- Required: No -- Type: object - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`kind`](#parameter-lockkind) | string | Specify the type of lock. | -| [`name`](#parameter-lockname) | string | Specify the name of lock. | - -### Parameter: `lock.kind` - -Specify the type of lock. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'CanNotDelete' - 'None' - 'ReadOnly' - ] - ``` - -### Parameter: `lock.name` - -Specify the name of lock. - -- Required: No -- Type: string - -### Parameter: `publicKey` - -SSH public key used to authenticate to a virtual machine through SSH. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `roleAssignments` - -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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. - -- Required: No -- Type: array - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. | -| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" | -| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. | -| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. | -| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. | -| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. | - -### Parameter: `roleAssignments.principalId` - -The principal ID of the principal (user/group/identity) to assign the role to. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.roleDefinitionIdOrName` - -The name of the role to assign. If it cannot be found you can specify the role definition ID instead. - -- Required: Yes -- Type: string - -### Parameter: `roleAssignments.condition` - -The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" - -- Required: No -- Type: string - -### Parameter: `roleAssignments.conditionVersion` - -Version of the condition. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - '2.0' - ] - ``` - -### Parameter: `roleAssignments.delegatedManagedIdentityResourceId` - -The Resource Id of the delegated managed identity resource. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.description` - -The description of the role assignment. - -- Required: No -- Type: string - -### Parameter: `roleAssignments.principalType` - -The principal type of the assigned principal ID. - -- Required: No -- Type: string -- Allowed: - ```Bicep - [ - 'Device' - 'ForeignGroup' - 'Group' - 'ServicePrincipal' - 'User' - ] - ``` - -### Parameter: `tags` - -Tags of the availability set resource. - -- Required: No -- Type: object - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the Public SSH Key. | -| `resourceGroupName` | string | The name of the Resource Group the Public SSH Key was created in. | -| `resourceId` | string | The resource ID of the Public SSH Key. | - -## Cross-referenced modules - -_None_ +For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/compute/ssh-public-key/main.bicep b/modules/compute/ssh-public-key/main.bicep deleted file mode 100644 index 42728721ff..0000000000 --- a/modules/compute/ssh-public-key/main.bicep +++ /dev/null @@ -1,125 +0,0 @@ -metadata name = 'Public SSH Keys' -metadata description = '''This module deploys a Public SSH Key. - -> Note: The resource does not auto-generate the key for you.''' -metadata owner = 'Azure/module-maintainers' - -@description('Required. The name of the SSH public Key that is being created.') -param name string - -@description('Optional. Resource location.') -param location string = resourceGroup().location - -@description('Optional. SSH public key used to authenticate to a virtual machine through SSH. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.') -param publicKey string = '' - -@description('Optional. The lock settings of the service.') -param lock lockType - -@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') -param roleAssignments roleAssignmentType - -@description('Optional. Tags of the availability set resource.') -param tags object? - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource sshPublicKey 'Microsoft.Compute/sshPublicKeys@2022-08-01' = { - name: name - location: location - tags: tags - properties: { - publicKey: !empty(publicKey) ? publicKey : null - } -} - -resource sshPublicKey_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: sshPublicKey -} - -resource sshPublicKey_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(sshPublicKey.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: sshPublicKey -}] - -@description('The name of the Resource Group the Public SSH Key was created in.') -output resourceGroupName string = resourceGroup().name - -@description('The resource ID of the Public SSH Key.') -output resourceId string = sshPublicKey.id - -@description('The name of the Public SSH Key.') -output name string = sshPublicKey.name - -@description('The location the resource was deployed into.') -output location string = sshPublicKey.location - -// =============== // -// Definitions // -// =============== // - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? diff --git a/modules/compute/ssh-public-key/main.json b/modules/compute/ssh-public-key/main.json deleted file mode 100644 index bf19a6c816..0000000000 --- a/modules/compute/ssh-public-key/main.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "5802465844150331034" - }, - "name": "Public SSH Keys", - "description": "This module deploys a Public SSH Key.\r\n\r\n> Note: The resource does not auto-generate the key for you.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the SSH public Key that is being created." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Resource location." - } - }, - "publicKey": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. SSH public key used to authenticate to a virtual machine through SSH. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the availability set resource." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "variables": { - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "sshPublicKey": { - "type": "Microsoft.Compute/sshPublicKeys", - "apiVersion": "2022-08-01", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "properties": { - "publicKey": "[if(not(empty(parameters('publicKey'))), parameters('publicKey'), null())]" - } - }, - "sshPublicKey_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.Compute/sshPublicKeys/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "sshPublicKey" - ] - }, - "sshPublicKey_roleAssignments": { - "copy": { - "name": "sshPublicKey_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/sshPublicKeys/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/sshPublicKeys', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "sshPublicKey" - ] - } - }, - "outputs": { - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the Public SSH Key was created in." - }, - "value": "[resourceGroup().name]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the Public SSH Key." - }, - "value": "[resourceId('Microsoft.Compute/sshPublicKeys', parameters('name'))]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the Public SSH Key." - }, - "value": "[parameters('name')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('sshPublicKey', '2022-08-01', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep b/modules/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep deleted file mode 100644 index c0e78b3fd3..0000000000 --- a/modules/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep +++ /dev/null @@ -1,48 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using only defaults' -metadata description = 'This instance deploys the module with the minimum set of required parameters.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.sshPublicKeys-${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 = 'cspkmin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-${serviceShort}001' - } -}] diff --git a/modules/compute/ssh-public-key/tests/e2e/max/dependencies.bicep b/modules/compute/ssh-public-key/tests/e2e/max/dependencies.bicep deleted file mode 100644 index 13a584595b..0000000000 --- a/modules/compute/ssh-public-key/tests/e2e/max/dependencies.bicep +++ /dev/null @@ -1,61 +0,0 @@ -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -@description('Optional. Name of the Deployment Script that creates the SSH Public Key.') -param generateSshPubKeyScriptName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. Name of the temporary SSH Public Key to create for test.') -param sshKeyName string - -@description('Optional. Do not provide a value. Used to force the deployment script to rerun on every redeployment.') -param utcValue string = utcNow() - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -// required for the deployment script to create a new temporary ssh public key object -resource msi_ContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(resourceGroup().id, 'ManagedIdentityContributor', '[[namePrefix]]') - properties: { - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalId: managedIdentity.properties.principalId - principalType: 'ServicePrincipal' - } -} - -resource createPubKeyScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: generateSshPubKeyScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ResourceGroupName ${resourceGroup().name} -SSHKeyName ${sshKeyName}' - scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1') - cleanupPreference: 'OnExpiration' - forceUpdateTag: utcValue - } - dependsOn: [ - msi_ContributorRoleAssignment - ] -} - -@description('The public key to be added to the SSH Public Key resource.') -output publicKey string = createPubKeyScript.properties.outputs.publicKey - -@description('The resource ID of the managed Identity') -output managedIdentityId string = managedIdentity.id - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/ssh-public-key/tests/e2e/max/main.test.bicep b/modules/compute/ssh-public-key/tests/e2e/max/main.test.bicep deleted file mode 100644 index 5913288f41..0000000000 --- a/modules/compute/ssh-public-key/tests/e2e/max/main.test.bicep +++ /dev/null @@ -1,61 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'Using large parameter set' -metadata description = 'This instance deploys the module with most of its features enabled.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.sshPublicKeys-${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.') -@maxLength(7) -param serviceShort string = 'cspkmax' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - generateSshPubKeyScriptName: 'dep-${namePrefix}-ds-${serviceShort}-generateSshPubKey' - sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-sshkey-${serviceShort}001' - publicKey: nestedDependencies.outputs.publicKey - } -}] diff --git a/modules/compute/ssh-public-key/tests/e2e/waf-aligned/dependencies.bicep b/modules/compute/ssh-public-key/tests/e2e/waf-aligned/dependencies.bicep deleted file mode 100644 index 13a584595b..0000000000 --- a/modules/compute/ssh-public-key/tests/e2e/waf-aligned/dependencies.bicep +++ /dev/null @@ -1,61 +0,0 @@ -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -@description('Optional. Name of the Deployment Script that creates the SSH Public Key.') -param generateSshPubKeyScriptName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. Name of the temporary SSH Public Key to create for test.') -param sshKeyName string - -@description('Optional. Do not provide a value. Used to force the deployment script to rerun on every redeployment.') -param utcValue string = utcNow() - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -// required for the deployment script to create a new temporary ssh public key object -resource msi_ContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(resourceGroup().id, 'ManagedIdentityContributor', '[[namePrefix]]') - properties: { - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalId: managedIdentity.properties.principalId - principalType: 'ServicePrincipal' - } -} - -resource createPubKeyScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: generateSshPubKeyScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '8.0' - retentionInterval: 'P1D' - arguments: '-ResourceGroupName ${resourceGroup().name} -SSHKeyName ${sshKeyName}' - scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1') - cleanupPreference: 'OnExpiration' - forceUpdateTag: utcValue - } - dependsOn: [ - msi_ContributorRoleAssignment - ] -} - -@description('The public key to be added to the SSH Public Key resource.') -output publicKey string = createPubKeyScript.properties.outputs.publicKey - -@description('The resource ID of the managed Identity') -output managedIdentityId string = managedIdentity.id - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep b/modules/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep deleted file mode 100644 index 38825503d4..0000000000 --- a/modules/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep +++ /dev/null @@ -1,61 +0,0 @@ -targetScope = 'subscription' - -metadata name = 'WAF-aligned' -metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.sshPublicKeys-${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.') -@maxLength(7) -param serviceShort string = 'cspkwaf' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - generateSshPubKeyScriptName: 'dep-${namePrefix}-ds-${serviceShort}-generateSshPubKey' - sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}-sshkey-${serviceShort}001' - publicKey: nestedDependencies.outputs.publicKey - } -}] diff --git a/modules/compute/ssh-public-key/version.json b/modules/compute/ssh-public-key/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/ssh-public-key/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/virtual-machine-scale-set/README.md b/modules/compute/virtual-machine-scale-set/README.md index 5479ba0268..1184774517 100644 --- a/modules/compute/virtual-machine-scale-set/README.md +++ b/modules/compute/virtual-machine-scale-set/README.md @@ -1,2769 +1,7 @@ -# Virtual Machine Scale Sets `[Microsoft.Compute/virtualMachineScaleSets]` +
-
-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
- "adminUsername": {
- "value": "scaleSetAdmin"
- },
- "imageReference": {
- "value": {
- "offer": "0001-com-ubuntu-server-jammy",
- "publisher": "Canonical",
- "sku": "22_04-lts-gen2",
- "version": "latest"
- }
- },
- "name": {
- "value": "cvmsslinmin001"
- },
- "osDisk": {
- "value": {
- "createOption": "fromImage",
- "diskSizeGB": "128",
- "managedDisk": {
- "storageAccountType": "Premium_LRS"
- }
- }
- },
- "osType": {
- "value": "Linux"
- },
- "skuName": {
- "value": "Standard_B12ms"
- },
- // Non-required parameters
- "disablePasswordAuthentication": {
- "value": true
- },
- "enableDefaultTelemetry": {
- "value": "
-
-### Example 2: _Linux.Ssecmk_
-
-via Bicep module
-
-```bicep
-module virtualMachineScaleSet 'br:bicep/modules/compute.virtual-machine-scale-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmsslcmk'
- params: {
- // Required parameters
- adminUsername: 'scaleSetAdmin'
- imageReference: {
- offer: '0001-com-ubuntu-server-jammy'
- publisher: 'Canonical'
- sku: '22_04-lts-gen2'
- version: 'latest'
- }
- name: 'cvmsslcmk001'
- osDisk: {
- createOption: 'fromImage'
- diskSizeGB: '128'
- managedDisk: {
- diskEncryptionSet: {
- id: '
-
-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
- "adminUsername": {
- "value": "scaleSetAdmin"
- },
- "imageReference": {
- "value": {
- "offer": "0001-com-ubuntu-server-jammy",
- "publisher": "Canonical",
- "sku": "22_04-lts-gen2",
- "version": "latest"
- }
- },
- "name": {
- "value": "cvmsslcmk001"
- },
- "osDisk": {
- "value": {
- "createOption": "fromImage",
- "diskSizeGB": "128",
- "managedDisk": {
- "diskEncryptionSet": {
- "id": "
-
-### Example 3: _Linux_
-
-via Bicep module
-
-```bicep
-module virtualMachineScaleSet 'br:bicep/modules/compute.virtual-machine-scale-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmsslin'
- params: {
- // Required parameters
- adminUsername: 'scaleSetAdmin'
- imageReference: {
- offer: '0001-com-ubuntu-server-jammy'
- publisher: 'Canonical'
- sku: '22_04-lts-gen2'
- version: 'latest'
- }
- name: 'cvmsslin001'
- osDisk: {
- createOption: 'fromImage'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Linux'
- skuName: 'Standard_B12ms'
- // Non-required parameters
- availabilityZones: [
- '2'
- ]
- bootDiagnosticStorageAccountName: '
-
-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
- "adminUsername": {
- "value": "scaleSetAdmin"
- },
- "imageReference": {
- "value": {
- "offer": "0001-com-ubuntu-server-jammy",
- "publisher": "Canonical",
- "sku": "22_04-lts-gen2",
- "version": "latest"
- }
- },
- "name": {
- "value": "cvmsslin001"
- },
- "osDisk": {
- "value": {
- "createOption": "fromImage",
- "diskSizeGB": "128",
- "managedDisk": {
- "storageAccountType": "Premium_LRS"
- }
- }
- },
- "osType": {
- "value": "Linux"
- },
- "skuName": {
- "value": "Standard_B12ms"
- },
- // Non-required parameters
- "availabilityZones": {
- "value": [
- "2"
- ]
- },
- "bootDiagnosticStorageAccountName": {
- "value": "
-
-### Example 4: _Windows.Min_
-
-via Bicep module
-
-```bicep
-module virtualMachineScaleSet 'br:bicep/modules/compute.virtual-machine-scale-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmsswinmin'
- params: {
- // Required parameters
- adminUsername: 'localAdminUser'
- imageReference: {
- offer: 'WindowsServer'
- publisher: 'MicrosoftWindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
- }
- name: 'cvmsswinmin001'
- osDisk: {
- createOption: 'fromImage'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Windows'
- skuName: 'Standard_B12ms'
- // Non-required parameters
- adminPassword: '
-
-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
- "adminUsername": {
- "value": "localAdminUser"
- },
- "imageReference": {
- "value": {
- "offer": "WindowsServer",
- "publisher": "MicrosoftWindowsServer",
- "sku": "2022-datacenter-azure-edition",
- "version": "latest"
- }
- },
- "name": {
- "value": "cvmsswinmin001"
- },
- "osDisk": {
- "value": {
- "createOption": "fromImage",
- "diskSizeGB": "128",
- "managedDisk": {
- "storageAccountType": "Premium_LRS"
- }
- }
- },
- "osType": {
- "value": "Windows"
- },
- "skuName": {
- "value": "Standard_B12ms"
- },
- // Non-required parameters
- "adminPassword": {
- "value": "
-
-### Example 5: _Windows_
-
-via Bicep module
-
-```bicep
-module virtualMachineScaleSet 'br:bicep/modules/compute.virtual-machine-scale-set:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmsswin'
- params: {
- // Required parameters
- adminUsername: 'localAdminUser'
- imageReference: {
- offer: 'WindowsServer'
- publisher: 'MicrosoftWindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
- }
- name: 'cvmsswin001'
- osDisk: {
- createOption: 'fromImage'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Windows'
- skuName: 'Standard_B12ms'
- // Non-required parameters
- adminPassword: '
-
-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
- "adminUsername": {
- "value": "localAdminUser"
- },
- "imageReference": {
- "value": {
- "offer": "WindowsServer",
- "publisher": "MicrosoftWindowsServer",
- "sku": "2022-datacenter-azure-edition",
- "version": "latest"
- }
- },
- "name": {
- "value": "cvmsswin001"
- },
- "osDisk": {
- "value": {
- "createOption": "fromImage",
- "diskSizeGB": "128",
- "managedDisk": {
- "storageAccountType": "Premium_LRS"
- }
- }
- },
- "osType": {
- "value": "Windows"
- },
- "skuName": {
- "value": "Standard_B12ms"
- },
- // Non-required parameters
- "adminPassword": {
- "value": "
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`adminUsername`](#parameter-adminusername) | securestring | Administrator username. |
-| [`imageReference`](#parameter-imagereference) | object | OS image reference. In case of marketplace images, it's the combination of the publisher, offer, sku, version attributes. In case of custom images it's the resource ID of the custom image. |
-| [`name`](#parameter-name) | string | Name of the VMSS. |
-| [`nicConfigurations`](#parameter-nicconfigurations) | array | Configures NICs and PIPs. |
-| [`osDisk`](#parameter-osdisk) | object | Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets. |
-| [`osType`](#parameter-ostype) | string | The chosen OS type. |
-| [`skuName`](#parameter-skuname) | string | The SKU size of the VMs. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`additionalUnattendContent`](#parameter-additionalunattendcontent) | array | Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object. |
-| [`adminPassword`](#parameter-adminpassword) | securestring | When specifying a Windows Virtual Machine, this value should be passed. |
-| [`automaticRepairsPolicyEnabled`](#parameter-automaticrepairspolicyenabled) | bool | Specifies whether automatic repairs should be enabled on the virtual machine scale set. |
-| [`availabilityZones`](#parameter-availabilityzones) | array | The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set. |
-| [`bootDiagnosticStorageAccountName`](#parameter-bootdiagnosticstorageaccountname) | string | Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided. |
-| [`bootDiagnosticStorageAccountUri`](#parameter-bootdiagnosticstorageaccounturi) | string | Storage account boot diagnostic base URI. |
-| [`customData`](#parameter-customdata) | string | Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format. |
-| [`dataDisks`](#parameter-datadisks) | array | Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableAutomaticRollback`](#parameter-disableautomaticrollback) | bool | Whether OS image rollback feature should be disabled. |
-| [`disablePasswordAuthentication`](#parameter-disablepasswordauthentication) | bool | Specifies whether password authentication should be disabled. |
-| [`doNotRunExtensionsOnOverprovisionedVMs`](#parameter-donotrunextensionsonoverprovisionedvms) | bool | When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. |
-| [`enableAutomaticOSUpgrade`](#parameter-enableautomaticosupgrade) | bool | Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true. |
-| [`enableAutomaticUpdates`](#parameter-enableautomaticupdates) | bool | Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enableEvictionPolicy`](#parameter-enableevictionpolicy) | bool | Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy. |
-| [`encryptionAtHost`](#parameter-encryptionathost) | bool | This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your virtual machine scale sets. |
-| [`extensionAntiMalwareConfig`](#parameter-extensionantimalwareconfig) | object | The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionAzureDiskEncryptionConfig`](#parameter-extensionazurediskencryptionconfig) | object | The configuration for the [Azure Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys. |
-| [`extensionCustomScriptConfig`](#parameter-extensioncustomscriptconfig) | object | The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionDependencyAgentConfig`](#parameter-extensiondependencyagentconfig) | object | The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionDomainJoinConfig`](#parameter-extensiondomainjoinconfig) | object | The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionDomainJoinPassword`](#parameter-extensiondomainjoinpassword) | securestring | Required if name is specified. Password of the user specified in user parameter. |
-| [`extensionDSCConfig`](#parameter-extensiondscconfig) | object | The configuration for the [Desired State Configuration] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionMonitoringAgentConfig`](#parameter-extensionmonitoringagentconfig) | object | The configuration for the [Monitoring Agent] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionNetworkWatcherAgentConfig`](#parameter-extensionnetworkwatcheragentconfig) | object | The configuration for the [Network Watcher Agent] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`gracePeriod`](#parameter-graceperiod) | string | The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M). The maximum allowed grace period is 90 minutes (PT90M). |
-| [`licenseType`](#parameter-licensetype) | string | Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`maxBatchInstancePercent`](#parameter-maxbatchinstancepercent) | int | The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. |
-| [`maxPriceForLowPriorityVm`](#parameter-maxpriceforlowpriorityvm) | string | Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars. |
-| [`maxUnhealthyInstancePercent`](#parameter-maxunhealthyinstancepercent) | int | The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. |
-| [`maxUnhealthyUpgradedInstancePercent`](#parameter-maxunhealthyupgradedinstancepercent) | int | The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. |
-| [`monitoringWorkspaceId`](#parameter-monitoringworkspaceid) | string | Resource ID of the monitoring log analytics workspace. |
-| [`overprovision`](#parameter-overprovision) | bool | Specifies whether the Virtual Machine Scale Set should be overprovisioned. |
-| [`pauseTimeBetweenBatches`](#parameter-pausetimebetweenbatches) | string | The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. |
-| [`plan`](#parameter-plan) | object | Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. |
-| [`provisionVMAgent`](#parameter-provisionvmagent) | bool | Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. |
-| [`proximityPlacementGroupResourceId`](#parameter-proximityplacementgroupresourceid) | string | Resource ID of a proximity placement group. |
-| [`publicKeys`](#parameter-publickeys) | array | The list of SSH public keys used to authenticate with linux based VMs. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`sasTokenValidityLength`](#parameter-sastokenvaliditylength) | string | SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours. |
-| [`scaleInPolicy`](#parameter-scaleinpolicy) | object | Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. |
-| [`scaleSetFaultDomain`](#parameter-scalesetfaultdomain) | int | Fault Domain count for each placement group. |
-| [`scheduledEventsProfile`](#parameter-scheduledeventsprofile) | object | Specifies Scheduled Event related configurations. |
-| [`secrets`](#parameter-secrets) | array | Specifies set of certificates that should be installed onto the virtual machines in the scale set. |
-| [`secureBootEnabled`](#parameter-securebootenabled) | bool | Specifies whether secure boot should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. |
-| [`securityType`](#parameter-securitytype) | string | Specifies the SecurityType of the virtual machine scale set. It is set as TrustedLaunch to enable UefiSettings. |
-| [`singlePlacementGroup`](#parameter-singleplacementgroup) | bool | When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. |
-| [`skuCapacity`](#parameter-skucapacity) | int | The initial instance count of scale set VMs. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`timeZone`](#parameter-timezone) | string | Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`. |
-| [`ultraSSDEnabled`](#parameter-ultrassdenabled) | bool | The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. |
-| [`upgradePolicyMode`](#parameter-upgradepolicymode) | string | Specifies the mode of an upgrade to virtual machines in the scale set.' Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. ; Automatic - All virtual machines in the scale set are automatically updated at the same time. - Automatic, Manual, Rolling. |
-| [`vmNamePrefix`](#parameter-vmnameprefix) | string | Specifies the computer name prefix for all of the virtual machines in the scale set. |
-| [`vmPriority`](#parameter-vmpriority) | string | Specifies the priority for the virtual machine. |
-| [`vTpmEnabled`](#parameter-vtpmenabled) | bool | Specifies whether vTPM should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. |
-| [`winRM`](#parameter-winrm) | object | Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object. |
-| [`zoneBalance`](#parameter-zonebalance) | bool | Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`baseTime`](#parameter-basetime) | string | Do not provide a value! This date value is used to generate a registration token. |
-
-### Parameter: `adminUsername`
-
-Administrator username.
-
-- Required: Yes
-- Type: securestring
-
-### Parameter: `imageReference`
-
-OS image reference. In case of marketplace images, it's the combination of the publisher, offer, sku, version attributes. In case of custom images it's the resource ID of the custom image.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-Name of the VMSS.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `nicConfigurations`
-
-Configures NICs and PIPs.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `osDisk`
-
-Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `osType`
-
-The chosen OS type.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `skuName`
-
-The SKU size of the VMs.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `additionalUnattendContent`
-
-Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `adminPassword`
-
-When specifying a Windows Virtual Machine, this value should be passed.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `automaticRepairsPolicyEnabled`
-
-Specifies whether automatic repairs should be enabled on the virtual machine scale set.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `availabilityZones`
-
-The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `bootDiagnosticStorageAccountName`
-
-Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `bootDiagnosticStorageAccountUri`
-
-Storage account boot diagnostic base URI.
-
-- Required: No
-- Type: string
-- Default: `[format('.blob.{0}/', environment().suffixes.storage)]`
-
-### Parameter: `customData`
-
-Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `dataDisks`
-
-Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableAutomaticRollback`
-
-Whether OS image rollback feature should be disabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `disablePasswordAuthentication`
-
-Specifies whether password authentication should be disabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `doNotRunExtensionsOnOverprovisionedVMs`
-
-When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableAutomaticOSUpgrade`
-
-Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableAutomaticUpdates`
-
-Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableEvictionPolicy`
-
-Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `encryptionAtHost`
-
-This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your virtual machine scale sets.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `extensionAntiMalwareConfig`
-
-The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionAzureDiskEncryptionConfig`
-
-The configuration for the [Azure Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionCustomScriptConfig`
-
-The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- fileData: []
- }
- ```
-
-### Parameter: `extensionDependencyAgentConfig`
-
-The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionDomainJoinConfig`
-
-The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionDomainJoinPassword`
-
-Required if name is specified. Password of the user specified in user parameter.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `extensionDSCConfig`
-
-The configuration for the [Desired State Configuration] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionMonitoringAgentConfig`
-
-The configuration for the [Monitoring Agent] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionNetworkWatcherAgentConfig`
-
-The configuration for the [Network Watcher Agent] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `gracePeriod`
-
-The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M). The maximum allowed grace period is 90 minutes (PT90M).
-
-- Required: No
-- Type: string
-- Default: `'PT30M'`
-
-### Parameter: `licenseType`
-
-Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Windows_Client'
- 'Windows_Server'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `maxBatchInstancePercent`
-
-The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability.
-
-- Required: No
-- Type: int
-- Default: `20`
-
-### Parameter: `maxPriceForLowPriorityVm`
-
-Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `maxUnhealthyInstancePercent`
-
-The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch.
-
-- Required: No
-- Type: int
-- Default: `20`
-
-### Parameter: `maxUnhealthyUpgradedInstancePercent`
-
-The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch.
-
-- Required: No
-- Type: int
-- Default: `20`
-
-### Parameter: `monitoringWorkspaceId`
-
-Resource ID of the monitoring log analytics workspace.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `overprovision`
-
-Specifies whether the Virtual Machine Scale Set should be overprovisioned.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `pauseTimeBetweenBatches`
-
-The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.
-
-- Required: No
-- Type: string
-- Default: `'PT0S'`
-
-### Parameter: `plan`
-
-Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `provisionVMAgent`
-
-Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `proximityPlacementGroupResourceId`
-
-Resource ID of a proximity placement group.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `publicKeys`
-
-The list of SSH public keys used to authenticate with linux based VMs.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `sasTokenValidityLength`
-
-SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours.
-
-- Required: No
-- Type: string
-- Default: `'PT8H'`
-
-### Parameter: `scaleInPolicy`
-
-Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- rules: [
- 'Default'
- ]
- }
- ```
-
-### Parameter: `scaleSetFaultDomain`
-
-Fault Domain count for each placement group.
-
-- Required: No
-- Type: int
-- Default: `2`
-
-### Parameter: `scheduledEventsProfile`
-
-Specifies Scheduled Event related configurations.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `secrets`
-
-Specifies set of certificates that should be installed onto the virtual machines in the scale set.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `secureBootEnabled`
-
-Specifies whether secure boot should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `securityType`
-
-Specifies the SecurityType of the virtual machine scale set. It is set as TrustedLaunch to enable UefiSettings.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `singlePlacementGroup`
-
-When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `skuCapacity`
-
-The initial instance count of scale set VMs.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `timeZone`
-
-Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `ultraSSDEnabled`
-
-The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `upgradePolicyMode`
-
-Specifies the mode of an upgrade to virtual machines in the scale set.' Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. ; Automatic - All virtual machines in the scale set are automatically updated at the same time. - Automatic, Manual, Rolling.
-
-- Required: No
-- Type: string
-- Default: `'Manual'`
-- Allowed:
- ```Bicep
- [
- 'Automatic'
- 'Manual'
- 'Rolling'
- ]
- ```
-
-### Parameter: `vmNamePrefix`
-
-Specifies the computer name prefix for all of the virtual machines in the scale set.
-
-- Required: No
-- Type: string
-- Default: `'vmssvm'`
-
-### Parameter: `vmPriority`
-
-Specifies the priority for the virtual machine.
-
-- Required: No
-- Type: string
-- Default: `'Regular'`
-- Allowed:
- ```Bicep
- [
- 'Low'
- 'Regular'
- 'Spot'
- ]
- ```
-
-### Parameter: `vTpmEnabled`
-
-Specifies whether vTPM should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `winRM`
-
-Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `zoneBalance`
-
-Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `baseTime`
-
-Do not provide a value! This date value is used to generate a registration token.
-
-- Required: No
-- Type: string
-- Default: `[utcNow('u')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the virtual machine scale set. |
-| `resourceGroupName` | string | The resource group of the virtual machine scale set. |
-| `resourceId` | string | The resource ID of the virtual machine scale set. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `imageReference`
-
-#### Marketplace images
-
-Parameter JSON format
-
-```json
-"imageReference": {
- "value": {
- "publisher": "MicrosoftWindowsServer",
- "offer": "WindowsServer",
- "sku": "2022-datacenter-azure-edition",
- "version": "latest"
- }
-}
-```
-
-Bicep format
-
-```bicep
-imageReference: {
- publisher: 'MicrosoftWindowsServer'
- offer: 'WindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
-}
-```
-
-Parameter JSON format
-
-```json
-"imageReference": {
- "value": {
- "id": "/subscriptions/12345-6789-1011-1213-15161718/resourceGroups/rg-name/providers/Microsoft.Compute/images/imagename"
- }
-}
-```
-
-Bicep format
-
-```bicep
-imageReference: {
- id: '/subscriptions/12345-6789-1011-1213-15161718/resourceGroups/rg-name/providers/Microsoft.Compute/images/imagename'
-}
-```
-
-
-
-### Parameter Usage: `plan`
-
-Parameter JSON format
-
-```json
-"plan": {
- "value": {
- "name": "qvsa-25",
- "product": "qualys-virtual-scanner",
- "publisher": "qualysguard"
- }
-}
-```
-
-Bicep format
-
-```bicep
-plan: {
- name: 'qvsa-25'
- product: 'qualys-virtual-scanner'
- publisher: 'qualysguard'
-}
-```
-
-
-
-### Parameter Usage: `osDisk`
-
-Parameter JSON format
-
-```json
-"osDisk": {
- "value": {
- "createOption": "fromImage",
- "diskSizeGB": "128",
- "managedDisk": {
- "storageAccountType": "Premium_LRS",
- "diskEncryptionSet": { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.
- "id": "/subscriptions/Bicep format
-
-```bicep
-osDisk: {
- createOption: 'fromImage'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- diskEncryptionSet: { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.
- id: '/subscriptions/
-
-### Parameter Usage: `dataDisks`
-
-Parameter JSON format
-
-```json
-"dataDisks": {
- "value": [
- {
- "caching": "ReadOnly",
- "createOption": "Empty",
- "diskSizeGB": "256",
- "writeAcceleratorEnabled": true,
- "managedDisk": {
- "storageAccountType": "Premium_LRS",
- "diskEncryptionSet": { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.
- "id": "/subscriptions/Bicep format
-
-```bicep
-dataDisks: [
- {
- caching: 'ReadOnly'
- createOption: 'Empty'
- diskSizeGB: '256'
- writeAcceleratorEnabled: true
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- diskEncryptionSet: { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.
- id: '/subscriptions/
-
-### Parameter Usage: `nicConfigurations`
-
-Comments:
-- The field `nicSuffix` is mandatory.
-- If not disabled, `enableAcceleratedNetworking` is considered `true` by default and requires the VMSS to be deployed with a supported OS and VM size.
-
-Parameter JSON format
-
-```json
-"nicConfigurations": {
- "value": [
- {
- "nicSuffix": "-nic01",
- "ipConfigurations": [
- {
- "name": "ipconfig1",
- "properties": {
- "subnet": {
- "id": "/subscriptions/[[subscriptionId]]/resourceGroups/agents-vmss-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-scaleset/subnets/sxx-az-subnet-scaleset-linux"
- }
- }
- }
- ]
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-nicConfigurations: [
- {
- nicSuffix: '-nic01'
- ipConfigurations: [
- {
- name: 'ipconfig1'
- properties: {
- subnet: {
- id: '/subscriptions/[[subscriptionId]]/resourceGroups/agents-vmss-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-scaleset/subnets/sxx-az-subnet-scaleset-linux'
- }
- }
- }
- ]
- }
-]
-```
-
-
-
-### Parameter Usage: `extensionDomainJoinConfig`
-
-Parameter JSON format
-
-```json
-"extensionDomainJoinConfig": {
- "value": {
- "enabled": true,
- "settings": {
- "name": "contoso.com",
- "user": "test.user@testcompany.com",
- "ouPath": "OU=testOU; DC=contoso; DC=com",
- "restart": true,
- "options": 3
- }
- }
-},
-"extensionDomainJoinPassword": {
- "reference": {
- "keyVault": {
- "id": "/subscriptions/<Bicep format
-
-```bicep
-extensionDomainJoinConfig: {
- enabled: true
- settings: {
- name: 'contoso.com'
- user: 'test.user@testcompany.com'
- ouPath: 'OU=testOU; DC=contoso; DC=com'
- restart: true
- options: 3
- }
-}
-
-resource kv1 'Microsoft.KeyVault/vaults@2019-09-01' existing = {
- name: 'adp-[[namePrefix]]-az-kv-x-001'
- scope: resourceGroup('[[subscriptionId]]','validation-rg')
-}
-
-extensionDomainJoinPassword: kv1.getSecret('domainJoinUser02-Password')
-```
-
-
-
-### Parameter Usage: `extensionNetworkWatcherAgentConfig`
-
-Parameter JSON format
-
-```json
-"extensionNetworkWatcherAgentConfig": {
- "value": {
- "enabled": true
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionNetworkWatcherAgentConfig: {
- enabled: true
-}
-```
-
-
-
-### Parameter Usage: `extensionAntiMalwareConfig`
-
-Only for OSType Windows
-
-Parameter JSON format
-
-```json
-"extensionAntiMalwareConfig": {
- "value": {
- "enabled": true,
- "settings": {
- "AntimalwareEnabled": true,
- "Exclusions": {
- "Extensions": ".log;.ldf",
- "Paths": "D:\\IISlogs;D:\\DatabaseLogs",
- "Processes": "mssence.svc"
- },
- "RealtimeProtectionEnabled": true,
- "ScheduledScanSettings": {
- "isEnabled": "true",
- "scanType": "Quick",
- "day": "7",
- "time": "120"
- }
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionAntiMalwareConfig: {
- enabled: true
- settings: {
- AntimalwareEnabled: true
- Exclusions: {
- Extensions: '.log;.ldf'
- Paths: 'D:\\IISlogs;D:\\DatabaseLogs'
- Processes: 'mssence.svc'
- }
- RealtimeProtectionEnabled: true
- ScheduledScanSettings: {
- isEnabled: 'true'
- scanType: 'Quick'
- day: '7'
- time: '120'
- }
- }
-}
-```
-
-
-
-### Parameter Usage: `extensionAzureDiskEncryptionConfig`
-
-Parameter JSON format
-
-```json
-"extensionAzureDiskEncryptionConfig": {
- // Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.
- "value": {
- "enabled": true,
- "settings": {
- "EncryptionOperation": "EnableEncryption",
- "KeyVaultURL": "https://mykeyvault.vault.azure.net/",
- "KeyVaultResourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001",
- "KeyEncryptionKeyURL": "https://mykeyvault.vault.azure.net/keys/keyEncryptionKey/bc3bb46d95c64367975d722f473eeae5", // ID must be updated for new keys
- "KekVaultResourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001",
- "KeyEncryptionAlgorithm": "RSA-OAEP", //'RSA-OAEP'/'RSA-OAEP-256'/'RSA1_5'
- "VolumeType": "All", //'OS'/'Data'/'All'
- "ResizeOSDisk": "false"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionAzureDiskEncryptionConfig: {
- // Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.
- enabled: true
- settings: {
- EncryptionOperation: 'EnableEncryption'
- KeyVaultURL: 'https://mykeyvault.vault.azure.net/'
- KeyVaultResourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001'
- KeyEncryptionKeyURL: 'https://mykeyvault.vault.azure.net/keys/keyEncryptionKey/bc3bb46d95c64367975d722f473eeae5' // ID must be updated for new keys
- KekVaultResourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001'
- KeyEncryptionAlgorithm: 'RSA-OAEP' //'RSA-OAEP'/'RSA-OAEP-256'/'RSA1_5'
- VolumeType: 'All' //'OS'/'Data'/'All'
- ResizeOSDisk: 'false'
- }
-}
-```
-
-
-
-### Parameter Usage: `extensionCustomScriptConfig`
-
-Parameter JSON format
-
-```json
-"extensionCustomScriptConfig": {
- "value": {
- "enabled": true,
- "fileData": [
- //storage accounts with SAS token requirement
- {
- "uri": "https://mystorageaccount.blob.core.windows.net/avdscripts/File1.ps1",
- "storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName"
- },
- {
- "uri": "https://mystorageaccount.blob.core.windows.net/avdscripts/File2.ps1",
- "storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName"
- },
- //storage account with public container (no SAS token is required) OR other public URL (not a storage account)
- {
- "uri": "https://github.com/myProject/File3.ps1",
- "storageAccountId": ""
- }
- ],
- "settings": {
- "commandToExecute": "powershell -ExecutionPolicy Unrestricted -File testscript.ps1"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionCustomScriptConfig: {
- enabled: true
- fileData: [
- //storage accounts with SAS token requirement
- {
- uri: 'https://mystorageaccount.blob.core.windows.net/avdscripts/File1.ps1'
- storageAccountId: '/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName'
- }
- {
- uri: 'https://mystorageaccount.blob.core.windows.net/avdscripts/File2.ps1'
- storageAccountId: '/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName'
- }
- //storage account with public container (no SAS token is required) OR other public URL (not a storage account)
- {
- uri: 'https://github.com/myProject/File3.ps1'
- storageAccountId: ''
- }
- ]
- settings: {
- commandToExecute: 'powershell -ExecutionPolicy Unrestricted -File testscript.ps1'
- }
-}
-```
-
-
-
-### Parameter Usage: `extensionDSCConfig`
-
-Parameter JSON format
-
-```json
-"extensionDSCConfig": {
- "value": {
- "enabled": true,
- "settings": {
- "wmfVersion": "latest",
- "configuration": {
- "url": "http://validURLToConfigLocation",
- "script": "ConfigurationScript.ps1",
- "function": "ConfigurationFunction"
- },
- "configurationArguments": {
- "argument1": "Value1",
- "argument2": "Value2"
- },
- "configurationData": {
- "url": "https://foo.psd1"
- },
- "privacy": {
- "dataCollection": "enable"
- },
- "advancedOptions": {
- "forcePullAndApply": false,
- "downloadMappings": {
- "specificDependencyKey": "https://myCustomDependencyLocation"
- }
- }
- },
- "protectedSettings": {
- "configurationArguments": {
- "mySecret": "MyPlaceholder"
- },
- "configurationUrlSasToken": "MyPlaceholder",
- "configurationDataUrlSasToken": "MyPlaceholder"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionDSCConfig: {
- enabled: true
- settings: {
- wmfVersion: 'latest'
- configuration: {
- url: 'http://validURLToConfigLocation'
- script: 'ConfigurationScript.ps1'
- function: 'ConfigurationFunction'
- }
- configurationArguments: {
- argument1: 'Value1'
- argument2: 'Value2'
- }
- configurationData: {
- url: 'https://foo.psd1'
- }
- privacy: {
- dataCollection: 'enable'
- }
- advancedOptions: {
- forcePullAndApply: false
- downloadMappings: {
- specificDependencyKey: 'https://myCustomDependencyLocation'
- }
- }
- }
- protectedSettings: {
- configurationArguments: {
- mySecret: 'MyPlaceholder'
- }
- configurationUrlSasToken: 'MyPlaceholder'
- configurationDataUrlSasToken: 'MyPlaceholder'
- }
-}
-```
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F). diff --git a/modules/compute/virtual-machine-scale-set/extension/README.md b/modules/compute/virtual-machine-scale-set/extension/README.md deleted file mode 100644 index 9053bdd926..0000000000 --- a/modules/compute/virtual-machine-scale-set/extension/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# Virtual Machine Scale Set Extensions `[Microsoft.Compute/virtualMachineScaleSets/extensions]` - -This module deploys a Virtual Machine Scale Set Extension. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) -- [Cross-referenced modules](#Cross-referenced-modules) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Compute/virtualMachineScaleSets/extensions` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Compute/2022-11-01/virtualMachineScaleSets/extensions) | - -## Parameters - -**Required parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`autoUpgradeMinorVersion`](#parameter-autoupgrademinorversion) | bool | Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. | -| [`enableAutomaticUpgrade`](#parameter-enableautomaticupgrade) | bool | Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. | -| [`name`](#parameter-name) | string | The name of the virtual machine scale set extension. | -| [`publisher`](#parameter-publisher) | string | The name of the extension handler publisher. | -| [`type`](#parameter-type) | string | Specifies the type of the extension; an example is "CustomScriptExtension". | -| [`typeHandlerVersion`](#parameter-typehandlerversion) | string | Specifies the version of the script handler. | - -**Conditional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`virtualMachineScaleSetName`](#parameter-virtualmachinescalesetname) | string | The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment. | - -**Optional parameters** - -| Parameter | Type | Description | -| :-- | :-- | :-- | -| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | -| [`forceUpdateTag`](#parameter-forceupdatetag) | string | How the extension handler should be forced to update even if the extension configuration has not changed. | -| [`protectedSettings`](#parameter-protectedsettings) | secureObject | Any object that contains the extension specific protected settings. | -| [`settings`](#parameter-settings) | object | Any object that contains the extension specific settings. | -| [`supressFailures`](#parameter-supressfailures) | bool | Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. | - -### Parameter: `autoUpgradeMinorVersion` - -Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. - -- Required: Yes -- Type: bool - -### Parameter: `enableAutomaticUpgrade` - -Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. - -- Required: Yes -- Type: bool - -### Parameter: `name` - -The name of the virtual machine scale set extension. - -- Required: Yes -- Type: string - -### Parameter: `publisher` - -The name of the extension handler publisher. - -- Required: Yes -- Type: string - -### Parameter: `type` - -Specifies the type of the extension; an example is "CustomScriptExtension". - -- Required: Yes -- Type: string - -### Parameter: `typeHandlerVersion` - -Specifies the version of the script handler. - -- Required: Yes -- Type: string - -### Parameter: `virtualMachineScaleSetName` - -The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment. - -- Required: Yes -- Type: string - -### Parameter: `enableDefaultTelemetry` - -Enable telemetry via a Globally Unique Identifier (GUID). - -- Required: No -- Type: bool -- Default: `True` - -### Parameter: `forceUpdateTag` - -How the extension handler should be forced to update even if the extension configuration has not changed. - -- Required: No -- Type: string -- Default: `''` - -### Parameter: `protectedSettings` - -Any object that contains the extension specific protected settings. - -- Required: No -- Type: secureObject -- Default: `{}` - -### Parameter: `settings` - -Any object that contains the extension specific settings. - -- Required: No -- Type: object -- Default: `{}` - -### Parameter: `supressFailures` - -Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. - -- Required: No -- Type: bool -- Default: `False` - - -## Outputs - -| Output | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The name of the extension. | -| `resourceGroupName` | string | The name of the Resource Group the extension was created in. | -| `resourceId` | string | The ResourceId of the extension. | - -## Cross-referenced modules - -_None_ diff --git a/modules/compute/virtual-machine-scale-set/extension/main.bicep b/modules/compute/virtual-machine-scale-set/extension/main.bicep deleted file mode 100644 index 9ec5064a7d..0000000000 --- a/modules/compute/virtual-machine-scale-set/extension/main.bicep +++ /dev/null @@ -1,81 +0,0 @@ -metadata name = 'Virtual Machine Scale Set Extensions' -metadata description = 'This module deploys a Virtual Machine Scale Set Extension.' -metadata owner = 'Azure/module-maintainers' - -@description('Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment.') -param virtualMachineScaleSetName string - -@description('Required. The name of the virtual machine scale set extension.') -param name string - -@description('Required. The name of the extension handler publisher.') -param publisher string - -@description('Required. Specifies the type of the extension; an example is "CustomScriptExtension".') -param type string - -@description('Required. Specifies the version of the script handler.') -param typeHandlerVersion string - -@description('Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.') -param autoUpgradeMinorVersion bool - -@description('Optional. How the extension handler should be forced to update even if the extension configuration has not changed.') -param forceUpdateTag string = '' - -@description('Optional. Any object that contains the extension specific settings.') -param settings object = {} - -@description('Optional. Any object that contains the extension specific protected settings.') -@secure() -param protectedSettings object = {} - -@description('Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.') -param supressFailures bool = false - -@description('Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.') -param enableAutomaticUpgrade bool - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource virtualMachineScaleSet 'Microsoft.Compute/virtualMachineScaleSets@2022-11-01' existing = { - name: virtualMachineScaleSetName -} - -resource extension 'Microsoft.Compute/virtualMachineScaleSets/extensions@2022-11-01' = { - name: name - parent: virtualMachineScaleSet - properties: { - publisher: publisher - type: type - typeHandlerVersion: typeHandlerVersion - autoUpgradeMinorVersion: autoUpgradeMinorVersion - enableAutomaticUpgrade: enableAutomaticUpgrade - forceUpdateTag: !empty(forceUpdateTag) ? forceUpdateTag : null - settings: !empty(settings) ? settings : null - protectedSettings: !empty(protectedSettings) ? protectedSettings : null - suppressFailures: supressFailures - } -} - -@description('The name of the extension.') -output name string = extension.name - -@description('The ResourceId of the extension.') -output resourceId string = extension.id - -@description('The name of the Resource Group the extension was created in.') -output resourceGroupName string = resourceGroup().name diff --git a/modules/compute/virtual-machine-scale-set/extension/main.json b/modules/compute/virtual-machine-scale-set/extension/main.json deleted file mode 100644 index d63e240501..0000000000 --- a/modules/compute/virtual-machine-scale-set/extension/main.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "5906561479759498703" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } -} \ No newline at end of file diff --git a/modules/compute/virtual-machine-scale-set/extension/version.json b/modules/compute/virtual-machine-scale-set/extension/version.json deleted file mode 100644 index 96236a61ba..0000000000 --- a/modules/compute/virtual-machine-scale-set/extension/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.4", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/virtual-machine-scale-set/main.bicep b/modules/compute/virtual-machine-scale-set/main.bicep deleted file mode 100644 index 0f845b192c..0000000000 --- a/modules/compute/virtual-machine-scale-set/main.bicep +++ /dev/null @@ -1,726 +0,0 @@ -metadata name = 'Virtual Machine Scale Sets' -metadata description = 'This module deploys a Virtual Machine Scale Set.' -metadata owner = 'Azure/module-maintainers' - -@description('Required. Name of the VMSS.') -param name string - -@description('Optional. Location for all resources.') -param location string = resourceGroup().location - -@description('Optional. This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your virtual machine scale sets.') -param encryptionAtHost bool = true - -@description('Optional. Specifies the SecurityType of the virtual machine scale set. It is set as TrustedLaunch to enable UefiSettings.') -param securityType string = '' - -@description('Optional. Specifies whether secure boot should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.') -param secureBootEnabled bool = false - -@description('Optional. Specifies whether vTPM should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.') -param vTpmEnabled bool = false - -@description('Required. OS image reference. In case of marketplace images, it\'s the combination of the publisher, offer, sku, version attributes. In case of custom images it\'s the resource ID of the custom image.') -param imageReference object - -@description('Optional. Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.') -param plan object = {} - -@description('Required. Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.') -param osDisk object - -@description('Optional. Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets.') -param dataDisks array = [] - -@description('Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.') -param ultraSSDEnabled bool = false - -@description('Required. Administrator username.') -@secure() -param adminUsername string - -@description('Optional. When specifying a Windows Virtual Machine, this value should be passed.') -@secure() -param adminPassword string = '' - -@description('Optional. Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format.') -param customData string = '' - -@description('Optional. Array of role assignments to create.') -param roleAssignments roleAssignmentType - -@description('Optional. Fault Domain count for each placement group.') -param scaleSetFaultDomain int = 2 - -@description('Optional. Resource ID of a proximity placement group.') -param proximityPlacementGroupResourceId string = '' - -@description('Required. Configures NICs and PIPs.') -param nicConfigurations array = [] - -@description('Optional. Specifies the priority for the virtual machine.') -@allowed([ - 'Regular' - 'Low' - 'Spot' -]) -param vmPriority string = 'Regular' - -@description('Optional. Specifies the eviction policy for the low priority virtual machine. Will result in \'Deallocate\' eviction policy.') -param enableEvictionPolicy bool = false - -@description('Optional. Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.') -param maxPriceForLowPriorityVm string = '' - -@description('Optional. Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.') -@allowed([ - 'Windows_Client' - 'Windows_Server' - '' -]) -param licenseType string = '' - -@description('Optional. Required if name is specified. Password of the user specified in user parameter.') -@secure() -param extensionDomainJoinPassword string = '' - -@description('Optional. The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionDomainJoinConfig object = { - enabled: false -} - -@description('Optional. The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionAntiMalwareConfig object = { - enabled: false -} - -@description('Optional. The configuration for the [Monitoring Agent] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionMonitoringAgentConfig object = { - enabled: false -} - -@description('Optional. Resource ID of the monitoring log analytics workspace.') -param monitoringWorkspaceId string = '' - -@description('Optional. The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionDependencyAgentConfig object = { - enabled: false -} - -@description('Optional. The configuration for the [Network Watcher Agent] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionNetworkWatcherAgentConfig object = { - enabled: false -} - -@description('Optional. The configuration for the [Azure Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.') -param extensionAzureDiskEncryptionConfig object = { - enabled: false -} - -@description('Optional. The configuration for the [Desired State Configuration] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionDSCConfig object = { - enabled: false -} - -@description('Optional. The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed.') -param extensionCustomScriptConfig object = { - enabled: false - fileData: [] -} - -@description('Optional. Storage account boot diagnostic base URI.') -param bootDiagnosticStorageAccountUri string = '.blob.${environment().suffixes.storage}/' - -@description('Optional. Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided.') -param bootDiagnosticStorageAccountName string = '' - -@description('Optional. The diagnostic settings of the service.') -param diagnosticSettings diagnosticSettingType - -@description('Optional. The lock settings of the service.') -param lock lockType - -@description('Optional. Specifies the mode of an upgrade to virtual machines in the scale set.\' Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. ; Automatic - All virtual machines in the scale set are automatically updated at the same time. - Automatic, Manual, Rolling.') -@allowed([ - 'Manual' - 'Automatic' - 'Rolling' -]) -param upgradePolicyMode string = 'Manual' - -@description('Optional. The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability.') -param maxBatchInstancePercent int = 20 - -@description('Optional. The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch.') -param maxUnhealthyInstancePercent int = 20 - -@description('Optional. The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch.') -param maxUnhealthyUpgradedInstancePercent int = 20 - -@description('Optional. The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.') -param pauseTimeBetweenBatches string = 'PT0S' - -@description('Optional. Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true.') -param enableAutomaticOSUpgrade bool = false - -@description('Optional. Whether OS image rollback feature should be disabled.') -param disableAutomaticRollback bool = false - -@description('Optional. Specifies whether automatic repairs should be enabled on the virtual machine scale set.') -param automaticRepairsPolicyEnabled bool = false - -@description('Optional. The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M). The maximum allowed grace period is 90 minutes (PT90M).') -param gracePeriod string = 'PT30M' - -@description('Optional. Specifies the computer name prefix for all of the virtual machines in the scale set.') -@minLength(1) -@maxLength(15) -param vmNamePrefix string = 'vmssvm' - -@description('Optional. Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.') -param provisionVMAgent bool = true - -@description('Optional. Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.') -param enableAutomaticUpdates bool = true - -@description('Optional. Specifies the time zone of the virtual machine. e.g. \'Pacific Standard Time\'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`.') -param timeZone string = '' - -@description('Optional. Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object.') -param additionalUnattendContent array = [] - -@description('Optional. Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object.') -param winRM object = {} - -@description('Optional. Specifies whether password authentication should be disabled.') -#disable-next-line secure-secrets-in-params // Not a secret -param disablePasswordAuthentication bool = false - -@description('Optional. The list of SSH public keys used to authenticate with linux based VMs.') -param publicKeys array = [] - -@description('Optional. Specifies set of certificates that should be installed onto the virtual machines in the scale set.') -#disable-next-line secure-secrets-in-params // Not a secret -param secrets array = [] - -@description('Optional. Specifies Scheduled Event related configurations.') -param scheduledEventsProfile object = {} - -@description('Optional. Specifies whether the Virtual Machine Scale Set should be overprovisioned.') -param overprovision bool = false - -@description('Optional. When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.') -param doNotRunExtensionsOnOverprovisionedVMs bool = false - -@description('Optional. Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.') -param zoneBalance bool = false - -@description('Optional. When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.') -param singlePlacementGroup bool = true - -@description('Optional. Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.') -param scaleInPolicy object = { - rules: [ - 'Default' - ] -} - -@description('Required. The SKU size of the VMs.') -param skuName string - -@description('Optional. The initial instance count of scale set VMs.') -param skuCapacity int = 1 - -@description('Optional. The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set.') -param availabilityZones array = [] - -@description('Optional. Tags of the resource.') -param tags object? - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Required. The chosen OS type.') -@allowed([ - 'Windows' - 'Linux' -]) -param osType string - -@description('Generated. Do not provide a value! This date value is used to generate a registration token.') -param baseTime string = utcNow('u') - -@description('Optional. SAS token validity length to use to download files from storage accounts. Usage: \'PT8H\' - valid for 8 hours; \'P5D\' - valid for 5 days; \'P1Y\' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours.') -param sasTokenValidityLength string = 'PT8H' - -@description('Optional. The managed identity definition for this resource.') -param managedIdentities managedIdentitiesType - -var publicKeysFormatted = [for publicKey in publicKeys: { - path: publicKey.path - keyData: publicKey.keyData -}] - -var linuxConfiguration = { - disablePasswordAuthentication: disablePasswordAuthentication - ssh: { - publicKeys: publicKeysFormatted - } - provisionVMAgent: provisionVMAgent -} - -var windowsConfiguration = { - provisionVMAgent: provisionVMAgent - enableAutomaticUpdates: enableAutomaticUpdates - timeZone: empty(timeZone) ? null : timeZone - additionalUnattendContent: empty(additionalUnattendContent) ? null : additionalUnattendContent - winRM: !empty(winRM) ? { - listeners: winRM - } : null -} - -var accountSasProperties = { - signedServices: 'b' - signedPermission: 'r' - signedExpiry: dateTimeAdd(baseTime, sasTokenValidityLength) - signedResourceTypes: 'o' - signedProtocol: 'https' -} - -var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} } - -var identity = !empty(managedIdentities) ? { - type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null) - userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null -} : null - -var enableReferencedModulesTelemetry = false - -var builtInRoleNames = { - Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') - 'Data Operator for Managed Disks': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e') - 'Desktop Virtualization Power On Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '489581de-a3bd-480d-9518-53dea7416b33') - 'Desktop Virtualization Power On Off Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e') - 'Desktop Virtualization Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c') - 'DevTest Labs User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64') - 'Disk Backup Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24') - 'Disk Pool Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840') - 'Disk Restore Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13') - 'Disk Snapshot Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce') - Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635') - Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') - 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168') - 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') - 'Virtual Machine Administrator Login': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1c0163c0-47e6-4577-8991-ea5c82e286e4') - 'Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c') - 'Virtual Machine User Login': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fb879df8-f326-4884-b1cf-06f3ad86be52') - 'VM Scanner Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd24ecba3-c1f4-40fa-a7bb-4588a071e8fd') -} - -resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { - name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - } - } -} - -resource vmss 'Microsoft.Compute/virtualMachineScaleSets@2022-11-01' = { - name: name - location: location - tags: tags - identity: identity - zones: availabilityZones - properties: { - proximityPlacementGroup: !empty(proximityPlacementGroupResourceId) ? { - id: proximityPlacementGroupResourceId - } : null - upgradePolicy: { - mode: upgradePolicyMode - rollingUpgradePolicy: { - maxBatchInstancePercent: maxBatchInstancePercent - maxUnhealthyInstancePercent: maxUnhealthyInstancePercent - maxUnhealthyUpgradedInstancePercent: maxUnhealthyUpgradedInstancePercent - pauseTimeBetweenBatches: pauseTimeBetweenBatches - } - automaticOSUpgradePolicy: { - enableAutomaticOSUpgrade: enableAutomaticOSUpgrade - disableAutomaticRollback: disableAutomaticRollback - } - } - automaticRepairsPolicy: { - enabled: automaticRepairsPolicyEnabled - gracePeriod: gracePeriod - } - virtualMachineProfile: { - osProfile: { - computerNamePrefix: vmNamePrefix - adminUsername: adminUsername - adminPassword: !empty(adminPassword) ? adminPassword : null - customData: !empty(customData) ? base64(customData) : null - windowsConfiguration: osType == 'Windows' ? windowsConfiguration : null - linuxConfiguration: osType == 'Linux' ? linuxConfiguration : null - secrets: secrets - } - securityProfile: { - encryptionAtHost: encryptionAtHost ? encryptionAtHost : null - securityType: securityType - uefiSettings: securityType == 'TrustedLaunch' ? { - secureBootEnabled: secureBootEnabled - vTpmEnabled: vTpmEnabled - } : null - } - storageProfile: { - imageReference: imageReference - osDisk: { - createOption: osDisk.createOption - diskSizeGB: osDisk.diskSizeGB - caching: contains(osDisk, 'caching') ? osDisk.caching : null - writeAcceleratorEnabled: contains(osDisk, 'writeAcceleratorEnabled') ? osDisk.writeAcceleratorEnabled : null - diffDiskSettings: contains(osDisk, 'diffDiskSettings') ? osDisk.diffDiskSettings : null - osType: contains(osDisk, 'osType') ? osDisk.osType : null - image: contains(osDisk, 'image') ? osDisk.image : null - vhdContainers: contains(osDisk, 'vhdContainers') ? osDisk.vhdContainers : null - managedDisk: { - storageAccountType: osDisk.managedDisk.storageAccountType - diskEncryptionSet: contains(osDisk.managedDisk, 'diskEncryptionSet') ? { - id: osDisk.managedDisk.diskEncryptionSet.id - } : null - } - } - dataDisks: [for (dataDisk, index) in dataDisks: { - lun: index - diskSizeGB: dataDisk.diskSizeGB - createOption: dataDisk.createOption - caching: dataDisk.caching - writeAcceleratorEnabled: contains(osDisk, 'writeAcceleratorEnabled') ? osDisk.writeAcceleratorEnabled : null - managedDisk: { - storageAccountType: dataDisk.managedDisk.storageAccountType - diskEncryptionSet: contains(dataDisk.managedDisk, 'diskEncryptionSet') ? { - id: dataDisk.managedDisk.diskEncryptionSet.id - } : null - } - diskIOPSReadWrite: contains(osDisk, 'diskIOPSReadWrite') ? dataDisk.diskIOPSReadWrite : null - diskMBpsReadWrite: contains(osDisk, 'diskMBpsReadWrite') ? dataDisk.diskMBpsReadWrite : null - }] - } - networkProfile: { - networkInterfaceConfigurations: [for (nicConfiguration, index) in nicConfigurations: { - name: '${name}${nicConfiguration.nicSuffix}configuration-${index}' - properties: { - primary: (index == 0) ? true : any(null) - enableAcceleratedNetworking: contains(nicConfiguration, 'enableAcceleratedNetworking') ? nicConfiguration.enableAcceleratedNetworking : true - networkSecurityGroup: contains(nicConfiguration, 'nsgId') ? { - id: nicConfiguration.nsgId - } : null - ipConfigurations: nicConfiguration.ipConfigurations - } - }] - } - diagnosticsProfile: { - bootDiagnostics: { - enabled: !empty(bootDiagnosticStorageAccountName) - storageUri: !empty(bootDiagnosticStorageAccountName) ? 'https://${bootDiagnosticStorageAccountName}${bootDiagnosticStorageAccountUri}' : null - } - } - licenseType: empty(licenseType) ? null : licenseType - priority: vmPriority - evictionPolicy: enableEvictionPolicy ? 'Deallocate' : null - billingProfile: !empty(vmPriority) && !empty(maxPriceForLowPriorityVm) ? { - maxPrice: maxPriceForLowPriorityVm - } : null - scheduledEventsProfile: scheduledEventsProfile - } - overprovision: overprovision - doNotRunExtensionsOnOverprovisionedVMs: doNotRunExtensionsOnOverprovisionedVMs - zoneBalance: zoneBalance == 'true' ? zoneBalance : null - platformFaultDomainCount: scaleSetFaultDomain - singlePlacementGroup: singlePlacementGroup - additionalCapabilities: { - ultraSSDEnabled: ultraSSDEnabled - } - scaleInPolicy: scaleInPolicy - } - sku: { - name: skuName - capacity: skuCapacity - } - plan: !empty(plan) ? plan : null -} - -module vmss_domainJoinExtension 'extension/main.bicep' = if (extensionDomainJoinConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-DomainJoin' - params: { - virtualMachineScaleSetName: vmss.name - name: 'DomainJoin' - publisher: 'Microsoft.Compute' - type: 'JsonADDomainExtension' - typeHandlerVersion: contains(extensionDomainJoinConfig, 'typeHandlerVersion') ? extensionDomainJoinConfig.typeHandlerVersion : '1.3' - autoUpgradeMinorVersion: contains(extensionDomainJoinConfig, 'autoUpgradeMinorVersion') ? extensionDomainJoinConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionDomainJoinConfig, 'enableAutomaticUpgrade') ? extensionDomainJoinConfig.enableAutomaticUpgrade : false - settings: extensionDomainJoinConfig.settings - protectedSettings: { - Password: extensionDomainJoinPassword - } - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -} - -module vmss_microsoftAntiMalwareExtension 'extension/main.bicep' = if (extensionAntiMalwareConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-MicrosoftAntiMalware' - params: { - virtualMachineScaleSetName: vmss.name - name: 'MicrosoftAntiMalware' - publisher: 'Microsoft.Azure.Security' - type: 'IaaSAntimalware' - typeHandlerVersion: contains(extensionAntiMalwareConfig, 'typeHandlerVersion') ? extensionAntiMalwareConfig.typeHandlerVersion : '1.3' - autoUpgradeMinorVersion: contains(extensionAntiMalwareConfig, 'autoUpgradeMinorVersion') ? extensionAntiMalwareConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionAntiMalwareConfig, 'enableAutomaticUpgrade') ? extensionAntiMalwareConfig.enableAutomaticUpgrade : false - settings: extensionAntiMalwareConfig.settings - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -} - -resource vmss_logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = if (!empty(monitoringWorkspaceId)) { - name: last(split((!empty(monitoringWorkspaceId) ? monitoringWorkspaceId : 'law'), '/'))! - scope: az.resourceGroup(split((!empty(monitoringWorkspaceId) ? monitoringWorkspaceId : '//'), '/')[2], split((!empty(monitoringWorkspaceId) ? monitoringWorkspaceId : '////'), '/')[4]) -} - -module vmss_microsoftMonitoringAgentExtension 'extension/main.bicep' = if (extensionMonitoringAgentConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-MicrosoftMonitoringAgent' - params: { - virtualMachineScaleSetName: vmss.name - name: 'MicrosoftMonitoringAgent' - publisher: 'Microsoft.EnterpriseCloud.Monitoring' - type: osType == 'Windows' ? 'MicrosoftMonitoringAgent' : 'OmsAgentForLinux' - typeHandlerVersion: contains(extensionMonitoringAgentConfig, 'typeHandlerVersion') ? extensionMonitoringAgentConfig.typeHandlerVersion : (osType == 'Windows' ? '1.0' : '1.7') - autoUpgradeMinorVersion: contains(extensionMonitoringAgentConfig, 'autoUpgradeMinorVersion') ? extensionMonitoringAgentConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionMonitoringAgentConfig, 'enableAutomaticUpgrade') ? extensionMonitoringAgentConfig.enableAutomaticUpgrade : false - settings: { - workspaceId: !empty(monitoringWorkspaceId) ? reference(vmss_logAnalyticsWorkspace.id, vmss_logAnalyticsWorkspace.apiVersion).customerId : '' - } - protectedSettings: { - workspaceKey: !empty(monitoringWorkspaceId) ? vmss_logAnalyticsWorkspace.listKeys().primarySharedKey : '' - } - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -} - -module vmss_dependencyAgentExtension 'extension/main.bicep' = if (extensionDependencyAgentConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-DependencyAgent' - params: { - virtualMachineScaleSetName: vmss.name - name: 'DependencyAgent' - publisher: 'Microsoft.Azure.Monitoring.DependencyAgent' - type: osType == 'Windows' ? 'DependencyAgentWindows' : 'DependencyAgentLinux' - typeHandlerVersion: contains(extensionDependencyAgentConfig, 'typeHandlerVersion') ? extensionDependencyAgentConfig.typeHandlerVersion : '9.5' - autoUpgradeMinorVersion: contains(extensionDependencyAgentConfig, 'autoUpgradeMinorVersion') ? extensionDependencyAgentConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionDependencyAgentConfig, 'enableAutomaticUpgrade') ? extensionDependencyAgentConfig.enableAutomaticUpgrade : true - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -} - -module vmss_networkWatcherAgentExtension 'extension/main.bicep' = if (extensionNetworkWatcherAgentConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-NetworkWatcherAgent' - params: { - virtualMachineScaleSetName: vmss.name - name: 'NetworkWatcherAgent' - publisher: 'Microsoft.Azure.NetworkWatcher' - type: osType == 'Windows' ? 'NetworkWatcherAgentWindows' : 'NetworkWatcherAgentLinux' - typeHandlerVersion: contains(extensionNetworkWatcherAgentConfig, 'typeHandlerVersion') ? extensionNetworkWatcherAgentConfig.typeHandlerVersion : '1.4' - autoUpgradeMinorVersion: contains(extensionNetworkWatcherAgentConfig, 'autoUpgradeMinorVersion') ? extensionNetworkWatcherAgentConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionNetworkWatcherAgentConfig, 'enableAutomaticUpgrade') ? extensionNetworkWatcherAgentConfig.enableAutomaticUpgrade : false - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -} - -module vmss_desiredStateConfigurationExtension 'extension/main.bicep' = if (extensionDSCConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-DesiredStateConfiguration' - params: { - virtualMachineScaleSetName: vmss.name - name: 'DesiredStateConfiguration' - publisher: 'Microsoft.Powershell' - type: 'DSC' - typeHandlerVersion: contains(extensionDSCConfig, 'typeHandlerVersion') ? extensionDSCConfig.typeHandlerVersion : '2.77' - autoUpgradeMinorVersion: contains(extensionDSCConfig, 'autoUpgradeMinorVersion') ? extensionDSCConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionDSCConfig, 'enableAutomaticUpgrade') ? extensionDSCConfig.enableAutomaticUpgrade : false - settings: contains(extensionDSCConfig, 'settings') ? extensionDSCConfig.settings : {} - protectedSettings: contains(extensionDSCConfig, 'protectedSettings') ? extensionDSCConfig.protectedSettings : {} - enableDefaultTelemetry: enableReferencedModulesTelemetry - } -} - -module vmss_customScriptExtension 'extension/main.bicep' = if (extensionCustomScriptConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-CustomScriptExtension' - params: { - virtualMachineScaleSetName: vmss.name - name: 'CustomScriptExtension' - publisher: osType == 'Windows' ? 'Microsoft.Compute' : 'Microsoft.Azure.Extensions' - type: osType == 'Windows' ? 'CustomScriptExtension' : 'CustomScript' - typeHandlerVersion: contains(extensionCustomScriptConfig, 'typeHandlerVersion') ? extensionCustomScriptConfig.typeHandlerVersion : (osType == 'Windows' ? '1.10' : '2.1') - autoUpgradeMinorVersion: contains(extensionCustomScriptConfig, 'autoUpgradeMinorVersion') ? extensionCustomScriptConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionCustomScriptConfig, 'enableAutomaticUpgrade') ? extensionCustomScriptConfig.enableAutomaticUpgrade : false - settings: { - fileUris: [for fileData in extensionCustomScriptConfig.fileData: contains(fileData, 'storageAccountId') ? '${fileData.uri}?${listAccountSas(fileData.storageAccountId, '2019-04-01', accountSasProperties).accountSasToken}' : fileData.uri] - } - protectedSettings: contains(extensionCustomScriptConfig, 'protectedSettings') ? extensionCustomScriptConfig.protectedSettings : {} - enableDefaultTelemetry: enableReferencedModulesTelemetry - } - dependsOn: [ - vmss_desiredStateConfigurationExtension - ] -} - -module vmss_azureDiskEncryptionExtension 'extension/main.bicep' = if (extensionAzureDiskEncryptionConfig.enabled) { - name: '${uniqueString(deployment().name, location)}-VMSS-AzureDiskEncryption' - params: { - virtualMachineScaleSetName: vmss.name - name: 'AzureDiskEncryption' - publisher: 'Microsoft.Azure.Security' - type: osType == 'Windows' ? 'AzureDiskEncryption' : 'AzureDiskEncryptionForLinux' - typeHandlerVersion: contains(extensionAzureDiskEncryptionConfig, 'typeHandlerVersion') ? extensionAzureDiskEncryptionConfig.typeHandlerVersion : (osType == 'Windows' ? '2.2' : '1.1') - autoUpgradeMinorVersion: contains(extensionAzureDiskEncryptionConfig, 'autoUpgradeMinorVersion') ? extensionAzureDiskEncryptionConfig.autoUpgradeMinorVersion : true - enableAutomaticUpgrade: contains(extensionAzureDiskEncryptionConfig, 'enableAutomaticUpgrade') ? extensionAzureDiskEncryptionConfig.enableAutomaticUpgrade : false - forceUpdateTag: contains(extensionAzureDiskEncryptionConfig, 'forceUpdateTag') ? extensionAzureDiskEncryptionConfig.forceUpdateTag : '1.0' - settings: extensionAzureDiskEncryptionConfig.settings - enableDefaultTelemetry: enableReferencedModulesTelemetry - } - dependsOn: [ - vmss_customScriptExtension - vmss_microsoftMonitoringAgentExtension - ] -} - -resource vmss_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.' - } - scope: vmss -} - -resource vmss_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): { - name: diagnosticSetting.?name ?? '${name}-diagnosticSettings' - properties: { - storageAccountId: diagnosticSetting.?storageAccountResourceId - workspaceId: diagnosticSetting.?workspaceResourceId - eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId - eventHubName: diagnosticSetting.?eventHubName - metrics: diagnosticSetting.?metricCategories ?? [ - { - category: 'AllMetrics' - timeGrain: null - enabled: true - } - ] - marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId - logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType - } - scope: vmss -}] - -resource vmss_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): { - name: guid(vmss.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName) - properties: { - roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName) - principalId: roleAssignment.principalId - description: roleAssignment.?description - principalType: roleAssignment.?principalType - condition: roleAssignment.?condition - conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set - delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId - } - scope: vmss -}] - -@description('The resource ID of the virtual machine scale set.') -output resourceId string = vmss.id - -@description('The resource group of the virtual machine scale set.') -output resourceGroupName string = resourceGroup().name - -@description('The name of the virtual machine scale set.') -output name string = vmss.name - -@description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(vmss.identity, 'principalId') ? vmss.identity.principalId : '' - -@description('The location the resource was deployed into.') -output location string = vmss.location - -// =============== // -// Definitions // -// =============== // - -type managedIdentitiesType = { - @description('Optional. Enables system assigned managed identity on the resource.') - systemAssigned: bool? - - @description('Optional. The resource ID(s) to assign to the resource.') - userAssignedResourceIds: string[]? -}? - -type lockType = { - @description('Optional. Specify the name of lock.') - name: string? - - @description('Optional. Specify the type of lock.') - kind: ('CanNotDelete' | 'ReadOnly' | 'None')? -}? - -type roleAssignmentType = { - @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') - roleDefinitionIdOrName: string - - @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.') - principalId: string - - @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? - - @description('Optional. The description of the role assignment.') - description: string? - - @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"') - condition: string? - - @description('Optional. Version of the condition.') - conditionVersion: '2.0'? - - @description('Optional. The Resource Id of the delegated managed identity resource.') - delegatedManagedIdentityResourceId: string? -}[]? - -type diagnosticSettingType = { - @description('Optional. The name of diagnostic setting.') - name: string? - - @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.') - metricCategories: { - @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.') - category: string - }[]? - - @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.') - logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')? - - @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - workspaceResourceId: string? - - @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - storageAccountResourceId: string? - - @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.') - eventHubAuthorizationRuleResourceId: string? - - @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.') - eventHubName: string? - - @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.') - marketplacePartnerResourceId: string? -}[]? diff --git a/modules/compute/virtual-machine-scale-set/main.json b/modules/compute/virtual-machine-scale-set/main.json deleted file mode 100644 index 95643ce69d..0000000000 --- a/modules/compute/virtual-machine-scale-set/main.json +++ /dev/null @@ -1,2522 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "languageVersion": "2.0", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "6314533557974797448" - }, - "name": "Virtual Machine Scale Sets", - "description": "This module deploys a Virtual Machine Scale Set.", - "owner": "Azure/module-maintainers" - }, - "definitions": { - "managedIdentitiesType": { - "type": "object", - "properties": { - "systemAssigned": { - "type": "bool", - "nullable": true, - "metadata": { - "description": "Optional. Enables system assigned managed identity on the resource." - } - }, - "userAssignedResourceIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "metadata": { - "description": "Optional. The resource ID(s) to assign to the resource." - } - } - }, - "nullable": true - }, - "lockType": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Specify the name of lock." - } - }, - "kind": { - "type": "string", - "allowedValues": [ - "CanNotDelete", - "None", - "ReadOnly" - ], - "nullable": true, - "metadata": { - "description": "Optional. Specify the type of lock." - } - } - }, - "nullable": true - }, - "roleAssignmentType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "roleDefinitionIdOrName": { - "type": "string", - "metadata": { - "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'." - } - }, - "principalId": { - "type": "string", - "metadata": { - "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to." - } - }, - "principalType": { - "type": "string", - "allowedValues": [ - "Device", - "ForeignGroup", - "Group", - "ServicePrincipal", - "User" - ], - "nullable": true, - "metadata": { - "description": "Optional. The principal type of the assigned principal ID." - } - }, - "description": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The description of the role assignment." - } - }, - "condition": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\"" - } - }, - "conditionVersion": { - "type": "string", - "allowedValues": [ - "2.0" - ], - "nullable": true, - "metadata": { - "description": "Optional. Version of the condition." - } - }, - "delegatedManagedIdentityResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The Resource Id of the delegated managed identity resource." - } - } - } - }, - "nullable": true - }, - "diagnosticSettingType": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The name of diagnostic setting." - } - }, - "metricCategories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "category": { - "type": "string", - "metadata": { - "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics." - } - } - } - }, - "nullable": true, - "metadata": { - "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection." - } - }, - "logAnalyticsDestinationType": { - "type": "string", - "allowedValues": [ - "AzureDiagnostics", - "Dedicated" - ], - "nullable": true, - "metadata": { - "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type." - } - }, - "workspaceResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "storageAccountResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "eventHubAuthorizationRuleResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to." - } - }, - "eventHubName": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub." - } - }, - "marketplacePartnerResourceId": { - "type": "string", - "nullable": true, - "metadata": { - "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs." - } - } - } - }, - "nullable": true - } - }, - "parameters": { - "name": { - "type": "string", - "metadata": { - "description": "Required. Name of the VMSS." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Optional. Location for all resources." - } - }, - "encryptionAtHost": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your virtual machine scale sets." - } - }, - "securityType": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Specifies the SecurityType of the virtual machine scale set. It is set as TrustedLaunch to enable UefiSettings." - } - }, - "secureBootEnabled": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Specifies whether secure boot should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings." - } - }, - "vTpmEnabled": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Specifies whether vTPM should be enabled on the virtual machine scale set. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings." - } - }, - "imageReference": { - "type": "object", - "metadata": { - "description": "Required. OS image reference. In case of marketplace images, it's the combination of the publisher, offer, sku, version attributes. In case of custom images it's the resource ID of the custom image." - } - }, - "plan": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use." - } - }, - "osDisk": { - "type": "object", - "metadata": { - "description": "Required. Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets." - } - }, - "dataDisks": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VM Scale sets." - } - }, - "ultraSSDEnabled": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled." - } - }, - "adminUsername": { - "type": "securestring", - "metadata": { - "description": "Required. Administrator username." - } - }, - "adminPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Optional. When specifying a Windows Virtual Machine, this value should be passed." - } - }, - "customData": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format." - } - }, - "roleAssignments": { - "$ref": "#/definitions/roleAssignmentType", - "metadata": { - "description": "Optional. Array of role assignments to create." - } - }, - "scaleSetFaultDomain": { - "type": "int", - "defaultValue": 2, - "metadata": { - "description": "Optional. Fault Domain count for each placement group." - } - }, - "proximityPlacementGroupResourceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Resource ID of a proximity placement group." - } - }, - "nicConfigurations": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Required. Configures NICs and PIPs." - } - }, - "vmPriority": { - "type": "string", - "defaultValue": "Regular", - "allowedValues": [ - "Regular", - "Low", - "Spot" - ], - "metadata": { - "description": "Optional. Specifies the priority for the virtual machine." - } - }, - "enableEvictionPolicy": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy." - } - }, - "maxPriceForLowPriorityVm": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars." - } - }, - "licenseType": { - "type": "string", - "defaultValue": "", - "allowedValues": [ - "Windows_Client", - "Windows_Server", - "" - ], - "metadata": { - "description": "Optional. Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system." - } - }, - "extensionDomainJoinPassword": { - "type": "securestring", - "defaultValue": "", - "metadata": { - "description": "Optional. Required if name is specified. Password of the user specified in user parameter." - } - }, - "extensionDomainJoinConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Domain Join] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "extensionAntiMalwareConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Anti Malware] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "extensionMonitoringAgentConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Monitoring Agent] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "monitoringWorkspaceId": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Resource ID of the monitoring log analytics workspace." - } - }, - "extensionDependencyAgentConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Dependency Agent] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "extensionNetworkWatcherAgentConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Network Watcher Agent] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "extensionAzureDiskEncryptionConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Azure Disk Encryption] extension. Must at least contain the [\"enabled\": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys." - } - }, - "extensionDSCConfig": { - "type": "object", - "defaultValue": { - "enabled": false - }, - "metadata": { - "description": "Optional. The configuration for the [Desired State Configuration] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "extensionCustomScriptConfig": { - "type": "object", - "defaultValue": { - "enabled": false, - "fileData": [] - }, - "metadata": { - "description": "Optional. The configuration for the [Custom Script] extension. Must at least contain the [\"enabled\": true] property to be executed." - } - }, - "bootDiagnosticStorageAccountUri": { - "type": "string", - "defaultValue": "[format('.blob.{0}/', environment().suffixes.storage)]", - "metadata": { - "description": "Optional. Storage account boot diagnostic base URI." - } - }, - "bootDiagnosticStorageAccountName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided." - } - }, - "diagnosticSettings": { - "$ref": "#/definitions/diagnosticSettingType", - "metadata": { - "description": "Optional. The diagnostic settings of the service." - } - }, - "lock": { - "$ref": "#/definitions/lockType", - "metadata": { - "description": "Optional. The lock settings of the service." - } - }, - "upgradePolicyMode": { - "type": "string", - "defaultValue": "Manual", - "allowedValues": [ - "Manual", - "Automatic", - "Rolling" - ], - "metadata": { - "description": "Optional. Specifies the mode of an upgrade to virtual machines in the scale set.' Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. ; Automatic - All virtual machines in the scale set are automatically updated at the same time. - Automatic, Manual, Rolling." - } - }, - "maxBatchInstancePercent": { - "type": "int", - "defaultValue": 20, - "metadata": { - "description": "Optional. The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability." - } - }, - "maxUnhealthyInstancePercent": { - "type": "int", - "defaultValue": 20, - "metadata": { - "description": "Optional. The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch." - } - }, - "maxUnhealthyUpgradedInstancePercent": { - "type": "int", - "defaultValue": 20, - "metadata": { - "description": "Optional. The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch." - } - }, - "pauseTimeBetweenBatches": { - "type": "string", - "defaultValue": "PT0S", - "metadata": { - "description": "Optional. The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format." - } - }, - "enableAutomaticOSUpgrade": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, enableAutomaticUpdates is automatically set to false and cannot be set to true." - } - }, - "disableAutomaticRollback": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Whether OS image rollback feature should be disabled." - } - }, - "automaticRepairsPolicyEnabled": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Specifies whether automatic repairs should be enabled on the virtual machine scale set." - } - }, - "gracePeriod": { - "type": "string", - "defaultValue": "PT30M", - "metadata": { - "description": "Optional. The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M). The maximum allowed grace period is 90 minutes (PT90M)." - } - }, - "vmNamePrefix": { - "type": "string", - "defaultValue": "vmssvm", - "minLength": 1, - "maxLength": 15, - "metadata": { - "description": "Optional. Specifies the computer name prefix for all of the virtual machines in the scale set." - } - }, - "provisionVMAgent": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later." - } - }, - "enableAutomaticUpdates": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning." - } - }, - "timeZone": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`." - } - }, - "additionalUnattendContent": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object." - } - }, - "winRM": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object." - } - }, - "disablePasswordAuthentication": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Specifies whether password authentication should be disabled." - } - }, - "publicKeys": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. The list of SSH public keys used to authenticate with linux based VMs." - } - }, - "secrets": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. Specifies set of certificates that should be installed onto the virtual machines in the scale set." - } - }, - "scheduledEventsProfile": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Specifies Scheduled Event related configurations." - } - }, - "overprovision": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Specifies whether the Virtual Machine Scale Set should be overprovisioned." - } - }, - "doNotRunExtensionsOnOverprovisionedVMs": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs." - } - }, - "zoneBalance": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage." - } - }, - "singlePlacementGroup": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true." - } - }, - "scaleInPolicy": { - "type": "object", - "defaultValue": { - "rules": [ - "Default" - ] - }, - "metadata": { - "description": "Optional. Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in." - } - }, - "skuName": { - "type": "string", - "metadata": { - "description": "Required. The SKU size of the VMs." - } - }, - "skuCapacity": { - "type": "int", - "defaultValue": 1, - "metadata": { - "description": "Optional. The initial instance count of scale set VMs." - } - }, - "availabilityZones": { - "type": "array", - "defaultValue": [], - "metadata": { - "description": "Optional. The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set." - } - }, - "tags": { - "type": "object", - "nullable": true, - "metadata": { - "description": "Optional. Tags of the resource." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - }, - "osType": { - "type": "string", - "allowedValues": [ - "Windows", - "Linux" - ], - "metadata": { - "description": "Required. The chosen OS type." - } - }, - "baseTime": { - "type": "string", - "defaultValue": "[utcNow('u')]", - "metadata": { - "description": "Generated. Do not provide a value! This date value is used to generate a registration token." - } - }, - "sasTokenValidityLength": { - "type": "string", - "defaultValue": "PT8H", - "metadata": { - "description": "Optional. SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours." - } - }, - "managedIdentities": { - "$ref": "#/definitions/managedIdentitiesType", - "metadata": { - "description": "Optional. The managed identity definition for this resource." - } - } - }, - "variables": { - "copy": [ - { - "name": "publicKeysFormatted", - "count": "[length(parameters('publicKeys'))]", - "input": { - "path": "[parameters('publicKeys')[copyIndex('publicKeysFormatted')].path]", - "keyData": "[parameters('publicKeys')[copyIndex('publicKeysFormatted')].keyData]" - } - } - ], - "linuxConfiguration": { - "disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]", - "ssh": { - "publicKeys": "[variables('publicKeysFormatted')]" - }, - "provisionVMAgent": "[parameters('provisionVMAgent')]" - }, - "windowsConfiguration": { - "provisionVMAgent": "[parameters('provisionVMAgent')]", - "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]", - "timeZone": "[if(empty(parameters('timeZone')), null(), parameters('timeZone'))]", - "additionalUnattendContent": "[if(empty(parameters('additionalUnattendContent')), null(), parameters('additionalUnattendContent'))]", - "winRM": "[if(not(empty(parameters('winRM'))), createObject('listeners', parameters('winRM')), null())]" - }, - "accountSasProperties": { - "signedServices": "b", - "signedPermission": "r", - "signedExpiry": "[dateTimeAdd(parameters('baseTime'), parameters('sasTokenValidityLength'))]", - "signedResourceTypes": "o", - "signedProtocol": "https" - }, - "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]", - "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]", - "enableReferencedModulesTelemetry": false, - "builtInRoleNames": { - "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "Data Operator for Managed Disks": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e')]", - "Desktop Virtualization Power On Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '489581de-a3bd-480d-9518-53dea7416b33')]", - "Desktop Virtualization Power On Off Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')]", - "Desktop Virtualization Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')]", - "DevTest Labs User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64')]", - "Disk Backup Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24')]", - "Disk Pool Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840')]", - "Disk Restore Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13')]", - "Disk Snapshot Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce')]", - "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]", - "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", - "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]", - "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]", - "Virtual Machine Administrator Login": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1c0163c0-47e6-4577-8991-ea5c82e286e4')]", - "Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c')]", - "Virtual Machine User Login": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fb879df8-f326-4884-b1cf-06f3ad86be52')]", - "VM Scanner Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd24ecba3-c1f4-40fa-a7bb-4588a071e8fd')]" - } - }, - "resources": { - "defaultTelemetry": { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - "vmss": { - "type": "Microsoft.Compute/virtualMachineScaleSets", - "apiVersion": "2022-11-01", - "name": "[parameters('name')]", - "location": "[parameters('location')]", - "tags": "[parameters('tags')]", - "identity": "[variables('identity')]", - "zones": "[parameters('availabilityZones')]", - "properties": { - "proximityPlacementGroup": "[if(not(empty(parameters('proximityPlacementGroupResourceId'))), createObject('id', parameters('proximityPlacementGroupResourceId')), null())]", - "upgradePolicy": { - "mode": "[parameters('upgradePolicyMode')]", - "rollingUpgradePolicy": { - "maxBatchInstancePercent": "[parameters('maxBatchInstancePercent')]", - "maxUnhealthyInstancePercent": "[parameters('maxUnhealthyInstancePercent')]", - "maxUnhealthyUpgradedInstancePercent": "[parameters('maxUnhealthyUpgradedInstancePercent')]", - "pauseTimeBetweenBatches": "[parameters('pauseTimeBetweenBatches')]" - }, - "automaticOSUpgradePolicy": { - "enableAutomaticOSUpgrade": "[parameters('enableAutomaticOSUpgrade')]", - "disableAutomaticRollback": "[parameters('disableAutomaticRollback')]" - } - }, - "automaticRepairsPolicy": { - "enabled": "[parameters('automaticRepairsPolicyEnabled')]", - "gracePeriod": "[parameters('gracePeriod')]" - }, - "virtualMachineProfile": { - "osProfile": { - "computerNamePrefix": "[parameters('vmNamePrefix')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[if(not(empty(parameters('adminPassword'))), parameters('adminPassword'), null())]", - "customData": "[if(not(empty(parameters('customData'))), base64(parameters('customData')), null())]", - "windowsConfiguration": "[if(equals(parameters('osType'), 'Windows'), variables('windowsConfiguration'), null())]", - "linuxConfiguration": "[if(equals(parameters('osType'), 'Linux'), variables('linuxConfiguration'), null())]", - "secrets": "[parameters('secrets')]" - }, - "securityProfile": { - "encryptionAtHost": "[if(parameters('encryptionAtHost'), parameters('encryptionAtHost'), null())]", - "securityType": "[parameters('securityType')]", - "uefiSettings": "[if(equals(parameters('securityType'), 'TrustedLaunch'), createObject('secureBootEnabled', parameters('secureBootEnabled'), 'vTpmEnabled', parameters('vTpmEnabled')), null())]" - }, - "storageProfile": { - "copy": [ - { - "name": "dataDisks", - "count": "[length(parameters('dataDisks'))]", - "input": { - "lun": "[copyIndex('dataDisks')]", - "diskSizeGB": "[parameters('dataDisks')[copyIndex('dataDisks')].diskSizeGB]", - "createOption": "[parameters('dataDisks')[copyIndex('dataDisks')].createOption]", - "caching": "[parameters('dataDisks')[copyIndex('dataDisks')].caching]", - "writeAcceleratorEnabled": "[if(contains(parameters('osDisk'), 'writeAcceleratorEnabled'), parameters('osDisk').writeAcceleratorEnabled, null())]", - "managedDisk": { - "storageAccountType": "[parameters('dataDisks')[copyIndex('dataDisks')].managedDisk.storageAccountType]", - "diskEncryptionSet": "[if(contains(parameters('dataDisks')[copyIndex('dataDisks')].managedDisk, 'diskEncryptionSet'), createObject('id', parameters('dataDisks')[copyIndex('dataDisks')].managedDisk.diskEncryptionSet.id), null())]" - }, - "diskIOPSReadWrite": "[if(contains(parameters('osDisk'), 'diskIOPSReadWrite'), parameters('dataDisks')[copyIndex('dataDisks')].diskIOPSReadWrite, null())]", - "diskMBpsReadWrite": "[if(contains(parameters('osDisk'), 'diskMBpsReadWrite'), parameters('dataDisks')[copyIndex('dataDisks')].diskMBpsReadWrite, null())]" - } - } - ], - "imageReference": "[parameters('imageReference')]", - "osDisk": { - "createOption": "[parameters('osDisk').createOption]", - "diskSizeGB": "[parameters('osDisk').diskSizeGB]", - "caching": "[if(contains(parameters('osDisk'), 'caching'), parameters('osDisk').caching, null())]", - "writeAcceleratorEnabled": "[if(contains(parameters('osDisk'), 'writeAcceleratorEnabled'), parameters('osDisk').writeAcceleratorEnabled, null())]", - "diffDiskSettings": "[if(contains(parameters('osDisk'), 'diffDiskSettings'), parameters('osDisk').diffDiskSettings, null())]", - "osType": "[if(contains(parameters('osDisk'), 'osType'), parameters('osDisk').osType, null())]", - "image": "[if(contains(parameters('osDisk'), 'image'), parameters('osDisk').image, null())]", - "vhdContainers": "[if(contains(parameters('osDisk'), 'vhdContainers'), parameters('osDisk').vhdContainers, null())]", - "managedDisk": { - "storageAccountType": "[parameters('osDisk').managedDisk.storageAccountType]", - "diskEncryptionSet": "[if(contains(parameters('osDisk').managedDisk, 'diskEncryptionSet'), createObject('id', parameters('osDisk').managedDisk.diskEncryptionSet.id), null())]" - } - } - }, - "networkProfile": { - "copy": [ - { - "name": "networkInterfaceConfigurations", - "count": "[length(parameters('nicConfigurations'))]", - "input": { - "name": "[format('{0}{1}configuration-{2}', parameters('name'), parameters('nicConfigurations')[copyIndex('networkInterfaceConfigurations')].nicSuffix, copyIndex('networkInterfaceConfigurations'))]", - "properties": { - "primary": "[if(equals(copyIndex('networkInterfaceConfigurations'), 0), true(), null())]", - "enableAcceleratedNetworking": "[if(contains(parameters('nicConfigurations')[copyIndex('networkInterfaceConfigurations')], 'enableAcceleratedNetworking'), parameters('nicConfigurations')[copyIndex('networkInterfaceConfigurations')].enableAcceleratedNetworking, true())]", - "networkSecurityGroup": "[if(contains(parameters('nicConfigurations')[copyIndex('networkInterfaceConfigurations')], 'nsgId'), createObject('id', parameters('nicConfigurations')[copyIndex('networkInterfaceConfigurations')].nsgId), null())]", - "ipConfigurations": "[parameters('nicConfigurations')[copyIndex('networkInterfaceConfigurations')].ipConfigurations]" - } - } - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": "[not(empty(parameters('bootDiagnosticStorageAccountName')))]", - "storageUri": "[if(not(empty(parameters('bootDiagnosticStorageAccountName'))), format('https://{0}{1}', parameters('bootDiagnosticStorageAccountName'), parameters('bootDiagnosticStorageAccountUri')), null())]" - } - }, - "licenseType": "[if(empty(parameters('licenseType')), null(), parameters('licenseType'))]", - "priority": "[parameters('vmPriority')]", - "evictionPolicy": "[if(parameters('enableEvictionPolicy'), 'Deallocate', null())]", - "billingProfile": "[if(and(not(empty(parameters('vmPriority'))), not(empty(parameters('maxPriceForLowPriorityVm')))), createObject('maxPrice', parameters('maxPriceForLowPriorityVm')), null())]", - "scheduledEventsProfile": "[parameters('scheduledEventsProfile')]" - }, - "overprovision": "[parameters('overprovision')]", - "doNotRunExtensionsOnOverprovisionedVMs": "[parameters('doNotRunExtensionsOnOverprovisionedVMs')]", - "zoneBalance": "[if(equals(parameters('zoneBalance'), 'true'), parameters('zoneBalance'), null())]", - "platformFaultDomainCount": "[parameters('scaleSetFaultDomain')]", - "singlePlacementGroup": "[parameters('singlePlacementGroup')]", - "additionalCapabilities": { - "ultraSSDEnabled": "[parameters('ultraSSDEnabled')]" - }, - "scaleInPolicy": "[parameters('scaleInPolicy')]" - }, - "sku": { - "name": "[parameters('skuName')]", - "capacity": "[parameters('skuCapacity')]" - }, - "plan": "[if(not(empty(parameters('plan'))), parameters('plan'), null())]" - }, - "vmss_logAnalyticsWorkspace": { - "condition": "[not(empty(parameters('monitoringWorkspaceId')))]", - "existing": true, - "type": "Microsoft.OperationalInsights/workspaces", - "apiVersion": "2021-06-01", - "subscriptionId": "[split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '//'), '/')[2]]", - "resourceGroup": "[split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '////'), '/')[4]]", - "name": "[last(split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), 'law'), '/'))]" - }, - "vmss_lock": { - "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", - "type": "Microsoft.Authorization/locks", - "apiVersion": "2020-05-01", - "scope": "[format('Microsoft.Compute/virtualMachineScaleSets/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]", - "properties": { - "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]", - "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]" - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_diagnosticSettings": { - "copy": { - "name": "vmss_diagnosticSettings", - "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]" - }, - "type": "Microsoft.Insights/diagnosticSettings", - "apiVersion": "2021-05-01-preview", - "scope": "[format('Microsoft.Compute/virtualMachineScaleSets/{0}', parameters('name'))]", - "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]", - "properties": { - "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]", - "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]", - "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]", - "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]", - "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]", - "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]", - "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]" - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_roleAssignments": { - "copy": { - "name": "vmss_roleAssignments", - "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]" - }, - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.Compute/virtualMachineScaleSets/{0}', parameters('name'))]", - "name": "[guid(resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]", - "properties": { - "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]", - "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]", - "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]", - "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]", - "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]", - "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]", - "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]" - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_domainJoinExtension": { - "condition": "[parameters('extensionDomainJoinConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-DomainJoin', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "DomainJoin" - }, - "publisher": { - "value": "Microsoft.Compute" - }, - "type": { - "value": "JsonADDomainExtension" - }, - "typeHandlerVersion": "[if(contains(parameters('extensionDomainJoinConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionDomainJoinConfig').typeHandlerVersion), createObject('value', '1.3'))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionDomainJoinConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionDomainJoinConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionDomainJoinConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionDomainJoinConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "settings": { - "value": "[parameters('extensionDomainJoinConfig').settings]" - }, - "protectedSettings": { - "value": { - "Password": "[parameters('extensionDomainJoinPassword')]" - } - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_microsoftAntiMalwareExtension": { - "condition": "[parameters('extensionAntiMalwareConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-MicrosoftAntiMalware', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "MicrosoftAntiMalware" - }, - "publisher": { - "value": "Microsoft.Azure.Security" - }, - "type": { - "value": "IaaSAntimalware" - }, - "typeHandlerVersion": "[if(contains(parameters('extensionAntiMalwareConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionAntiMalwareConfig').typeHandlerVersion), createObject('value', '1.3'))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionAntiMalwareConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionAntiMalwareConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionAntiMalwareConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionAntiMalwareConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "settings": { - "value": "[parameters('extensionAntiMalwareConfig').settings]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_microsoftMonitoringAgentExtension": { - "condition": "[parameters('extensionMonitoringAgentConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-MicrosoftMonitoringAgent', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "MicrosoftMonitoringAgent" - }, - "publisher": { - "value": "Microsoft.EnterpriseCloud.Monitoring" - }, - "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'MicrosoftMonitoringAgent'), createObject('value', 'OmsAgentForLinux'))]", - "typeHandlerVersion": "[if(contains(parameters('extensionMonitoringAgentConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionMonitoringAgentConfig').typeHandlerVersion), if(equals(parameters('osType'), 'Windows'), createObject('value', '1.0'), createObject('value', '1.7')))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionMonitoringAgentConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionMonitoringAgentConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionMonitoringAgentConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionMonitoringAgentConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "settings": { - "value": { - "workspaceId": "[if(not(empty(parameters('monitoringWorkspaceId'))), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '//'), '/')[2], split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '////'), '/')[4]), 'Microsoft.OperationalInsights/workspaces', last(split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), 'law'), '/'))), '2021-06-01').customerId, '')]" - } - }, - "protectedSettings": { - "value": { - "workspaceKey": "[if(not(empty(parameters('monitoringWorkspaceId'))), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '//'), '/')[2], split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '////'), '/')[4]), 'Microsoft.OperationalInsights/workspaces', last(split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), 'law'), '/'))), '2021-06-01').primarySharedKey, '')]" - } - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss", - "vmss_logAnalyticsWorkspace" - ] - }, - "vmss_dependencyAgentExtension": { - "condition": "[parameters('extensionDependencyAgentConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-DependencyAgent', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "DependencyAgent" - }, - "publisher": { - "value": "Microsoft.Azure.Monitoring.DependencyAgent" - }, - "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'DependencyAgentWindows'), createObject('value', 'DependencyAgentLinux'))]", - "typeHandlerVersion": "[if(contains(parameters('extensionDependencyAgentConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionDependencyAgentConfig').typeHandlerVersion), createObject('value', '9.5'))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionDependencyAgentConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionDependencyAgentConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionDependencyAgentConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionDependencyAgentConfig').enableAutomaticUpgrade), createObject('value', true()))]", - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_networkWatcherAgentExtension": { - "condition": "[parameters('extensionNetworkWatcherAgentConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-NetworkWatcherAgent', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "NetworkWatcherAgent" - }, - "publisher": { - "value": "Microsoft.Azure.NetworkWatcher" - }, - "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'NetworkWatcherAgentWindows'), createObject('value', 'NetworkWatcherAgentLinux'))]", - "typeHandlerVersion": "[if(contains(parameters('extensionNetworkWatcherAgentConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionNetworkWatcherAgentConfig').typeHandlerVersion), createObject('value', '1.4'))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionNetworkWatcherAgentConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionNetworkWatcherAgentConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionNetworkWatcherAgentConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionNetworkWatcherAgentConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_desiredStateConfigurationExtension": { - "condition": "[parameters('extensionDSCConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-DesiredStateConfiguration', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "DesiredStateConfiguration" - }, - "publisher": { - "value": "Microsoft.Powershell" - }, - "type": { - "value": "DSC" - }, - "typeHandlerVersion": "[if(contains(parameters('extensionDSCConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionDSCConfig').typeHandlerVersion), createObject('value', '2.77'))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionDSCConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionDSCConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionDSCConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionDSCConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "settings": "[if(contains(parameters('extensionDSCConfig'), 'settings'), createObject('value', parameters('extensionDSCConfig').settings), createObject('value', createObject()))]", - "protectedSettings": "[if(contains(parameters('extensionDSCConfig'), 'protectedSettings'), createObject('value', parameters('extensionDSCConfig').protectedSettings), createObject('value', createObject()))]", - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss" - ] - }, - "vmss_customScriptExtension": { - "condition": "[parameters('extensionCustomScriptConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-CustomScriptExtension', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "CustomScriptExtension" - }, - "publisher": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'Microsoft.Compute'), createObject('value', 'Microsoft.Azure.Extensions'))]", - "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'CustomScriptExtension'), createObject('value', 'CustomScript'))]", - "typeHandlerVersion": "[if(contains(parameters('extensionCustomScriptConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionCustomScriptConfig').typeHandlerVersion), if(equals(parameters('osType'), 'Windows'), createObject('value', '1.10'), createObject('value', '2.1')))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionCustomScriptConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionCustomScriptConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionCustomScriptConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionCustomScriptConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "settings": { - "value": { - "copy": [ - { - "name": "fileUris", - "count": "[length(parameters('extensionCustomScriptConfig').fileData)]", - "input": "[if(contains(parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')], 'storageAccountId'), format('{0}?{1}', parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')].uri, listAccountSas(parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')].storageAccountId, '2019-04-01', variables('accountSasProperties')).accountSasToken), parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')].uri)]" - } - ] - } - }, - "protectedSettings": "[if(contains(parameters('extensionCustomScriptConfig'), 'protectedSettings'), createObject('value', parameters('extensionCustomScriptConfig').protectedSettings), createObject('value', createObject()))]", - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss", - "vmss_desiredStateConfigurationExtension" - ] - }, - "vmss_azureDiskEncryptionExtension": { - "condition": "[parameters('extensionAzureDiskEncryptionConfig').enabled]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2022-09-01", - "name": "[format('{0}-VMSS-AzureDiskEncryption', uniqueString(deployment().name, parameters('location')))]", - "properties": { - "expressionEvaluationOptions": { - "scope": "inner" - }, - "mode": "Incremental", - "parameters": { - "virtualMachineScaleSetName": { - "value": "[parameters('name')]" - }, - "name": { - "value": "AzureDiskEncryption" - }, - "publisher": { - "value": "Microsoft.Azure.Security" - }, - "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'AzureDiskEncryption'), createObject('value', 'AzureDiskEncryptionForLinux'))]", - "typeHandlerVersion": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').typeHandlerVersion), if(equals(parameters('osType'), 'Windows'), createObject('value', '2.2'), createObject('value', '1.1')))]", - "autoUpgradeMinorVersion": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').autoUpgradeMinorVersion), createObject('value', true()))]", - "enableAutomaticUpgrade": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').enableAutomaticUpgrade), createObject('value', false()))]", - "forceUpdateTag": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'forceUpdateTag'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').forceUpdateTag), createObject('value', '1.0'))]", - "settings": { - "value": "[parameters('extensionAzureDiskEncryptionConfig').settings]" - }, - "enableDefaultTelemetry": { - "value": "[variables('enableReferencedModulesTelemetry')]" - } - }, - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "metadata": { - "_generator": { - "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "7901509432352717969" - }, - "name": "Virtual Machine Scale Set Extensions", - "description": "This module deploys a Virtual Machine Scale Set Extension.", - "owner": "Azure/module-maintainers" - }, - "parameters": { - "virtualMachineScaleSetName": { - "type": "string", - "metadata": { - "description": "Conditional. The name of the parent virtual machine scale set that extension is provisioned for. Required if the template is used in a standalone deployment." - } - }, - "name": { - "type": "string", - "metadata": { - "description": "Required. The name of the virtual machine scale set extension." - } - }, - "publisher": { - "type": "string", - "metadata": { - "description": "Required. The name of the extension handler publisher." - } - }, - "type": { - "type": "string", - "metadata": { - "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"." - } - }, - "typeHandlerVersion": { - "type": "string", - "metadata": { - "description": "Required. Specifies the version of the script handler." - } - }, - "autoUpgradeMinorVersion": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true." - } - }, - "forceUpdateTag": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed." - } - }, - "settings": { - "type": "object", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific settings." - } - }, - "protectedSettings": { - "type": "secureObject", - "defaultValue": {}, - "metadata": { - "description": "Optional. Any object that contains the extension specific protected settings." - } - }, - "supressFailures": { - "type": "bool", - "defaultValue": false, - "metadata": { - "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false." - } - }, - "enableAutomaticUpgrade": { - "type": "bool", - "metadata": { - "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available." - } - }, - "enableDefaultTelemetry": { - "type": "bool", - "defaultValue": true, - "metadata": { - "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)." - } - } - }, - "resources": [ - { - "condition": "[parameters('enableDefaultTelemetry')]", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachineScaleSets/extensions", - "apiVersion": "2022-11-01", - "name": "[format('{0}/{1}', parameters('virtualMachineScaleSetName'), parameters('name'))]", - "properties": { - "publisher": "[parameters('publisher')]", - "type": "[parameters('type')]", - "typeHandlerVersion": "[parameters('typeHandlerVersion')]", - "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]", - "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]", - "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]", - "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]", - "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]", - "suppressFailures": "[parameters('supressFailures')]" - } - } - ], - "outputs": { - "name": { - "type": "string", - "metadata": { - "description": "The name of the extension." - }, - "value": "[parameters('name')]" - }, - "resourceId": { - "type": "string", - "metadata": { - "description": "The ResourceId of the extension." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('virtualMachineScaleSetName'), parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The name of the Resource Group the extension was created in." - }, - "value": "[resourceGroup().name]" - } - } - } - }, - "dependsOn": [ - "vmss", - "vmss_customScriptExtension", - "vmss_microsoftMonitoringAgentExtension" - ] - } - }, - "outputs": { - "resourceId": { - "type": "string", - "metadata": { - "description": "The resource ID of the virtual machine scale set." - }, - "value": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('name'))]" - }, - "resourceGroupName": { - "type": "string", - "metadata": { - "description": "The resource group of the virtual machine scale set." - }, - "value": "[resourceGroup().name]" - }, - "name": { - "type": "string", - "metadata": { - "description": "The name of the virtual machine scale set." - }, - "value": "[parameters('name')]" - }, - "systemAssignedMIPrincipalId": { - "type": "string", - "metadata": { - "description": "The principal ID of the system assigned identity." - }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('vmss', '2022-11-01', 'full').identity, 'principalId')), reference('vmss', '2022-11-01', 'full').identity.principalId, '')]" - }, - "location": { - "type": "string", - "metadata": { - "description": "The location the resource was deployed into." - }, - "value": "[reference('vmss', '2022-11-01', 'full').location]" - } - } -} \ No newline at end of file diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.min/dependencies.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/linux.min/dependencies.bicep deleted file mode 100644 index b302bdc0c9..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.min/dependencies.bicep +++ /dev/null @@ -1,86 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Deployment Script to create for the SSH Key generation.') -param sshDeploymentScriptName string - -@description('Required. The name of the SSH Key to create.') -param sshKeyName string - -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(resourceGroup().id, 'Contributor', managedIdentity.id) - scope: resourceGroup() - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalType: 'ServicePrincipal' - } -} - -resource sshDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: sshDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '9.0' - retentionInterval: 'P1D' - arguments: '-SSHKeyName "${sshKeyName}" -ResourceGroupName "${resourceGroup().name}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1') - } - dependsOn: [ - msiRGContrRoleAssignment - ] -} - -resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' = { - name: sshKeyName - location: location - properties: { - publicKey: sshDeploymentScript.properties.outputs.publicKey - } -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id - -@description('The Public Key of the created SSH Key.') -output SSHKeyPublicKey string = sshKey.properties.publicKey diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.min/main.test.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/linux.min/main.test.bicep deleted file mode 100644 index 7878e685a0..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.min/main.test.bicep +++ /dev/null @@ -1,95 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.virtualmachinescalesets-${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 = 'cvmsslinmin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - adminUsername: 'scaleSetAdmin' - imageReference: { - publisher: 'Canonical' - offer: '0001-com-ubuntu-server-jammy' - sku: '22_04-lts-gen2' - version: 'latest' - } - osDisk: { - createOption: 'fromImage' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - } - } - osType: 'Linux' - skuName: 'Standard_B12ms' - disablePasswordAuthentication: true - nicConfigurations: [ - { - ipConfigurations: [ - { - name: 'ipconfig1' - properties: { - subnet: { - id: nestedDependencies.outputs.subnetResourceId - } - } - } - ] - nicSuffix: '-nic01' - } - ] - publicKeys: [ - { - keyData: nestedDependencies.outputs.SSHKeyPublicKey - path: '/home/scaleSetAdmin/.ssh/authorized_keys' - } - ] - } -}] diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.ssecmk/dependencies.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/linux.ssecmk/dependencies.bicep deleted file mode 100644 index db780eec3b..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.ssecmk/dependencies.bicep +++ /dev/null @@ -1,148 +0,0 @@ -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Disk Encryption Set to create.') -param diskEncryptionSetName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Deployment Script to create for the SSH Key generation.') -param sshDeploymentScriptName string - -@description('Required. The name of the SSH Key to create.') -param sshKeyName string - -@description('Optional. The location to deploy resources to.') -param location string = resourceGroup().location - -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: true // Required by disk encryption set - softDeleteRetentionInDays: 7 - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'keyEncryptionKey' - properties: { - kty: 'RSA' - } - } -} - -resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2021-04-01' = { - name: diskEncryptionSetName - location: location - identity: { - type: 'SystemAssigned' - } - properties: { - activeKey: { - sourceVault: { - id: keyVault.id - } - keyUrl: keyVault::key.properties.keyUriWithVersion - } - encryptionType: 'EncryptionAtRestWithPlatformAndCustomerKeys' - } -} - -resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(keyVault::key.id, 'Key Vault Crypto User', diskEncryptionSet.id) - scope: keyVault - properties: { - principalId: diskEncryptionSet.identity.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') // Key Vault Crypto Service Encryption User - principalType: 'ServicePrincipal' - } -} - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(resourceGroup().id, 'Contributor', managedIdentity.id) - scope: resourceGroup() - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalType: 'ServicePrincipal' - } -} - -resource sshDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: sshDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '9.0' - retentionInterval: 'P1D' - arguments: '-SSHKeyName "${sshKeyName}" -ResourceGroupName "${resourceGroup().name}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1') - } - dependsOn: [ - msiRGContrRoleAssignment - ] -} - -resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' = { - name: sshKeyName - location: location - properties: { - publicKey: sshDeploymentScript.properties.outputs.publicKey - } -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id - -@description('The resource ID of the created Disk Encryption Set.') -output diskEncryptionSetResourceId string = diskEncryptionSet.id - -@description('The Public Key of the created SSH Key.') -output SSHKeyPublicKey string = sshKey.properties.publicKey diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.ssecmk/main.test.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/linux.ssecmk/main.test.bicep deleted file mode 100644 index ac90b7dd77..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/linux.ssecmk/main.test.bicep +++ /dev/null @@ -1,123 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.virtualmachinescalesets-${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 = 'cvmsslcmk' - -@description('Generated. Used as a basis for unique resource names.') -param baseTime string = utcNow('u') - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - location: location - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total) - keyVaultName: 'dep${namePrefix}kv${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' - diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - location: location - name: '${namePrefix}${serviceShort}001' - adminUsername: 'scaleSetAdmin' - imageReference: { - publisher: 'Canonical' - offer: '0001-com-ubuntu-server-jammy' - sku: '22_04-lts-gen2' - version: 'latest' - } - nicConfigurations: [ - { - ipConfigurations: [ - { - name: 'ipconfig1' - properties: { - subnet: { - id: nestedDependencies.outputs.subnetResourceId - } - } - } - ] - nicSuffix: '-nic01' - } - ] - osDisk: { - createOption: 'fromImage' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - diskEncryptionSet: { - id: nestedDependencies.outputs.diskEncryptionSetResourceId - } - } - } - dataDisks: [ - { - caching: 'ReadOnly' - createOption: 'Empty' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - diskEncryptionSet: { - id: nestedDependencies.outputs.diskEncryptionSetResourceId - } - } - } - ] - osType: 'Linux' - skuName: 'Standard_B12ms' - disablePasswordAuthentication: true - publicKeys: [ - { - keyData: nestedDependencies.outputs.SSHKeyPublicKey - path: '/home/scaleSetAdmin/.ssh/authorized_keys' - } - ] - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/linux/dependencies.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/linux/dependencies.bicep deleted file mode 100644 index 556eb44538..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/linux/dependencies.bicep +++ /dev/null @@ -1,193 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Storage Account to create.') -param storageAccountName string - -@description('Required. The name of the Deployment Script used to upload data to the Storage Account.') -param storageUploadDeploymentScriptName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Deployment Script to create for the SSH Key generation.') -param sshDeploymentScriptName string - -@description('Required. The name of the SSH Key to create.') -param sshKeyName string - -var storageAccountCSEFileName = 'scriptExtensionMasterInstaller.ps1' -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: null - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'encryptionKey' - properties: { - kty: 'RSA' - } - } -} - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(resourceGroup().id, 'Contributor', managedIdentity.id) - scope: resourceGroup() - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalType: 'ServicePrincipal' - } -} - -resource msiKVCryptoUserRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(keyVault::key.id, 'Key Vault Crypto User', managedIdentity.id) - scope: keyVault::key - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User - principalType: 'ServicePrincipal' - } -} - -resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { - name: storageAccountName - location: location - sku: { - name: 'Standard_LRS' - } - kind: 'StorageV2' - - resource blobService 'blobServices@2021-09-01' = { - name: 'default' - - resource container 'containers@2021-09-01' = { - name: 'scripts' - } - } -} - -resource storageUpload 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: storageUploadDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '9.0' - retentionInterval: 'P1D' - arguments: '-StorageAccountName "${storageAccount.name}" -ResourceGroupName "${resourceGroup().name}" -ContainerName "${storageAccount::blobService::container.name}" -FileName "${storageAccountCSEFileName}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Set-BlobContent.ps1') - } - dependsOn: [ - msiRGContrRoleAssignment - ] -} - -resource sshDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: sshDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '9.0' - retentionInterval: 'P1D' - arguments: '-SSHKeyName "${sshKeyName}" -ResourceGroupName "${resourceGroup().name}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1') - } - dependsOn: [ - msiRGContrRoleAssignment - ] -} - -resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' = { - name: sshKeyName - location: location - properties: { - publicKey: sshDeploymentScript.properties.outputs.publicKey - } -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The URL of the created Key Vault.') -output keyVaultUrl string = keyVault.properties.vaultUri - -@description('The URL of the created Key Vault Encryption Key.') -output keyVaultEncryptionKeyUrl string = keyVault::key.properties.keyUriWithVersion - -@description('The name of the created Storage Account.') -output storageAccountName string = storageAccount.name - -@description('The resource ID of the created Storage Account.') -output storageAccountResourceId string = storageAccount.id - -@description('The URL of the Custom Script Extension in the created Storage Account') -output storageAccountCSEFileUrl string = '${storageAccount.properties.primaryEndpoints.blob}${storageAccount::blobService::container.name}/${storageAccountCSEFileName}' - -@description('The Public Key of the created SSH Key.') -output SSHKeyPublicKey string = sshKey.properties.publicKey diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/linux/main.test.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/linux/main.test.bicep deleted file mode 100644 index d11c193a6e..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/linux/main.test.bicep +++ /dev/null @@ -1,210 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.virtualmachinescalesets-${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 = 'cvmsslin' - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' - storageAccountName: 'dep${namePrefix}sa${serviceShort}01' - storageUploadDeploymentScriptName: 'dep-${namePrefix}-sads-${serviceShort}' - sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - adminUsername: 'scaleSetAdmin' - imageReference: { - publisher: 'Canonical' - offer: '0001-com-ubuntu-server-jammy' - sku: '22_04-lts-gen2' - version: 'latest' - } - osDisk: { - createOption: 'fromImage' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - } - } - osType: 'Linux' - skuName: 'Standard_B12ms' - availabilityZones: [ - '2' - ] - bootDiagnosticStorageAccountName: nestedDependencies.outputs.storageAccountName - dataDisks: [ - { - caching: 'ReadOnly' - createOption: 'Empty' - diskSizeGB: '256' - managedDisk: { - storageAccountType: 'Premium_LRS' - } - } - { - caching: 'ReadOnly' - createOption: 'Empty' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - } - } - ] - diagnosticSettings: [ - { - name: 'customSetting' - metricCategories: [ - { - category: 'AllMetrics' - } - ] - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - disablePasswordAuthentication: true - encryptionAtHost: false - extensionCustomScriptConfig: { - enabled: true - fileData: [ - { - storageAccountId: nestedDependencies.outputs.storageAccountResourceId - uri: nestedDependencies.outputs.storageAccountCSEFileUrl - } - ] - protectedSettings: { - commandToExecute: 'sudo apt-get update' - } - } - extensionDependencyAgentConfig: { - enabled: true - } - extensionAzureDiskEncryptionConfig: { - enabled: true - settings: { - EncryptionOperation: 'EnableEncryption' - KekVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - KeyEncryptionAlgorithm: 'RSA-OAEP' - KeyEncryptionKeyURL: nestedDependencies.outputs.keyVaultEncryptionKeyUrl - KeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - KeyVaultURL: nestedDependencies.outputs.keyVaultUrl - ResizeOSDisk: 'false' - VolumeType: 'All' - } - } - extensionMonitoringAgentConfig: { - enabled: true - } - extensionNetworkWatcherAgentConfig: { - enabled: true - } - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - nicConfigurations: [ - { - ipConfigurations: [ - { - name: 'ipconfig1' - properties: { - subnet: { - id: nestedDependencies.outputs.subnetResourceId - } - } - } - ] - nicSuffix: '-nic01' - } - ] - publicKeys: [ - { - keyData: nestedDependencies.outputs.SSHKeyPublicKey - path: '/home/scaleSetAdmin/.ssh/authorized_keys' - } - ] - roleAssignments: [ - { - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - roleDefinitionIdOrName: 'Reader' - principalType: 'ServicePrincipal' - } - ] - scaleSetFaultDomain: 1 - skuCapacity: 1 - managedIdentities: { - systemAssigned: true - userAssignedResourceIds: [ - nestedDependencies.outputs.managedIdentityResourceId - ] - } - upgradePolicyMode: 'Manual' - vmNamePrefix: 'vmsslinvm' - vmPriority: 'Regular' - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/windows.min/dependencies.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/windows.min/dependencies.bicep deleted file mode 100644 index 1166415e54..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/windows.min/dependencies.bicep +++ /dev/null @@ -1,30 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/windows.min/main.test.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/windows.min/main.test.bicep deleted file mode 100644 index e9eca80fae..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/windows.min/main.test.bicep +++ /dev/null @@ -1,90 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.virtualmachinescalesets-${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 = 'cvmsswinmin' - -@description('Optional. The password to leverage for the login.') -@secure() -param password string = newGuid() - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - adminUsername: 'localAdminUser' - adminPassword: password - imageReference: { - publisher: 'MicrosoftWindowsServer' - offer: 'WindowsServer' - sku: '2022-datacenter-azure-edition' - version: 'latest' - } - osDisk: { - createOption: 'fromImage' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - } - } - osType: 'Windows' - skuName: 'Standard_B12ms' - nicConfigurations: [ - { - ipConfigurations: [ - { - name: 'ipconfig1' - properties: { - subnet: { - id: nestedDependencies.outputs.subnetResourceId - } - } - } - ] - nicSuffix: '-nic01' - } - ] - } -}] diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/windows/dependencies.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/windows/dependencies.bicep deleted file mode 100644 index b205e4d85c..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/windows/dependencies.bicep +++ /dev/null @@ -1,166 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - -@description('Required. The name of the Virtual Network to create.') -param virtualNetworkName string - -@description('Required. The name of the Key Vault to create.') -param keyVaultName string - -@description('Required. The name of the Storage Account to create.') -param storageAccountName string - -@description('Required. The name of the Deployment Script used to upload data to the Storage Account.') -param storageUploadDeploymentScriptName string - -@description('Required. The name of the Managed Identity to create.') -param managedIdentityName string - -@description('Required. The name of the Proximity Placement Group to create.') -param proximityPlacementGroupName string - -var storageAccountCSEFileName = 'scriptExtensionMasterInstaller.ps1' -var addressPrefix = '10.0.0.0/16' - -resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { - name: virtualNetworkName - location: location - properties: { - addressSpace: { - addressPrefixes: [ - addressPrefix - ] - } - subnets: [ - { - name: 'defaultSubnet' - properties: { - addressPrefix: cidrSubnet(addressPrefix, 16, 0) - } - } - ] - } -} - -resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { - name: keyVaultName - location: location - properties: { - sku: { - family: 'A' - name: 'standard' - } - tenantId: tenant().tenantId - enablePurgeProtection: null - enabledForTemplateDeployment: true - enabledForDiskEncryption: true - enabledForDeployment: true - enableRbacAuthorization: true - accessPolicies: [] - } - - resource key 'keys@2022-07-01' = { - name: 'encryptionKey' - properties: { - kty: 'RSA' - } - } -} - -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - -resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(resourceGroup().id, 'Contributor', managedIdentity.id) - scope: resourceGroup() - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor - principalType: 'ServicePrincipal' - } -} - -resource msiKVCryptoUserRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(keyVault::key.id, 'Key Vault Crypto User', managedIdentity.id) - scope: keyVault::key - properties: { - principalId: managedIdentity.properties.principalId - roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User - principalType: 'ServicePrincipal' - } -} - -resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { - name: storageAccountName - location: location - sku: { - name: 'Standard_LRS' - } - kind: 'StorageV2' - - resource blobService 'blobServices@2021-09-01' = { - name: 'default' - - resource container 'containers@2021-09-01' = { - name: 'scripts' - } - } -} - -resource storageUpload 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: storageUploadDeploymentScriptName - location: location - kind: 'AzurePowerShell' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${managedIdentity.id}': {} - } - } - properties: { - azPowerShellVersion: '9.0' - retentionInterval: 'P1D' - arguments: '-StorageAccountName "${storageAccount.name}" -ResourceGroupName "${resourceGroup().name}" -ContainerName "${storageAccount::blobService::container.name}" -FileName "${storageAccountCSEFileName}"' - scriptContent: loadTextContent('../../../../../.shared/.scripts/Set-BlobContent.ps1') - } - dependsOn: [ - msiRGContrRoleAssignment - ] -} - -resource proximityPlacementGroup 'Microsoft.Compute/proximityPlacementGroups@2022-03-01' = { - name: proximityPlacementGroupName - location: location -} - -@description('The resource ID of the created Virtual Network Subnet.') -output subnetResourceId string = virtualNetwork.properties.subnets[0].id - -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - -@description('The resource ID of the created Managed Identity.') -output managedIdentityResourceId string = managedIdentity.id - -@description('The resource ID of the created Key Vault.') -output keyVaultResourceId string = keyVault.id - -@description('The URL of the created Key Vault.') -output keyVaultUrl string = keyVault.properties.vaultUri - -@description('The URL of the created Key Vault Encryption Key.') -output keyVaultEncryptionKeyUrl string = keyVault::key.properties.keyUriWithVersion - -@description('The resource ID of the created Storage Account.') -output storageAccountResourceId string = storageAccount.id - -@description('The URL of the Custom Script Extension in the created Storage Account') -output storageAccountCSEFileUrl string = '${storageAccount.properties.primaryEndpoints.blob}${storageAccount::blobService::container.name}/${storageAccountCSEFileName}' - -@description('The name of the Custom Script Extension in the created Storage Account.') -output storageAccountCSEFileName string = storageAccountCSEFileName - -@description('The resource ID of the created Proximity Placement Group.') -output proximityPlacementGroupResourceId string = proximityPlacementGroup.id diff --git a/modules/compute/virtual-machine-scale-set/tests/e2e/windows/main.test.bicep b/modules/compute/virtual-machine-scale-set/tests/e2e/windows/main.test.bicep deleted file mode 100644 index e1c8c527ea..0000000000 --- a/modules/compute/virtual-machine-scale-set/tests/e2e/windows/main.test.bicep +++ /dev/null @@ -1,206 +0,0 @@ -targetScope = 'subscription' - -// ========== // -// Parameters // -// ========== // - -@description('Optional. The name of the resource group to deploy for testing purposes.') -@maxLength(90) -param resourceGroupName string = 'dep-${namePrefix}-compute.virtualmachinescalesets-${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 = 'cvmsswin' - -@description('Optional. The password to leverage for the login.') -@secure() -param password string = newGuid() - -@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') -param enableDefaultTelemetry bool = true - -@description('Optional. A token to inject into the name of each resource.') -param namePrefix string = '[[namePrefix]]' - -// ============ // -// Dependencies // -// ============ // - -// General resources -// ================= -resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { - name: resourceGroupName - location: location -} - -module nestedDependencies 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' - params: { - virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' - storageAccountName: 'dep${namePrefix}sa${serviceShort}01' - storageUploadDeploymentScriptName: 'dep-${namePrefix}-sads-${serviceShort}' - proximityPlacementGroupName: 'dep-${namePrefix}-ppg-${serviceShort}' - } -} - -// Diagnostics -// =========== -module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' - params: { - storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' - logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' - eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location - } -} - -// ============== // -// Test Execution // -// ============== // - -@batchSize(1) -module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' - params: { - enableDefaultTelemetry: enableDefaultTelemetry - name: '${namePrefix}${serviceShort}001' - adminUsername: 'localAdminUser' - imageReference: { - publisher: 'MicrosoftWindowsServer' - offer: 'WindowsServer' - sku: '2022-datacenter-azure-edition' - version: 'latest' - } - osDisk: { - createOption: 'fromImage' - diskSizeGB: '128' - managedDisk: { - storageAccountType: 'Premium_LRS' - } - } - osType: 'Windows' - skuName: 'Standard_B12ms' - adminPassword: password - diagnosticSettings: [ - { - name: 'customSetting' - metricCategories: [ - { - category: 'AllMetrics' - } - ] - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } - ] - encryptionAtHost: false - extensionAntiMalwareConfig: { - enabled: true - settings: { - AntimalwareEnabled: true - Exclusions: { - Extensions: '.log;.ldf' - Paths: 'D:\\IISlogs;D:\\DatabaseLogs' - Processes: 'mssence.svc' - } - RealtimeProtectionEnabled: true - ScheduledScanSettings: { - day: '7' - isEnabled: 'true' - scanType: 'Quick' - time: '120' - } - } - } - extensionCustomScriptConfig: { - enabled: true - fileData: [ - { - storageAccountId: nestedDependencies.outputs.storageAccountResourceId - uri: nestedDependencies.outputs.storageAccountCSEFileUrl - } - ] - protectedSettings: { - commandToExecute: 'powershell -ExecutionPolicy Unrestricted -Command "& ./${nestedDependencies.outputs.storageAccountCSEFileName}"' - } - } - extensionDependencyAgentConfig: { - enabled: true - } - extensionAzureDiskEncryptionConfig: { - enabled: true - settings: { - EncryptionOperation: 'EnableEncryption' - KekVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - KeyEncryptionAlgorithm: 'RSA-OAEP' - KeyEncryptionKeyURL: nestedDependencies.outputs.keyVaultEncryptionKeyUrl - KeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - KeyVaultURL: nestedDependencies.outputs.keyVaultUrl - ResizeOSDisk: 'false' - VolumeType: 'All' - } - } - extensionDSCConfig: { - enabled: true - } - extensionMonitoringAgentConfig: { - enabled: true - } - extensionNetworkWatcherAgentConfig: { - enabled: true - } - lock: { - kind: 'CanNotDelete' - name: 'myCustomLockName' - } - nicConfigurations: [ - { - ipConfigurations: [ - { - name: 'ipconfig1' - properties: { - subnet: { - id: nestedDependencies.outputs.subnetResourceId - } - } - } - ] - nicSuffix: '-nic01' - } - ] - proximityPlacementGroupResourceId: nestedDependencies.outputs.proximityPlacementGroupResourceId - roleAssignments: [ - { - principalId: nestedDependencies.outputs.managedIdentityPrincipalId - roleDefinitionIdOrName: 'Reader' - principalType: 'ServicePrincipal' - } - ] - skuCapacity: 1 - managedIdentities: { - systemAssigned: true - userAssignedResourceIds: [ - nestedDependencies.outputs.managedIdentityResourceId - ] - } - upgradePolicyMode: 'Manual' - vmNamePrefix: 'vmsswinvm' - vmPriority: 'Regular' - tags: { - 'hidden-title': 'This is visible in the resource name' - Environment: 'Non-Prod' - Role: 'DeploymentValidation' - } - } -}] diff --git a/modules/compute/virtual-machine-scale-set/version.json b/modules/compute/virtual-machine-scale-set/version.json deleted file mode 100644 index 9ed3662aba..0000000000 --- a/modules/compute/virtual-machine-scale-set/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.6", - "pathFilters": [ - "./main.json" - ] -} diff --git a/modules/compute/virtual-machine/README.md b/modules/compute/virtual-machine/README.md index b92ce4549a..8c2c702b2f 100644 --- a/modules/compute/virtual-machine/README.md +++ b/modules/compute/virtual-machine/README.md @@ -1,3552 +1,7 @@ -# Virtual Machines `[Microsoft.Compute/virtualMachines]` +
-
-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
- "adminUsername": {
- "value": "localAdminUser"
- },
- "imageReference": {
- "value": {
- "offer": "0001-com-ubuntu-server-jammy",
- "publisher": "Canonical",
- "sku": "22_04-lts-gen2",
- "version": "latest"
- }
- },
- "nicConfigurations": {
- "value": [
- {
- "ipConfigurations": [
- {
- "name": "ipconfig01",
- "pipConfiguration": {
- "publicIpNameSuffix": "-pip-01",
- "tags": {
- "Environment": "Non-Prod",
- "hidden-title": "This is visible in the resource name",
- "Role": "DeploymentValidation"
- }
- },
- "subnetResourceId": "
-
-### Example 2: _Linux.Min_
-
-via Bicep module
-
-```bicep
-module virtualMachine 'br:bicep/modules/compute.virtual-machine:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmlinmin'
- params: {
- // Required parameters
- adminUsername: 'localAdminUser'
- imageReference: {
- offer: '0001-com-ubuntu-server-jammy'
- publisher: 'Canonical'
- sku: '22_04-lts-gen2'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- pipConfiguration: {
- publicIpNameSuffix: '-pip-01'
- }
- subnetResourceId: '
-
-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
- "adminUsername": {
- "value": "localAdminUser"
- },
- "imageReference": {
- "value": {
- "offer": "0001-com-ubuntu-server-jammy",
- "publisher": "Canonical",
- "sku": "22_04-lts-gen2",
- "version": "latest"
- }
- },
- "nicConfigurations": {
- "value": [
- {
- "ipConfigurations": [
- {
- "name": "ipconfig01",
- "pipConfiguration": {
- "publicIpNameSuffix": "-pip-01"
- },
- "subnetResourceId": "
-
-### Example 3: _Linux_
-
-via Bicep module
-
-```bicep
-module virtualMachine 'br:bicep/modules/compute.virtual-machine:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmlincom'
- params: {
- // Required parameters
- adminUsername: 'localAdministrator'
- imageReference: {
- offer: '0001-com-ubuntu-server-focal'
- publisher: 'Canonical'
- sku: '
-
-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
- "adminUsername": {
- "value": "localAdministrator"
- },
- "imageReference": {
- "value": {
- "offer": "0001-com-ubuntu-server-focal",
- "publisher": "Canonical",
- "sku": "
-
-### Example 4: _Windows.Atmg_
-
-via Bicep module
-
-```bicep
-module virtualMachine 'br:bicep/modules/compute.virtual-machine:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmwinatmg'
- params: {
- // Required parameters
- adminUsername: 'localAdministrator'
- imageReference: {
- offer: 'WindowsServer'
- publisher: 'MicrosoftWindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- subnetResourceId: '
-
-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
- "adminUsername": {
- "value": "localAdministrator"
- },
- "imageReference": {
- "value": {
- "offer": "WindowsServer",
- "publisher": "MicrosoftWindowsServer",
- "sku": "2022-datacenter-azure-edition",
- "version": "latest"
- }
- },
- "nicConfigurations": {
- "value": [
- {
- "ipConfigurations": [
- {
- "name": "ipconfig01",
- "subnetResourceId": "
-
-### Example 5: _Windows.Min_
-
-via Bicep module
-
-```bicep
-module virtualMachine 'br:bicep/modules/compute.virtual-machine:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmwinmin'
- params: {
- // Required parameters
- adminUsername: 'localAdminUser'
- imageReference: {
- offer: 'WindowsServer'
- publisher: 'MicrosoftWindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- subnetResourceId: '
-
-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
- "adminUsername": {
- "value": "localAdminUser"
- },
- "imageReference": {
- "value": {
- "offer": "WindowsServer",
- "publisher": "MicrosoftWindowsServer",
- "sku": "2022-datacenter-azure-edition",
- "version": "latest"
- }
- },
- "nicConfigurations": {
- "value": [
- {
- "ipConfigurations": [
- {
- "name": "ipconfig01",
- "subnetResourceId": "
-
-### Example 6: _Windows.Ssecmk_
-
-via Bicep module
-
-```bicep
-module virtualMachine 'br:bicep/modules/compute.virtual-machine:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmwincmk'
- params: {
- // Required parameters
- adminUsername: 'VMAdministrator'
- imageReference: {
- offer: 'WindowsServer'
- publisher: 'MicrosoftWindowsServer'
- sku: '2019-datacenter'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- subnetResourceId: '
-
-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
- "adminUsername": {
- "value": "VMAdministrator"
- },
- "imageReference": {
- "value": {
- "offer": "WindowsServer",
- "publisher": "MicrosoftWindowsServer",
- "sku": "2019-datacenter",
- "version": "latest"
- }
- },
- "nicConfigurations": {
- "value": [
- {
- "ipConfigurations": [
- {
- "name": "ipconfig01",
- "subnetResourceId": "
-
-### Example 7: _Windows_
-
-via Bicep module
-
-```bicep
-module virtualMachine 'br:bicep/modules/compute.virtual-machine:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cvmwincom'
- params: {
- // Required parameters
- adminUsername: 'VMAdmin'
- imageReference: {
- offer: 'WindowsServer'
- publisher: 'MicrosoftWindowsServer'
- sku: '2019-datacenter'
- version: 'latest'
- }
- nicConfigurations: [
- {
- deleteOption: 'Delete'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '
-
-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
- "adminUsername": {
- "value": "VMAdmin"
- },
- "imageReference": {
- "value": {
- "offer": "WindowsServer",
- "publisher": "MicrosoftWindowsServer",
- "sku": "2019-datacenter",
- "version": "latest"
- }
- },
- "nicConfigurations": {
- "value": [
- {
- "deleteOption": "Delete",
- "diagnosticSettings": [
- {
- "eventHubAuthorizationRuleResourceId": "
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`adminUsername`](#parameter-adminusername) | securestring | Administrator username. |
-| [`configurationProfile`](#parameter-configurationprofile) | string | The configuration profile of automanage. |
-| [`imageReference`](#parameter-imagereference) | object | OS image reference. In case of marketplace images, it's the combination of the publisher, offer, sku, version attributes. In case of custom images it's the resource ID of the custom image. |
-| [`nicConfigurations`](#parameter-nicconfigurations) | array | Configures NICs and PIPs. |
-| [`osDisk`](#parameter-osdisk) | object | Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. |
-| [`osType`](#parameter-ostype) | string | The chosen OS type. |
-| [`vmSize`](#parameter-vmsize) | string | Specifies the size for the VMs. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`additionalUnattendContent`](#parameter-additionalunattendcontent) | array | Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object. |
-| [`adminPassword`](#parameter-adminpassword) | securestring | When specifying a Windows Virtual Machine, this value should be passed. |
-| [`allowExtensionOperations`](#parameter-allowextensionoperations) | bool | Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. |
-| [`availabilitySetResourceId`](#parameter-availabilitysetresourceid) | string | Resource ID of an availability set. Cannot be used in combination with availability zone nor scale set. |
-| [`availabilityZone`](#parameter-availabilityzone) | int | If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. |
-| [`backupPolicyName`](#parameter-backuppolicyname) | string | Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault. |
-| [`backupVaultName`](#parameter-backupvaultname) | string | Recovery service vault name to add VMs to backup. |
-| [`backupVaultResourceGroup`](#parameter-backupvaultresourcegroup) | string | Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default. |
-| [`bootDiagnostics`](#parameter-bootdiagnostics) | bool | Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled. |
-| [`bootDiagnosticStorageAccountName`](#parameter-bootdiagnosticstorageaccountname) | string | Custom storage account used to store boot diagnostic information. Boot diagnostics will be enabled with a custom storage account if a value is provided. |
-| [`bootDiagnosticStorageAccountUri`](#parameter-bootdiagnosticstorageaccounturi) | string | Storage account boot diagnostic base URI. |
-| [`certificatesToBeInstalled`](#parameter-certificatestobeinstalled) | array | Specifies set of certificates that should be installed onto the virtual machine. |
-| [`computerName`](#parameter-computername) | string | Can be used if the computer name needs to be different from the Azure VM resource name. If not used, the resource name will be used as computer name. |
-| [`customData`](#parameter-customdata) | string | Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format. |
-| [`dataDisks`](#parameter-datadisks) | array | Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. |
-| [`dedicatedHostId`](#parameter-dedicatedhostid) | string | Specifies resource ID about the dedicated host that the virtual machine resides in. |
-| [`disablePasswordAuthentication`](#parameter-disablepasswordauthentication) | bool | Specifies whether password authentication should be disabled. |
-| [`enableAutomaticUpdates`](#parameter-enableautomaticupdates) | bool | Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. When patchMode is set to Manual, this parameter must be set to false. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enableEvictionPolicy`](#parameter-enableevictionpolicy) | bool | Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy. |
-| [`encryptionAtHost`](#parameter-encryptionathost) | bool | This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. |
-| [`extensionAadJoinConfig`](#parameter-extensionaadjoinconfig) | object | The configuration for the [AAD Join] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionAntiMalwareConfig`](#parameter-extensionantimalwareconfig) | object | The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionAzureDiskEncryptionConfig`](#parameter-extensionazurediskencryptionconfig) | object | The configuration for the [Azure Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys. |
-| [`extensionCustomScriptConfig`](#parameter-extensioncustomscriptconfig) | object | The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionCustomScriptProtectedSetting`](#parameter-extensioncustomscriptprotectedsetting) | secureObject | Any object that contains the extension specific protected settings. |
-| [`extensionDependencyAgentConfig`](#parameter-extensiondependencyagentconfig) | object | The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionDomainJoinConfig`](#parameter-extensiondomainjoinconfig) | object | The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionDomainJoinPassword`](#parameter-extensiondomainjoinpassword) | securestring | Required if name is specified. Password of the user specified in user parameter. |
-| [`extensionDSCConfig`](#parameter-extensiondscconfig) | object | The configuration for the [Desired State Configuration] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionMonitoringAgentConfig`](#parameter-extensionmonitoringagentconfig) | object | The configuration for the [Monitoring Agent] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`extensionNetworkWatcherAgentConfig`](#parameter-extensionnetworkwatcheragentconfig) | object | The configuration for the [Network Watcher Agent] extension. Must at least contain the ["enabled": true] property to be executed. |
-| [`licenseType`](#parameter-licensetype) | string | Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. The system-assigned managed identity will automatically be enabled if extensionAadJoinConfig.enabled = "True". |
-| [`maxPriceForLowPriorityVm`](#parameter-maxpriceforlowpriorityvm) | string | Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars. |
-| [`monitoringWorkspaceId`](#parameter-monitoringworkspaceid) | string | Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true. |
-| [`name`](#parameter-name) | string | The name of the virtual machine to be created. You should use a unique prefix to reduce name collisions in Active Directory. If no value is provided, a 10 character long unique string will be generated based on the Resource Group's name. |
-| [`patchAssessmentMode`](#parameter-patchassessmentmode) | string | VM guest patching assessment mode. Set it to 'AutomaticByPlatform' to enable automatically check for updates every 24 hours. |
-| [`patchMode`](#parameter-patchmode) | string | VM guest patching orchestration mode. 'AutomaticByOS' & 'Manual' are for Windows only, 'ImageDefault' for Linux only. Refer to 'https://learn.microsoft.com/en-us/azure/virtual-machines/automatic-vm-guest-patching'. |
-| [`plan`](#parameter-plan) | object | Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. |
-| [`priority`](#parameter-priority) | string | Specifies the priority for the virtual machine. |
-| [`provisionVMAgent`](#parameter-provisionvmagent) | bool | Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. |
-| [`proximityPlacementGroupResourceId`](#parameter-proximityplacementgroupresourceid) | string | Resource ID of a proximity placement group. |
-| [`publicKeys`](#parameter-publickeys) | array | The list of SSH public keys used to authenticate with linux based VMs. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`sasTokenValidityLength`](#parameter-sastokenvaliditylength) | string | SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours. |
-| [`secureBootEnabled`](#parameter-securebootenabled) | bool | Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. |
-| [`securityType`](#parameter-securitytype) | string | Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`timeZone`](#parameter-timezone) | string | Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`. |
-| [`ultraSSDEnabled`](#parameter-ultrassdenabled) | bool | The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. |
-| [`vTpmEnabled`](#parameter-vtpmenabled) | bool | Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. |
-| [`winRM`](#parameter-winrm) | object | Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`baseTime`](#parameter-basetime) | string | Do not provide a value! This date value is used to generate a registration token. |
-
-### Parameter: `adminUsername`
-
-Administrator username.
-
-- Required: Yes
-- Type: securestring
-
-### Parameter: `configurationProfile`
-
-The configuration profile of automanage.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest'
- '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction'
- ]
- ```
-
-### Parameter: `imageReference`
-
-OS image reference. In case of marketplace images, it's the combination of the publisher, offer, sku, version attributes. In case of custom images it's the resource ID of the custom image.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `nicConfigurations`
-
-Configures NICs and PIPs.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `osDisk`
-
-Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `osType`
-
-The chosen OS type.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `vmSize`
-
-Specifies the size for the VMs.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `additionalUnattendContent`
-
-Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `adminPassword`
-
-When specifying a Windows Virtual Machine, this value should be passed.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `allowExtensionOperations`
-
-Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `availabilitySetResourceId`
-
-Resource ID of an availability set. Cannot be used in combination with availability zone nor scale set.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `availabilityZone`
-
-If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set.
-
-- Required: No
-- Type: int
-- Default: `0`
-- Allowed:
- ```Bicep
- [
- 0
- 1
- 2
- 3
- ]
- ```
-
-### Parameter: `backupPolicyName`
-
-Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault.
-
-- Required: No
-- Type: string
-- Default: `'DefaultPolicy'`
-
-### Parameter: `backupVaultName`
-
-Recovery service vault name to add VMs to backup.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `backupVaultResourceGroup`
-
-Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().name]`
-
-### Parameter: `bootDiagnostics`
-
-Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `bootDiagnosticStorageAccountName`
-
-Custom storage account used to store boot diagnostic information. Boot diagnostics will be enabled with a custom storage account if a value is provided.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `bootDiagnosticStorageAccountUri`
-
-Storage account boot diagnostic base URI.
-
-- Required: No
-- Type: string
-- Default: `[format('.blob.{0}/', environment().suffixes.storage)]`
-
-### Parameter: `certificatesToBeInstalled`
-
-Specifies set of certificates that should be installed onto the virtual machine.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `computerName`
-
-Can be used if the computer name needs to be different from the Azure VM resource name. If not used, the resource name will be used as computer name.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `customData`
-
-Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `dataDisks`
-
-Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dedicatedHostId`
-
-Specifies resource ID about the dedicated host that the virtual machine resides in.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `disablePasswordAuthentication`
-
-Specifies whether password authentication should be disabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableAutomaticUpdates`
-
-Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. When patchMode is set to Manual, this parameter must be set to false. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableEvictionPolicy`
-
-Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `encryptionAtHost`
-
-This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `extensionAadJoinConfig`
-
-The configuration for the [AAD Join] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionAntiMalwareConfig`
-
-The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionAzureDiskEncryptionConfig`
-
-The configuration for the [Azure Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionCustomScriptConfig`
-
-The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- fileData: []
- }
- ```
-
-### Parameter: `extensionCustomScriptProtectedSetting`
-
-Any object that contains the extension specific protected settings.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `extensionDependencyAgentConfig`
-
-The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionDomainJoinConfig`
-
-The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionDomainJoinPassword`
-
-Required if name is specified. Password of the user specified in user parameter.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `extensionDSCConfig`
-
-The configuration for the [Desired State Configuration] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionMonitoringAgentConfig`
-
-The configuration for the [Monitoring Agent] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `extensionNetworkWatcherAgentConfig`
-
-The configuration for the [Network Watcher Agent] extension. Must at least contain the ["enabled": true] property to be executed.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- enabled: false
- }
- ```
-
-### Parameter: `licenseType`
-
-Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Windows_Client'
- 'Windows_Server'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. The system-assigned managed identity will automatically be enabled if extensionAadJoinConfig.enabled = "True".
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `maxPriceForLowPriorityVm`
-
-Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `monitoringWorkspaceId`
-
-Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `name`
-
-The name of the virtual machine to be created. You should use a unique prefix to reduce name collisions in Active Directory. If no value is provided, a 10 character long unique string will be generated based on the Resource Group's name.
-
-- Required: No
-- Type: string
-- Default: `[take(toLower(uniqueString(resourceGroup().name)), 10)]`
-
-### Parameter: `patchAssessmentMode`
-
-VM guest patching assessment mode. Set it to 'AutomaticByPlatform' to enable automatically check for updates every 24 hours.
-
-- Required: No
-- Type: string
-- Default: `'ImageDefault'`
-- Allowed:
- ```Bicep
- [
- 'AutomaticByPlatform'
- 'ImageDefault'
- ]
- ```
-
-### Parameter: `patchMode`
-
-VM guest patching orchestration mode. 'AutomaticByOS' & 'Manual' are for Windows only, 'ImageDefault' for Linux only. Refer to 'https://learn.microsoft.com/en-us/azure/virtual-machines/automatic-vm-guest-patching'.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'AutomaticByOS'
- 'AutomaticByPlatform'
- 'ImageDefault'
- 'Manual'
- ]
- ```
-
-### Parameter: `plan`
-
-Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `priority`
-
-Specifies the priority for the virtual machine.
-
-- Required: No
-- Type: string
-- Default: `'Regular'`
-- Allowed:
- ```Bicep
- [
- 'Low'
- 'Regular'
- 'Spot'
- ]
- ```
-
-### Parameter: `provisionVMAgent`
-
-Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `proximityPlacementGroupResourceId`
-
-Resource ID of a proximity placement group.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `publicKeys`
-
-The list of SSH public keys used to authenticate with linux based VMs.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `sasTokenValidityLength`
-
-SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours.
-
-- Required: No
-- Type: string
-- Default: `'PT8H'`
-
-### Parameter: `secureBootEnabled`
-
-Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `securityType`
-
-Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `timeZone`
-
-Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `ultraSSDEnabled`
-
-The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `vTpmEnabled`
-
-Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `winRM`
-
-Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `baseTime`
-
-Do not provide a value! This date value is used to generate a registration token.
-
-- Required: No
-- Type: string
-- Default: `[utcNow('u')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the VM. |
-| `resourceGroupName` | string | The name of the resource group the VM was created in. |
-| `resourceId` | string | The resource ID of the VM. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/network-interface` | Local reference |
-| `modules/network/public-ip-address` | Local reference |
-| `modules/recovery-services/vault/backup-fabric/protection-container/protected-item` | Local reference |
-
-## Notes
-
-### Automanage considerations
-
-Enabling automanage triggers the creation of additional resources outside of the specific virtual machine deployment, such as:
-- an `Automanage-Automate-
-
-#### Custom images
-
-
-
-### Parameter Usage: `plan`
-
-
-
-### Parameter Usage: `osDisk`
-
-
-
-### Parameter Usage: `dataDisks`
-
-
-
-### Parameter Usage: `nicConfigurations`
-
-Comments:
-- The field `nicSuffix` and `subnetResourceId` are mandatory.
-- If `enablePublicIP` is set to true, then `publicIpNameSuffix` is also mandatory.
-- Each IP config needs to have the mandatory field `name`.
-- If not disabled, `enableAcceleratedNetworking` is considered `true` by default and requires the VM to be deployed with a supported OS and VM size.
-
-
-
-### Parameter Usage: `configurationProfileAssignments`
-
-
-
-### Parameter Usage: `extensionDomainJoinConfig`
-
-
-
-### Parameter Usage: `extensionAntiMalwareConfig`
-
-Only for OSType Windows
-
-
-
-### Parameter Usage: `extensionAzureDiskEncryptionConfig`
-
-
-
-### Parameter Usage: `extensionDSCConfig`
-
-
-
-### Parameter Usage: `extensionCustomScriptConfig`
-
-
-
-### Parameter Usage: `extensionCustomScriptProtectedSetting`
-
-This is used if you are going to use secrets or other sensitive information that you don't want to be visible in the deployment and logs.
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/compute/virtual-machine/extension/README.md b/modules/compute/virtual-machine/extension/README.md
deleted file mode 100644
index 324ebc8179..0000000000
--- a/modules/compute/virtual-machine/extension/README.md
+++ /dev/null
@@ -1,165 +0,0 @@
-# Virtual Machine Extensions `[Microsoft.Compute/virtualMachines/extensions]`
-
-This module deploys a Virtual Machine Extension.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Compute/virtualMachines/extensions` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Compute/2022-11-01/virtualMachines/extensions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`autoUpgradeMinorVersion`](#parameter-autoupgrademinorversion) | bool | Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. |
-| [`enableAutomaticUpgrade`](#parameter-enableautomaticupgrade) | bool | Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. |
-| [`name`](#parameter-name) | string | The name of the virtual machine extension. |
-| [`publisher`](#parameter-publisher) | string | The name of the extension handler publisher. |
-| [`type`](#parameter-type) | string | Specifies the type of the extension; an example is "CustomScriptExtension". |
-| [`typeHandlerVersion`](#parameter-typehandlerversion) | string | Specifies the version of the script handler. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`virtualMachineName`](#parameter-virtualmachinename) | string | The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`forceUpdateTag`](#parameter-forceupdatetag) | string | How the extension handler should be forced to update even if the extension configuration has not changed. |
-| [`location`](#parameter-location) | string | The location the extension is deployed to. |
-| [`protectedSettings`](#parameter-protectedsettings) | secureObject | Any object that contains the extension specific protected settings. |
-| [`settings`](#parameter-settings) | object | Any object that contains the extension specific settings. |
-| [`supressFailures`](#parameter-supressfailures) | bool | Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `autoUpgradeMinorVersion`
-
-Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
-
-- Required: Yes
-- Type: bool
-
-### Parameter: `enableAutomaticUpgrade`
-
-Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
-
-- Required: Yes
-- Type: bool
-
-### Parameter: `name`
-
-The name of the virtual machine extension.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `publisher`
-
-The name of the extension handler publisher.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `type`
-
-Specifies the type of the extension; an example is "CustomScriptExtension".
-
-- Required: Yes
-- Type: string
-
-### Parameter: `typeHandlerVersion`
-
-Specifies the version of the script handler.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `virtualMachineName`
-
-The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `forceUpdateTag`
-
-How the extension handler should be forced to update even if the extension configuration has not changed.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-The location the extension is deployed to.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `protectedSettings`
-
-Any object that contains the extension specific protected settings.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `settings`
-
-Any object that contains the extension specific settings.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `supressFailures`
-
-Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the extension. |
-| `resourceGroupName` | string | The name of the Resource Group the extension was created in. |
-| `resourceId` | string | The resource ID of the extension. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/compute/virtual-machine/extension/main.bicep b/modules/compute/virtual-machine/extension/main.bicep
deleted file mode 100644
index 909805fe1c..0000000000
--- a/modules/compute/virtual-machine/extension/main.bicep
+++ /dev/null
@@ -1,92 +0,0 @@
-metadata name = 'Virtual Machine Extensions'
-metadata description = 'This module deploys a Virtual Machine Extension.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment.')
-param virtualMachineName string
-
-@description('Required. The name of the virtual machine extension.')
-param name string
-
-@description('Optional. The location the extension is deployed to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the extension handler publisher.')
-param publisher string
-
-@description('Required. Specifies the type of the extension; an example is "CustomScriptExtension".')
-param type string
-
-@description('Required. Specifies the version of the script handler.')
-param typeHandlerVersion string
-
-@description('Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.')
-param autoUpgradeMinorVersion bool
-
-@description('Optional. How the extension handler should be forced to update even if the extension configuration has not changed.')
-param forceUpdateTag string = ''
-
-@description('Optional. Any object that contains the extension specific settings.')
-param settings object = {}
-
-@description('Optional. Any object that contains the extension specific protected settings.')
-@secure()
-param protectedSettings object = {}
-
-@description('Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.')
-param supressFailures bool = false
-
-@description('Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.')
-param enableAutomaticUpgrade bool
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource virtualMachine 'Microsoft.Compute/virtualMachines@2022-11-01' existing = {
- name: virtualMachineName
-}
-
-resource extension 'Microsoft.Compute/virtualMachines/extensions@2022-11-01' = {
- name: name
- parent: virtualMachine
- location: location
- tags: tags
- properties: {
- publisher: publisher
- type: type
- typeHandlerVersion: typeHandlerVersion
- autoUpgradeMinorVersion: autoUpgradeMinorVersion
- enableAutomaticUpgrade: enableAutomaticUpgrade
- forceUpdateTag: !empty(forceUpdateTag) ? forceUpdateTag : null
- settings: !empty(settings) ? settings : null
- protectedSettings: !empty(protectedSettings) ? protectedSettings : null
- suppressFailures: supressFailures
- }
-}
-
-@description('The name of the extension.')
-output name string = extension.name
-
-@description('The resource ID of the extension.')
-output resourceId string = extension.id
-
-@description('The name of the Resource Group the extension was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = extension.location
diff --git a/modules/compute/virtual-machine/extension/main.json b/modules/compute/virtual-machine/extension/main.json
deleted file mode 100644
index 50534220f0..0000000000
--- a/modules/compute/virtual-machine/extension/main.json
+++ /dev/null
@@ -1,181 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "9638144716839375831"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/compute/virtual-machine/extension/version.json b/modules/compute/virtual-machine/extension/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/compute/virtual-machine/extension/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/compute/virtual-machine/main.bicep b/modules/compute/virtual-machine/main.bicep
deleted file mode 100644
index f908e4b473..0000000000
--- a/modules/compute/virtual-machine/main.bicep
+++ /dev/null
@@ -1,771 +0,0 @@
-metadata name = 'Virtual Machines'
-metadata description = 'This module deploys a Virtual Machine with one or multiple NICs and optionally one or multiple public IPs.'
-metadata owner = 'Azure/module-maintainers'
-
-// Main resource
-@description('Optional. The name of the virtual machine to be created. You should use a unique prefix to reduce name collisions in Active Directory. If no value is provided, a 10 character long unique string will be generated based on the Resource Group\'s name.')
-param name string = take(toLower(uniqueString(resourceGroup().name)), 10)
-
-@description('Optional. Can be used if the computer name needs to be different from the Azure VM resource name. If not used, the resource name will be used as computer name.')
-param computerName string = name
-
-@description('Required. Specifies the size for the VMs.')
-param vmSize string
-
-@description('Optional. This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.')
-param encryptionAtHost bool = true
-
-@description('Optional. Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings.')
-param securityType string = ''
-
-@description('Optional. Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.')
-param secureBootEnabled bool = false
-
-@description('Optional. Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings.')
-param vTpmEnabled bool = false
-
-@description('Required. OS image reference. In case of marketplace images, it\'s the combination of the publisher, offer, sku, version attributes. In case of custom images it\'s the resource ID of the custom image.')
-param imageReference object
-
-@description('Optional. Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use.')
-param plan object = {}
-
-@description('Required. Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.')
-param osDisk object
-
-@description('Optional. Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.')
-param dataDisks array = []
-
-@description('Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.')
-param ultraSSDEnabled bool = false
-
-@description('Required. Administrator username.')
-@secure()
-param adminUsername string
-
-@description('Optional. When specifying a Windows Virtual Machine, this value should be passed.')
-@secure()
-param adminPassword string = ''
-
-@description('Optional. Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format.')
-param customData string = ''
-
-@description('Optional. Specifies set of certificates that should be installed onto the virtual machine.')
-param certificatesToBeInstalled array = []
-
-@description('Optional. Specifies the priority for the virtual machine.')
-@allowed([
- 'Regular'
- 'Low'
- 'Spot'
-])
-param priority string = 'Regular'
-
-@description('Optional. Specifies the eviction policy for the low priority virtual machine. Will result in \'Deallocate\' eviction policy.')
-param enableEvictionPolicy bool = false
-
-@description('Optional. Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.')
-param maxPriceForLowPriorityVm string = ''
-
-@description('Optional. Specifies resource ID about the dedicated host that the virtual machine resides in.')
-param dedicatedHostId string = ''
-
-@description('Optional. Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.')
-@allowed([
- 'Windows_Client'
- 'Windows_Server'
- ''
-])
-param licenseType string = ''
-
-@description('Optional. The list of SSH public keys used to authenticate with linux based VMs.')
-param publicKeys array = []
-
-@description('Optional. The managed identity definition for this resource. The system-assigned managed identity will automatically be enabled if extensionAadJoinConfig.enabled = "True".')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled.')
-param bootDiagnostics bool = false
-
-@description('Optional. Custom storage account used to store boot diagnostic information. Boot diagnostics will be enabled with a custom storage account if a value is provided.')
-param bootDiagnosticStorageAccountName string = ''
-
-@description('Optional. Storage account boot diagnostic base URI.')
-param bootDiagnosticStorageAccountUri string = '.blob.${environment().suffixes.storage}/'
-
-@description('Optional. Resource ID of a proximity placement group.')
-param proximityPlacementGroupResourceId string = ''
-
-@description('Optional. Resource ID of an availability set. Cannot be used in combination with availability zone nor scale set.')
-param availabilitySetResourceId string = ''
-
-@description('Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set.')
-@allowed([
- 0
- 1
- 2
- 3
-])
-param availabilityZone int = 0
-
-// External resources
-@description('Required. Configures NICs and PIPs.')
-param nicConfigurations array
-
-@description('Optional. Recovery service vault name to add VMs to backup.')
-param backupVaultName string = ''
-
-@description('Optional. Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default.')
-param backupVaultResourceGroup string = resourceGroup().name
-
-@description('Optional. Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault.')
-param backupPolicyName string = 'DefaultPolicy'
-
-// Child resources
-@description('Optional. Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine.')
-param allowExtensionOperations bool = true
-
-@description('Optional. Required if name is specified. Password of the user specified in user parameter.')
-@secure()
-param extensionDomainJoinPassword string = ''
-
-@description('Optional. The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionDomainJoinConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [AAD Join] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionAadJoinConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionAntiMalwareConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [Monitoring Agent] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionMonitoringAgentConfig object = {
- enabled: false
-}
-
-@description('Optional. Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true.')
-param monitoringWorkspaceId string = ''
-
-@description('Optional. The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionDependencyAgentConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [Network Watcher Agent] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionNetworkWatcherAgentConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [Azure Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.')
-param extensionAzureDiskEncryptionConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [Desired State Configuration] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionDSCConfig object = {
- enabled: false
-}
-
-@description('Optional. The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed.')
-param extensionCustomScriptConfig object = {
- enabled: false
- fileData: []
-}
-
-@description('Optional. Any object that contains the extension specific protected settings.')
-@secure()
-param extensionCustomScriptProtectedSetting object = {}
-
-// Shared parameters
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Generated. Do not provide a value! This date value is used to generate a registration token.')
-param baseTime string = utcNow('u')
-
-@description('Optional. SAS token validity length to use to download files from storage accounts. Usage: \'PT8H\' - valid for 8 hours; \'P5D\' - valid for 5 days; \'P1Y\' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours.')
-param sasTokenValidityLength string = 'PT8H'
-
-@description('Required. The chosen OS type.')
-@allowed([
- 'Windows'
- 'Linux'
-])
-param osType string
-
-@description('Optional. Specifies whether password authentication should be disabled.')
-#disable-next-line secure-secrets-in-params // Not a secret
-param disablePasswordAuthentication bool = false
-
-@description('Optional. Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.')
-param provisionVMAgent bool = true
-
-@description('Optional. Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. When patchMode is set to Manual, this parameter must be set to false. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.')
-param enableAutomaticUpdates bool = true
-
-@description('Optional. VM guest patching orchestration mode. \'AutomaticByOS\' & \'Manual\' are for Windows only, \'ImageDefault\' for Linux only. Refer to \'https://learn.microsoft.com/en-us/azure/virtual-machines/automatic-vm-guest-patching\'.')
-@allowed([
- 'AutomaticByPlatform'
- 'AutomaticByOS'
- 'Manual'
- 'ImageDefault'
- ''
-])
-param patchMode string = ''
-
-@description('Optional. VM guest patching assessment mode. Set it to \'AutomaticByPlatform\' to enable automatically check for updates every 24 hours.')
-@allowed([
- 'AutomaticByPlatform'
- 'ImageDefault'
-])
-param patchAssessmentMode string = 'ImageDefault'
-
-@description('Optional. Specifies the time zone of the virtual machine. e.g. \'Pacific Standard Time\'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`.')
-param timeZone string = ''
-
-@description('Optional. Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object.')
-param additionalUnattendContent array = []
-
-@description('Optional. Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object.')
-param winRM object = {}
-
-@description('Required. The configuration profile of automanage.')
-@allowed([
- '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction'
- '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest'
- ''
-])
-param configurationProfile string = ''
-
-var publicKeysFormatted = [for publicKey in publicKeys: {
- path: publicKey.path
- keyData: publicKey.keyData
-}]
-
-var linuxConfiguration = {
- disablePasswordAuthentication: disablePasswordAuthentication
- ssh: {
- publicKeys: publicKeysFormatted
- }
- provisionVMAgent: provisionVMAgent
- patchSettings: (provisionVMAgent && (patchMode =~ 'AutomaticByPlatform' || patchMode =~ 'ImageDefault')) ? {
- patchMode: patchMode
- assessmentMode: patchAssessmentMode
- } : null
-}
-
-var windowsConfiguration = {
- provisionVMAgent: provisionVMAgent
- enableAutomaticUpdates: enableAutomaticUpdates
- patchSettings: (provisionVMAgent && (patchMode =~ 'AutomaticByPlatform' || patchMode =~ 'AutomaticByOS' || patchMode =~ 'Manual')) ? {
- patchMode: patchMode
- assessmentMode: patchAssessmentMode
- } : null
- timeZone: empty(timeZone) ? null : timeZone
- additionalUnattendContent: empty(additionalUnattendContent) ? null : additionalUnattendContent
- winRM: !empty(winRM) ? {
- listeners: winRM
- } : null
-}
-
-var accountSasProperties = {
- signedServices: 'b'
- signedPermission: 'r'
- signedExpiry: dateTimeAdd(baseTime, sasTokenValidityLength)
- signedResourceTypes: 'o'
- signedProtocol: 'https'
-}
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-// If AADJoin Extension is enabled then we automatically enable SystemAssigned (required by AADJoin), otherwise we follow the usual logic.
-var identity = !empty(managedIdentities) ? {
- type: (extensionAadJoinConfig.enabled ? true : (managedIdentities.?systemAssigned ?? false)) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Data Operator for Managed Disks': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e')
- 'Desktop Virtualization Power On Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '489581de-a3bd-480d-9518-53dea7416b33')
- 'Desktop Virtualization Power On Off Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')
- 'Desktop Virtualization Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')
- 'DevTest Labs User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64')
- 'Disk Backup Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24')
- 'Disk Pool Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840')
- 'Disk Restore Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13')
- 'Disk Snapshot Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
- 'Virtual Machine Administrator Login': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1c0163c0-47e6-4577-8991-ea5c82e286e4')
- 'Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c')
- 'Virtual Machine User Login': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fb879df8-f326-4884-b1cf-06f3ad86be52')
- 'VM Scanner Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd24ecba3-c1f4-40fa-a7bb-4588a071e8fd')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-module vm_nic 'modules/nested_networkInterface.bicep' = [for (nicConfiguration, index) in nicConfigurations: {
- name: '${uniqueString(deployment().name, location)}-VM-Nic-${index}'
- params: {
- networkInterfaceName: '${name}${nicConfiguration.nicSuffix}'
- virtualMachineName: name
- location: location
- enableIPForwarding: contains(nicConfiguration, 'enableIPForwarding') ? (!empty(nicConfiguration.enableIPForwarding) ? nicConfiguration.enableIPForwarding : false) : false
- enableAcceleratedNetworking: contains(nicConfiguration, 'enableAcceleratedNetworking') ? nicConfiguration.enableAcceleratedNetworking : true
- dnsServers: contains(nicConfiguration, 'dnsServers') ? (!empty(nicConfiguration.dnsServers) ? nicConfiguration.dnsServers : []) : []
- networkSecurityGroupResourceId: contains(nicConfiguration, 'networkSecurityGroupResourceId') ? nicConfiguration.networkSecurityGroupResourceId : ''
- ipConfigurations: nicConfiguration.ipConfigurations
- lock: nicConfiguration.?lock ?? lock
- tags: nicConfiguration.?tags ?? tags
- diagnosticSettings: nicConfiguration.?diagnosticSettings
- roleAssignments: nicConfiguration.?roleAssignments
- }
-}]
-
-resource vm 'Microsoft.Compute/virtualMachines@2022-11-01' = {
- name: name
- location: location
- identity: identity
- tags: tags
- zones: availabilityZone != 0 ? array(availabilityZone) : null
- plan: !empty(plan) ? plan : null
- properties: {
- hardwareProfile: {
- vmSize: vmSize
- }
- securityProfile: {
- encryptionAtHost: encryptionAtHost ? encryptionAtHost : null
- securityType: securityType
- uefiSettings: securityType == 'TrustedLaunch' ? {
- secureBootEnabled: secureBootEnabled
- vTpmEnabled: vTpmEnabled
- } : null
- }
- storageProfile: {
- imageReference: imageReference
- osDisk: {
- name: '${name}-disk-os-01'
- createOption: contains(osDisk, 'createOption') ? osDisk.createOption : 'FromImage'
- deleteOption: contains(osDisk, 'deleteOption') ? osDisk.deleteOption : 'Delete'
- diskSizeGB: osDisk.diskSizeGB
- caching: contains(osDisk, 'caching') ? osDisk.caching : 'ReadOnly'
- managedDisk: {
- storageAccountType: osDisk.managedDisk.storageAccountType
- diskEncryptionSet: contains(osDisk.managedDisk, 'diskEncryptionSet') ? {
- id: osDisk.managedDisk.diskEncryptionSet.id
- } : null
- }
- }
- dataDisks: [for (dataDisk, index) in dataDisks: {
- lun: index
- name: '${name}-disk-data-${padLeft((index + 1), 2, '0')}'
- diskSizeGB: dataDisk.diskSizeGB
- createOption: contains(dataDisk, 'createOption') ? dataDisk.createOption : 'Empty'
- deleteOption: contains(dataDisk, 'deleteOption') ? dataDisk.deleteOption : 'Delete'
- caching: contains(dataDisk, 'caching') ? dataDisk.caching : 'ReadOnly'
- managedDisk: {
- storageAccountType: dataDisk.managedDisk.storageAccountType
- diskEncryptionSet: contains(dataDisk.managedDisk, 'diskEncryptionSet') ? {
- id: dataDisk.managedDisk.diskEncryptionSet.id
- } : null
- }
- }]
- }
- additionalCapabilities: {
- ultraSSDEnabled: ultraSSDEnabled
- }
- osProfile: {
- computerName: computerName
- adminUsername: adminUsername
- adminPassword: adminPassword
- customData: !empty(customData) ? base64(customData) : null
- windowsConfiguration: osType == 'Windows' ? windowsConfiguration : null
- linuxConfiguration: osType == 'Linux' ? linuxConfiguration : null
- secrets: certificatesToBeInstalled
- allowExtensionOperations: allowExtensionOperations
- }
- networkProfile: {
- networkInterfaces: [for (nicConfiguration, index) in nicConfigurations: {
- properties: {
- deleteOption: contains(nicConfiguration, 'deleteOption') ? nicConfiguration.deleteOption : 'Delete'
- primary: index == 0 ? true : false
- }
- id: az.resourceId('Microsoft.Network/networkInterfaces', '${name}${nicConfiguration.nicSuffix}')
- }]
- }
- diagnosticsProfile: {
- bootDiagnostics: {
- enabled: !empty(bootDiagnosticStorageAccountName) ? true : bootDiagnostics
- storageUri: !empty(bootDiagnosticStorageAccountName) ? 'https://${bootDiagnosticStorageAccountName}${bootDiagnosticStorageAccountUri}' : null
- }
- }
- availabilitySet: !empty(availabilitySetResourceId) ? {
- id: availabilitySetResourceId
- } : null
- proximityPlacementGroup: !empty(proximityPlacementGroupResourceId) ? {
- id: proximityPlacementGroupResourceId
- } : null
- priority: priority
- evictionPolicy: enableEvictionPolicy ? 'Deallocate' : null
- billingProfile: !empty(priority) && !empty(maxPriceForLowPriorityVm) ? {
- maxPrice: maxPriceForLowPriorityVm
- } : null
- host: !empty(dedicatedHostId) ? {
- id: dedicatedHostId
- } : null
- licenseType: !empty(licenseType) ? licenseType : null
- }
- dependsOn: [
- vm_nic
- ]
-}
-
-resource vm_configurationProfileAssignment 'Microsoft.Automanage/configurationProfileAssignments@2021-04-30-preview' = if (!empty(configurationProfile)) {
- name: 'default'
- properties: {
- configurationProfile: configurationProfile
- }
- scope: vm
-}
-
-module vm_aadJoinExtension 'extension/main.bicep' = if (extensionAadJoinConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-AADLogin'
- params: {
- virtualMachineName: vm.name
- name: 'AADLogin'
- publisher: 'Microsoft.Azure.ActiveDirectory'
- type: osType == 'Windows' ? 'AADLoginForWindows' : 'AADSSHLoginforLinux'
- typeHandlerVersion: contains(extensionAadJoinConfig, 'typeHandlerVersion') ? extensionAadJoinConfig.typeHandlerVersion : '1.0'
- autoUpgradeMinorVersion: contains(extensionAadJoinConfig, 'autoUpgradeMinorVersion') ? extensionAadJoinConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionAadJoinConfig, 'enableAutomaticUpgrade') ? extensionAadJoinConfig.enableAutomaticUpgrade : false
- settings: contains(extensionAadJoinConfig, 'settings') ? extensionAadJoinConfig.settings : {}
- tags: extensionAadJoinConfig.?tags ?? tags
- }
-}
-
-module vm_domainJoinExtension 'extension/main.bicep' = if (extensionDomainJoinConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-DomainJoin'
- params: {
- virtualMachineName: vm.name
- name: 'DomainJoin'
- publisher: 'Microsoft.Compute'
- type: 'JsonADDomainExtension'
- typeHandlerVersion: contains(extensionDomainJoinConfig, 'typeHandlerVersion') ? extensionDomainJoinConfig.typeHandlerVersion : '1.3'
- autoUpgradeMinorVersion: contains(extensionDomainJoinConfig, 'autoUpgradeMinorVersion') ? extensionDomainJoinConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionDomainJoinConfig, 'enableAutomaticUpgrade') ? extensionDomainJoinConfig.enableAutomaticUpgrade : false
- settings: extensionDomainJoinConfig.settings
- tags: extensionDomainJoinConfig.?tags ?? tags
- protectedSettings: {
- Password: extensionDomainJoinPassword
- }
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module vm_microsoftAntiMalwareExtension 'extension/main.bicep' = if (extensionAntiMalwareConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-MicrosoftAntiMalware'
- params: {
- virtualMachineName: vm.name
- name: 'MicrosoftAntiMalware'
- publisher: 'Microsoft.Azure.Security'
- type: 'IaaSAntimalware'
- typeHandlerVersion: contains(extensionAntiMalwareConfig, 'typeHandlerVersion') ? extensionAntiMalwareConfig.typeHandlerVersion : '1.3'
- autoUpgradeMinorVersion: contains(extensionAntiMalwareConfig, 'autoUpgradeMinorVersion') ? extensionAntiMalwareConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionAntiMalwareConfig, 'enableAutomaticUpgrade') ? extensionAntiMalwareConfig.enableAutomaticUpgrade : false
- settings: extensionAntiMalwareConfig.settings
- tags: extensionAntiMalwareConfig.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-resource vm_logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = if (!empty(monitoringWorkspaceId)) {
- name: last(split((!empty(monitoringWorkspaceId) ? monitoringWorkspaceId : 'law'), '/'))!
- scope: az.resourceGroup(split((!empty(monitoringWorkspaceId) ? monitoringWorkspaceId : '//'), '/')[2], split((!empty(monitoringWorkspaceId) ? monitoringWorkspaceId : '////'), '/')[4])
-}
-
-module vm_microsoftMonitoringAgentExtension 'extension/main.bicep' = if (extensionMonitoringAgentConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-MicrosoftMonitoringAgent'
- params: {
- virtualMachineName: vm.name
- name: 'MicrosoftMonitoringAgent'
- publisher: 'Microsoft.EnterpriseCloud.Monitoring'
- type: osType == 'Windows' ? 'MicrosoftMonitoringAgent' : 'OmsAgentForLinux'
- typeHandlerVersion: contains(extensionMonitoringAgentConfig, 'typeHandlerVersion') ? extensionMonitoringAgentConfig.typeHandlerVersion : (osType == 'Windows' ? '1.0' : '1.7')
- autoUpgradeMinorVersion: contains(extensionMonitoringAgentConfig, 'autoUpgradeMinorVersion') ? extensionMonitoringAgentConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionMonitoringAgentConfig, 'enableAutomaticUpgrade') ? extensionMonitoringAgentConfig.enableAutomaticUpgrade : false
- settings: {
- workspaceId: !empty(monitoringWorkspaceId) ? vm_logAnalyticsWorkspace.properties.customerId : ''
- }
- tags: extensionMonitoringAgentConfig.?tags ?? tags
- protectedSettings: {
- workspaceKey: !empty(monitoringWorkspaceId) ? vm_logAnalyticsWorkspace.listKeys().primarySharedKey : ''
- }
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module vm_dependencyAgentExtension 'extension/main.bicep' = if (extensionDependencyAgentConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-DependencyAgent'
- params: {
- virtualMachineName: vm.name
- name: 'DependencyAgent'
- publisher: 'Microsoft.Azure.Monitoring.DependencyAgent'
- type: osType == 'Windows' ? 'DependencyAgentWindows' : 'DependencyAgentLinux'
- typeHandlerVersion: contains(extensionDependencyAgentConfig, 'typeHandlerVersion') ? extensionDependencyAgentConfig.typeHandlerVersion : '9.5'
- autoUpgradeMinorVersion: contains(extensionDependencyAgentConfig, 'autoUpgradeMinorVersion') ? extensionDependencyAgentConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionDependencyAgentConfig, 'enableAutomaticUpgrade') ? extensionDependencyAgentConfig.enableAutomaticUpgrade : true
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- tags: extensionDependencyAgentConfig.?tags ?? tags
- }
-}
-
-module vm_networkWatcherAgentExtension 'extension/main.bicep' = if (extensionNetworkWatcherAgentConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-NetworkWatcherAgent'
- params: {
- virtualMachineName: vm.name
- name: 'NetworkWatcherAgent'
- publisher: 'Microsoft.Azure.NetworkWatcher'
- type: osType == 'Windows' ? 'NetworkWatcherAgentWindows' : 'NetworkWatcherAgentLinux'
- typeHandlerVersion: contains(extensionNetworkWatcherAgentConfig, 'typeHandlerVersion') ? extensionNetworkWatcherAgentConfig.typeHandlerVersion : '1.4'
- autoUpgradeMinorVersion: contains(extensionNetworkWatcherAgentConfig, 'autoUpgradeMinorVersion') ? extensionNetworkWatcherAgentConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionNetworkWatcherAgentConfig, 'enableAutomaticUpgrade') ? extensionNetworkWatcherAgentConfig.enableAutomaticUpgrade : false
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- tags: extensionNetworkWatcherAgentConfig.?tags ?? tags
- }
-}
-
-module vm_desiredStateConfigurationExtension 'extension/main.bicep' = if (extensionDSCConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-DesiredStateConfiguration'
- params: {
- virtualMachineName: vm.name
- name: 'DesiredStateConfiguration'
- publisher: 'Microsoft.Powershell'
- type: 'DSC'
- typeHandlerVersion: contains(extensionDSCConfig, 'typeHandlerVersion') ? extensionDSCConfig.typeHandlerVersion : '2.77'
- autoUpgradeMinorVersion: contains(extensionDSCConfig, 'autoUpgradeMinorVersion') ? extensionDSCConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionDSCConfig, 'enableAutomaticUpgrade') ? extensionDSCConfig.enableAutomaticUpgrade : false
- settings: contains(extensionDSCConfig, 'settings') ? extensionDSCConfig.settings : {}
- tags: extensionDSCConfig.?tags ?? tags
- protectedSettings: contains(extensionDSCConfig, 'protectedSettings') ? extensionDSCConfig.protectedSettings : {}
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module vm_customScriptExtension 'extension/main.bicep' = if (extensionCustomScriptConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-CustomScriptExtension'
- params: {
- virtualMachineName: vm.name
- name: 'CustomScriptExtension'
- publisher: osType == 'Windows' ? 'Microsoft.Compute' : 'Microsoft.Azure.Extensions'
- type: osType == 'Windows' ? 'CustomScriptExtension' : 'CustomScript'
- typeHandlerVersion: contains(extensionCustomScriptConfig, 'typeHandlerVersion') ? extensionCustomScriptConfig.typeHandlerVersion : (osType == 'Windows' ? '1.10' : '2.1')
- autoUpgradeMinorVersion: contains(extensionCustomScriptConfig, 'autoUpgradeMinorVersion') ? extensionCustomScriptConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionCustomScriptConfig, 'enableAutomaticUpgrade') ? extensionCustomScriptConfig.enableAutomaticUpgrade : false
- settings: {
- fileUris: [for fileData in extensionCustomScriptConfig.fileData: contains(fileData, 'storageAccountId') ? '${fileData.uri}?${listAccountSas(fileData.storageAccountId, '2019-04-01', accountSasProperties).accountSasToken}' : fileData.uri]
- }
- tags: extensionCustomScriptConfig.?tags ?? tags
- protectedSettings: extensionCustomScriptProtectedSetting
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- vm_desiredStateConfigurationExtension
- ]
-}
-
-module vm_azureDiskEncryptionExtension 'extension/main.bicep' = if (extensionAzureDiskEncryptionConfig.enabled) {
- name: '${uniqueString(deployment().name, location)}-VM-AzureDiskEncryption'
- params: {
- virtualMachineName: vm.name
- name: 'AzureDiskEncryption'
- publisher: 'Microsoft.Azure.Security'
- type: osType == 'Windows' ? 'AzureDiskEncryption' : 'AzureDiskEncryptionForLinux'
- typeHandlerVersion: contains(extensionAzureDiskEncryptionConfig, 'typeHandlerVersion') ? extensionAzureDiskEncryptionConfig.typeHandlerVersion : (osType == 'Windows' ? '2.2' : '1.1')
- autoUpgradeMinorVersion: contains(extensionAzureDiskEncryptionConfig, 'autoUpgradeMinorVersion') ? extensionAzureDiskEncryptionConfig.autoUpgradeMinorVersion : true
- enableAutomaticUpgrade: contains(extensionAzureDiskEncryptionConfig, 'enableAutomaticUpgrade') ? extensionAzureDiskEncryptionConfig.enableAutomaticUpgrade : false
- forceUpdateTag: contains(extensionAzureDiskEncryptionConfig, 'forceUpdateTag') ? extensionAzureDiskEncryptionConfig.forceUpdateTag : '1.0'
- settings: extensionAzureDiskEncryptionConfig.settings
- tags: extensionAzureDiskEncryptionConfig.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- vm_customScriptExtension
- vm_microsoftMonitoringAgentExtension
- ]
-}
-
-module vm_backup '../../recovery-services/vault/backup-fabric/protection-container/protected-item/main.bicep' = if (!empty(backupVaultName)) {
- name: '${uniqueString(deployment().name, location)}-VM-Backup'
- params: {
- name: 'vm;iaasvmcontainerv2;${resourceGroup().name};${vm.name}'
- policyId: az.resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', backupVaultName, backupPolicyName)
- protectedItemType: 'Microsoft.Compute/virtualMachines'
- protectionContainerName: 'iaasvmcontainer;iaasvmcontainerv2;${resourceGroup().name};${vm.name}'
- recoveryVaultName: backupVaultName
- sourceResourceId: vm.id
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- scope: az.resourceGroup(backupVaultResourceGroup)
- dependsOn: [
- vm_aadJoinExtension
- vm_domainJoinExtension
- vm_microsoftMonitoringAgentExtension
- vm_microsoftAntiMalwareExtension
- vm_networkWatcherAgentExtension
- vm_dependencyAgentExtension
- vm_desiredStateConfigurationExtension
- vm_customScriptExtension
- ]
-}
-
-resource vm_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: vm
-}
-
-resource vm_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(vm.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: vm
-}]
-
-@description('The name of the VM.')
-output name string = vm.name
-
-@description('The resource ID of the VM.')
-output resourceId string = vm.id
-
-@description('The name of the resource group the VM was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(vm.identity, 'principalId') ? vm.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = vm.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/compute/virtual-machine/main.json b/modules/compute/virtual-machine/main.json
deleted file mode 100644
index cb696cbdcc..0000000000
--- a/modules/compute/virtual-machine/main.json
+++ /dev/null
@@ -1,4524 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "89939038941992549"
- },
- "name": "Virtual Machines",
- "description": "This module deploys a Virtual Machine with one or multiple NICs and optionally one or multiple public IPs.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[take(toLower(uniqueString(resourceGroup().name)), 10)]",
- "metadata": {
- "description": "Optional. The name of the virtual machine to be created. You should use a unique prefix to reduce name collisions in Active Directory. If no value is provided, a 10 character long unique string will be generated based on the Resource Group's name."
- }
- },
- "computerName": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. Can be used if the computer name needs to be different from the Azure VM resource name. If not used, the resource name will be used as computer name."
- }
- },
- "vmSize": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the size for the VMs."
- }
- },
- "encryptionAtHost": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs."
- }
- },
- "securityType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings."
- }
- },
- "secureBootEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings."
- }
- },
- "vTpmEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings."
- }
- },
- "imageReference": {
- "type": "object",
- "metadata": {
- "description": "Required. OS image reference. In case of marketplace images, it's the combination of the publisher, offer, sku, version attributes. In case of custom images it's the resource ID of the custom image."
- }
- },
- "plan": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use."
- }
- },
- "osDisk": {
- "type": "object",
- "metadata": {
- "description": "Required. Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs."
- }
- },
- "dataDisks": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs."
- }
- },
- "ultraSSDEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled."
- }
- },
- "adminUsername": {
- "type": "securestring",
- "metadata": {
- "description": "Required. Administrator username."
- }
- },
- "adminPassword": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. When specifying a Windows Virtual Machine, this value should be passed."
- }
- },
- "customData": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format."
- }
- },
- "certificatesToBeInstalled": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specifies set of certificates that should be installed onto the virtual machine."
- }
- },
- "priority": {
- "type": "string",
- "defaultValue": "Regular",
- "allowedValues": [
- "Regular",
- "Low",
- "Spot"
- ],
- "metadata": {
- "description": "Optional. Specifies the priority for the virtual machine."
- }
- },
- "enableEvictionPolicy": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy."
- }
- },
- "maxPriceForLowPriorityVm": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars."
- }
- },
- "dedicatedHostId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies resource ID about the dedicated host that the virtual machine resides in."
- }
- },
- "licenseType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Windows_Client",
- "Windows_Server",
- ""
- ],
- "metadata": {
- "description": "Optional. Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system."
- }
- },
- "publicKeys": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of SSH public keys used to authenticate with linux based VMs."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource. The system-assigned managed identity will automatically be enabled if extensionAadJoinConfig.enabled = \"True\"."
- }
- },
- "bootDiagnostics": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled."
- }
- },
- "bootDiagnosticStorageAccountName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Custom storage account used to store boot diagnostic information. Boot diagnostics will be enabled with a custom storage account if a value is provided."
- }
- },
- "bootDiagnosticStorageAccountUri": {
- "type": "string",
- "defaultValue": "[format('.blob.{0}/', environment().suffixes.storage)]",
- "metadata": {
- "description": "Optional. Storage account boot diagnostic base URI."
- }
- },
- "proximityPlacementGroupResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of a proximity placement group."
- }
- },
- "availabilitySetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of an availability set. Cannot be used in combination with availability zone nor scale set."
- }
- },
- "availabilityZone": {
- "type": "int",
- "defaultValue": 0,
- "allowedValues": [
- 0,
- 1,
- 2,
- 3
- ],
- "metadata": {
- "description": "Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set."
- }
- },
- "nicConfigurations": {
- "type": "array",
- "metadata": {
- "description": "Required. Configures NICs and PIPs."
- }
- },
- "backupVaultName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Recovery service vault name to add VMs to backup."
- }
- },
- "backupVaultResourceGroup": {
- "type": "string",
- "defaultValue": "[resourceGroup().name]",
- "metadata": {
- "description": "Optional. Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default."
- }
- },
- "backupPolicyName": {
- "type": "string",
- "defaultValue": "DefaultPolicy",
- "metadata": {
- "description": "Optional. Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault."
- }
- },
- "allowExtensionOperations": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine."
- }
- },
- "extensionDomainJoinPassword": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Required if name is specified. Password of the user specified in user parameter."
- }
- },
- "extensionDomainJoinConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Domain Join] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionAadJoinConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [AAD Join] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionAntiMalwareConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Anti Malware] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionMonitoringAgentConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Monitoring Agent] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "monitoringWorkspaceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true."
- }
- },
- "extensionDependencyAgentConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Dependency Agent] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionNetworkWatcherAgentConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Network Watcher Agent] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionAzureDiskEncryptionConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Azure Disk Encryption] extension. Must at least contain the [\"enabled\": true] property to be executed. Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys."
- }
- },
- "extensionDSCConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false
- },
- "metadata": {
- "description": "Optional. The configuration for the [Desired State Configuration] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionCustomScriptConfig": {
- "type": "object",
- "defaultValue": {
- "enabled": false,
- "fileData": []
- },
- "metadata": {
- "description": "Optional. The configuration for the [Custom Script] extension. Must at least contain the [\"enabled\": true] property to be executed."
- }
- },
- "extensionCustomScriptProtectedSetting": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Do not provide a value! This date value is used to generate a registration token."
- }
- },
- "sasTokenValidityLength": {
- "type": "string",
- "defaultValue": "PT8H",
- "metadata": {
- "description": "Optional. SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours."
- }
- },
- "osType": {
- "type": "string",
- "allowedValues": [
- "Windows",
- "Linux"
- ],
- "metadata": {
- "description": "Required. The chosen OS type."
- }
- },
- "disablePasswordAuthentication": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether password authentication should be disabled."
- }
- },
- "provisionVMAgent": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."
- }
- },
- "enableAutomaticUpdates": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. When patchMode is set to Manual, this parameter must be set to false. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning."
- }
- },
- "patchMode": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "AutomaticByPlatform",
- "AutomaticByOS",
- "Manual",
- "ImageDefault",
- ""
- ],
- "metadata": {
- "description": "Optional. VM guest patching orchestration mode. 'AutomaticByOS' & 'Manual' are for Windows only, 'ImageDefault' for Linux only. Refer to 'https://learn.microsoft.com/en-us/azure/virtual-machines/automatic-vm-guest-patching'."
- }
- },
- "patchAssessmentMode": {
- "type": "string",
- "defaultValue": "ImageDefault",
- "allowedValues": [
- "AutomaticByPlatform",
- "ImageDefault"
- ],
- "metadata": {
- "description": "Optional. VM guest patching assessment mode. Set it to 'AutomaticByPlatform' to enable automatically check for updates every 24 hours."
- }
- },
- "timeZone": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be `TimeZoneInfo.id` value from time zones returned by `TimeZoneInfo.GetSystemTimeZones`."
- }
- },
- "additionalUnattendContent": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. - AdditionalUnattendContent object."
- }
- },
- "winRM": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object."
- }
- },
- "configurationProfile": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction",
- "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest",
- ""
- ],
- "metadata": {
- "description": "Required. The configuration profile of automanage."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "publicKeysFormatted",
- "count": "[length(parameters('publicKeys'))]",
- "input": {
- "path": "[parameters('publicKeys')[copyIndex('publicKeysFormatted')].path]",
- "keyData": "[parameters('publicKeys')[copyIndex('publicKeysFormatted')].keyData]"
- }
- }
- ],
- "linuxConfiguration": {
- "disablePasswordAuthentication": "[parameters('disablePasswordAuthentication')]",
- "ssh": {
- "publicKeys": "[variables('publicKeysFormatted')]"
- },
- "provisionVMAgent": "[parameters('provisionVMAgent')]",
- "patchSettings": "[if(and(parameters('provisionVMAgent'), or(equals(toLower(parameters('patchMode')), toLower('AutomaticByPlatform')), equals(toLower(parameters('patchMode')), toLower('ImageDefault')))), createObject('patchMode', parameters('patchMode'), 'assessmentMode', parameters('patchAssessmentMode')), null())]"
- },
- "windowsConfiguration": {
- "provisionVMAgent": "[parameters('provisionVMAgent')]",
- "enableAutomaticUpdates": "[parameters('enableAutomaticUpdates')]",
- "patchSettings": "[if(and(parameters('provisionVMAgent'), or(or(equals(toLower(parameters('patchMode')), toLower('AutomaticByPlatform')), equals(toLower(parameters('patchMode')), toLower('AutomaticByOS'))), equals(toLower(parameters('patchMode')), toLower('Manual')))), createObject('patchMode', parameters('patchMode'), 'assessmentMode', parameters('patchAssessmentMode')), null())]",
- "timeZone": "[if(empty(parameters('timeZone')), null(), parameters('timeZone'))]",
- "additionalUnattendContent": "[if(empty(parameters('additionalUnattendContent')), null(), parameters('additionalUnattendContent'))]",
- "winRM": "[if(not(empty(parameters('winRM'))), createObject('listeners', parameters('winRM')), null())]"
- },
- "accountSasProperties": {
- "signedServices": "b",
- "signedPermission": "r",
- "signedExpiry": "[dateTimeAdd(parameters('baseTime'), parameters('sasTokenValidityLength'))]",
- "signedResourceTypes": "o",
- "signedProtocol": "https"
- },
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(if(parameters('extensionAadJoinConfig').enabled, true(), coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false())), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Data Operator for Managed Disks": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '959f8984-c045-4866-89c7-12bf9737be2e')]",
- "Desktop Virtualization Power On Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '489581de-a3bd-480d-9518-53dea7416b33')]",
- "Desktop Virtualization Power On Off Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')]",
- "Desktop Virtualization Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')]",
- "DevTest Labs User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64')]",
- "Disk Backup Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3e5e47e6-65f7-47ef-90b5-e5dd4d455f24')]",
- "Disk Pool Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '60fc6e62-5479-42d4-8bf4-67625fcc2840')]",
- "Disk Restore Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b50d9833-a0cb-478e-945f-707fcc997c13')]",
- "Disk Snapshot Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7efff54f-a5b4-42b5-a1c5-5411624893ce')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]",
- "Virtual Machine Administrator Login": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1c0163c0-47e6-4577-8991-ea5c82e286e4')]",
- "Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c')]",
- "Virtual Machine User Login": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fb879df8-f326-4884-b1cf-06f3ad86be52')]",
- "VM Scanner Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd24ecba3-c1f4-40fa-a7bb-4588a071e8fd')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "vm": {
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "tags": "[parameters('tags')]",
- "zones": "[if(not(equals(parameters('availabilityZone'), 0)), array(parameters('availabilityZone')), null())]",
- "plan": "[if(not(empty(parameters('plan'))), parameters('plan'), null())]",
- "properties": {
- "hardwareProfile": {
- "vmSize": "[parameters('vmSize')]"
- },
- "securityProfile": {
- "encryptionAtHost": "[if(parameters('encryptionAtHost'), parameters('encryptionAtHost'), null())]",
- "securityType": "[parameters('securityType')]",
- "uefiSettings": "[if(equals(parameters('securityType'), 'TrustedLaunch'), createObject('secureBootEnabled', parameters('secureBootEnabled'), 'vTpmEnabled', parameters('vTpmEnabled')), null())]"
- },
- "storageProfile": {
- "copy": [
- {
- "name": "dataDisks",
- "count": "[length(parameters('dataDisks'))]",
- "input": {
- "lun": "[copyIndex('dataDisks')]",
- "name": "[format('{0}-disk-data-{1}', parameters('name'), padLeft(add(copyIndex('dataDisks'), 1), 2, '0'))]",
- "diskSizeGB": "[parameters('dataDisks')[copyIndex('dataDisks')].diskSizeGB]",
- "createOption": "[if(contains(parameters('dataDisks')[copyIndex('dataDisks')], 'createOption'), parameters('dataDisks')[copyIndex('dataDisks')].createOption, 'Empty')]",
- "deleteOption": "[if(contains(parameters('dataDisks')[copyIndex('dataDisks')], 'deleteOption'), parameters('dataDisks')[copyIndex('dataDisks')].deleteOption, 'Delete')]",
- "caching": "[if(contains(parameters('dataDisks')[copyIndex('dataDisks')], 'caching'), parameters('dataDisks')[copyIndex('dataDisks')].caching, 'ReadOnly')]",
- "managedDisk": {
- "storageAccountType": "[parameters('dataDisks')[copyIndex('dataDisks')].managedDisk.storageAccountType]",
- "diskEncryptionSet": "[if(contains(parameters('dataDisks')[copyIndex('dataDisks')].managedDisk, 'diskEncryptionSet'), createObject('id', parameters('dataDisks')[copyIndex('dataDisks')].managedDisk.diskEncryptionSet.id), null())]"
- }
- }
- }
- ],
- "imageReference": "[parameters('imageReference')]",
- "osDisk": {
- "name": "[format('{0}-disk-os-01', parameters('name'))]",
- "createOption": "[if(contains(parameters('osDisk'), 'createOption'), parameters('osDisk').createOption, 'FromImage')]",
- "deleteOption": "[if(contains(parameters('osDisk'), 'deleteOption'), parameters('osDisk').deleteOption, 'Delete')]",
- "diskSizeGB": "[parameters('osDisk').diskSizeGB]",
- "caching": "[if(contains(parameters('osDisk'), 'caching'), parameters('osDisk').caching, 'ReadOnly')]",
- "managedDisk": {
- "storageAccountType": "[parameters('osDisk').managedDisk.storageAccountType]",
- "diskEncryptionSet": "[if(contains(parameters('osDisk').managedDisk, 'diskEncryptionSet'), createObject('id', parameters('osDisk').managedDisk.diskEncryptionSet.id), null())]"
- }
- }
- },
- "additionalCapabilities": {
- "ultraSSDEnabled": "[parameters('ultraSSDEnabled')]"
- },
- "osProfile": {
- "computerName": "[parameters('computerName')]",
- "adminUsername": "[parameters('adminUsername')]",
- "adminPassword": "[parameters('adminPassword')]",
- "customData": "[if(not(empty(parameters('customData'))), base64(parameters('customData')), null())]",
- "windowsConfiguration": "[if(equals(parameters('osType'), 'Windows'), variables('windowsConfiguration'), null())]",
- "linuxConfiguration": "[if(equals(parameters('osType'), 'Linux'), variables('linuxConfiguration'), null())]",
- "secrets": "[parameters('certificatesToBeInstalled')]",
- "allowExtensionOperations": "[parameters('allowExtensionOperations')]"
- },
- "networkProfile": {
- "copy": [
- {
- "name": "networkInterfaces",
- "count": "[length(parameters('nicConfigurations'))]",
- "input": {
- "properties": {
- "deleteOption": "[if(contains(parameters('nicConfigurations')[copyIndex('networkInterfaces')], 'deleteOption'), parameters('nicConfigurations')[copyIndex('networkInterfaces')].deleteOption, 'Delete')]",
- "primary": "[if(equals(copyIndex('networkInterfaces'), 0), true(), false())]"
- },
- "id": "[resourceId('Microsoft.Network/networkInterfaces', format('{0}{1}', parameters('name'), parameters('nicConfigurations')[copyIndex('networkInterfaces')].nicSuffix))]"
- }
- }
- ]
- },
- "diagnosticsProfile": {
- "bootDiagnostics": {
- "enabled": "[if(not(empty(parameters('bootDiagnosticStorageAccountName'))), true(), parameters('bootDiagnostics'))]",
- "storageUri": "[if(not(empty(parameters('bootDiagnosticStorageAccountName'))), format('https://{0}{1}', parameters('bootDiagnosticStorageAccountName'), parameters('bootDiagnosticStorageAccountUri')), null())]"
- }
- },
- "availabilitySet": "[if(not(empty(parameters('availabilitySetResourceId'))), createObject('id', parameters('availabilitySetResourceId')), null())]",
- "proximityPlacementGroup": "[if(not(empty(parameters('proximityPlacementGroupResourceId'))), createObject('id', parameters('proximityPlacementGroupResourceId')), null())]",
- "priority": "[parameters('priority')]",
- "evictionPolicy": "[if(parameters('enableEvictionPolicy'), 'Deallocate', null())]",
- "billingProfile": "[if(and(not(empty(parameters('priority'))), not(empty(parameters('maxPriceForLowPriorityVm')))), createObject('maxPrice', parameters('maxPriceForLowPriorityVm')), null())]",
- "host": "[if(not(empty(parameters('dedicatedHostId'))), createObject('id', parameters('dedicatedHostId')), null())]",
- "licenseType": "[if(not(empty(parameters('licenseType'))), parameters('licenseType'), null())]"
- },
- "dependsOn": [
- "vm_nic"
- ]
- },
- "vm_configurationProfileAssignment": {
- "condition": "[not(empty(parameters('configurationProfile')))]",
- "type": "Microsoft.Automanage/configurationProfileAssignments",
- "apiVersion": "2021-04-30-preview",
- "scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('name'))]",
- "name": "default",
- "properties": {
- "configurationProfile": "[parameters('configurationProfile')]"
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_logAnalyticsWorkspace": {
- "condition": "[not(empty(parameters('monitoringWorkspaceId')))]",
- "existing": true,
- "type": "Microsoft.OperationalInsights/workspaces",
- "apiVersion": "2021-06-01",
- "subscriptionId": "[split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '////'), '/')[4]]",
- "name": "[last(split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), 'law'), '/'))]"
- },
- "vm_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_roleAssignments": {
- "copy": {
- "name": "vm_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Compute/virtualMachines', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_nic": {
- "copy": {
- "name": "vm_nic",
- "count": "[length(parameters('nicConfigurations'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-Nic-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "networkInterfaceName": {
- "value": "[format('{0}{1}', parameters('name'), parameters('nicConfigurations')[copyIndex()].nicSuffix)]"
- },
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableIPForwarding": "[if(contains(parameters('nicConfigurations')[copyIndex()], 'enableIPForwarding'), if(not(empty(parameters('nicConfigurations')[copyIndex()].enableIPForwarding)), createObject('value', parameters('nicConfigurations')[copyIndex()].enableIPForwarding), createObject('value', false())), createObject('value', false()))]",
- "enableAcceleratedNetworking": "[if(contains(parameters('nicConfigurations')[copyIndex()], 'enableAcceleratedNetworking'), createObject('value', parameters('nicConfigurations')[copyIndex()].enableAcceleratedNetworking), createObject('value', true()))]",
- "dnsServers": "[if(contains(parameters('nicConfigurations')[copyIndex()], 'dnsServers'), if(not(empty(parameters('nicConfigurations')[copyIndex()].dnsServers)), createObject('value', parameters('nicConfigurations')[copyIndex()].dnsServers), createObject('value', createArray())), createObject('value', createArray()))]",
- "networkSecurityGroupResourceId": "[if(contains(parameters('nicConfigurations')[copyIndex()], 'networkSecurityGroupResourceId'), createObject('value', parameters('nicConfigurations')[copyIndex()].networkSecurityGroupResourceId), createObject('value', ''))]",
- "ipConfigurations": {
- "value": "[parameters('nicConfigurations')[copyIndex()].ipConfigurations]"
- },
- "lock": {
- "value": "[coalesce(tryGet(parameters('nicConfigurations')[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('nicConfigurations')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "diagnosticSettings": {
- "value": "[tryGet(parameters('nicConfigurations')[copyIndex()], 'diagnosticSettings')]"
- },
- "roleAssignments": {
- "value": "[tryGet(parameters('nicConfigurations')[copyIndex()], 'roleAssignments')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "11123708724712871468"
- }
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \u0007llLogs to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "networkInterfaceName": {
- "type": "string"
- },
- "virtualMachineName": {
- "type": "string"
- },
- "location": {
- "type": "string"
- },
- "tags": {
- "type": "object",
- "nullable": true
- },
- "enableIPForwarding": {
- "type": "bool",
- "defaultValue": false
- },
- "enableAcceleratedNetworking": {
- "type": "bool",
- "defaultValue": false
- },
- "dnsServers": {
- "type": "array",
- "defaultValue": []
- },
- "networkSecurityGroupResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The network security group (NSG) to attach to the network interface."
- }
- },
- "ipConfigurations": {
- "type": "array"
- },
- "lock": {
- "$ref": "#/definitions/lockType"
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the Network Interface."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "networkInterface_publicIPAddresses": {
- "copy": {
- "name": "networkInterface_publicIPAddresses",
- "count": "[length(parameters('ipConfigurations'))]"
- },
- "condition": "[contains(parameters('ipConfigurations')[copyIndex()], 'pipconfiguration')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-publicIP-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[format('{0}{1}', parameters('virtualMachineName'), parameters('ipConfigurations')[copyIndex()].pipconfiguration.publicIpNameSuffix)]"
- },
- "diagnosticSettings": {
- "value": "[tryGet(parameters('ipConfigurations')[copyIndex()], 'diagnosticSettings')]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "lock": {
- "value": "[parameters('lock')]"
- },
- "publicIPAddressVersion": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'publicIPAddressVersion'), createObject('value', parameters('ipConfigurations')[copyIndex()].publicIPAddressVersion), createObject('value', 'IPv4'))]",
- "publicIPAllocationMethod": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'publicIPAllocationMethod'), createObject('value', parameters('ipConfigurations')[copyIndex()].publicIPAllocationMethod), createObject('value', 'Static'))]",
- "publicIPPrefixResourceId": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'publicIPPrefixResourceId'), createObject('value', parameters('ipConfigurations')[copyIndex()].publicIPPrefixResourceId), createObject('value', ''))]",
- "roleAssignments": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'roleAssignments'), createObject('value', parameters('ipConfigurations')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "skuName": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'skuName'), createObject('value', parameters('ipConfigurations')[copyIndex()].skuName), createObject('value', 'Standard'))]",
- "skuTier": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'skuTier'), createObject('value', parameters('ipConfigurations')[copyIndex()].skuTier), createObject('value', 'Regional'))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('ipConfigurations')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "zones": "[if(contains(parameters('ipConfigurations')[copyIndex()], 'zones'), createObject('value', parameters('ipConfigurations')[copyIndex()].zones), createObject('value', createArray()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15536304828480480757"
- },
- "name": "Public IP Addresses",
- "description": "This module deploys a Public IP Address.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Public IP Address."
- }
- },
- "publicIPPrefixResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the Public IP Prefix object. This is only needed if you want your Public IPs created in a PIP Prefix."
- }
- },
- "publicIPAllocationMethod": {
- "type": "string",
- "defaultValue": "Static",
- "allowedValues": [
- "Dynamic",
- "Static"
- ],
- "metadata": {
- "description": "Optional. The public IP address allocation method."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Basic",
- "Standard"
- ],
- "metadata": {
- "description": "Optional. Name of a public IP address SKU."
- }
- },
- "skuTier": {
- "type": "string",
- "defaultValue": "Regional",
- "allowedValues": [
- "Global",
- "Regional"
- ],
- "metadata": {
- "description": "Optional. Tier of a public IP address SKU."
- }
- },
- "zones": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of availability zones denoting the IP allocated for the resource needs to come from."
- }
- },
- "publicIPAddressVersion": {
- "type": "string",
- "defaultValue": "IPv4",
- "allowedValues": [
- "IPv4",
- "IPv6"
- ],
- "metadata": {
- "description": "Optional. IP address version."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "domainNameLabel": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system."
- }
- },
- "domainNameLabelScope": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "NoReuse",
- "ResourceGroupReuse",
- "SubscriptionReuse",
- "TenantReuse"
- ],
- "metadata": {
- "description": "Optional. The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN."
- }
- },
- "fqdn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone."
- }
- },
- "reverseFqdn": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "publicIpAddress": {
- "type": "Microsoft.Network/publicIPAddresses",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('skuName')]",
- "tier": "[parameters('skuTier')]"
- },
- "zones": "[parameters('zones')]",
- "properties": {
- "dnsSettings": "[if(not(empty(parameters('domainNameLabel'))), createObject('domainNameLabel', parameters('domainNameLabel'), 'domainNameLabelScope', parameters('domainNameLabelScope'), 'fqdn', parameters('fqdn'), 'reverseFqdn', parameters('reverseFqdn')), null())]",
- "publicIPAddressVersion": "[parameters('publicIPAddressVersion')]",
- "publicIPAllocationMethod": "[parameters('publicIPAllocationMethod')]",
- "publicIPPrefix": "[if(not(empty(parameters('publicIPPrefixResourceId'))), createObject('id', parameters('publicIPPrefixResourceId')), null())]",
- "idleTimeoutInMinutes": 4,
- "ipTags": []
- }
- },
- "publicIpAddress_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/publicIPAddresses/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "publicIpAddress"
- ]
- },
- "publicIpAddress_diagnosticSettings": {
- "copy": {
- "name": "publicIpAddress_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Network/publicIPAddresses/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "publicIpAddress"
- ]
- },
- "publicIpAddress_roleAssignments": {
- "copy": {
- "name": "publicIpAddress_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(resourceId('Microsoft.Network/publicIPAddresses', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "publicIpAddress"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the public IP address was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the public IP address."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the public IP address."
- },
- "value": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('name'))]"
- },
- "ipAddress": {
- "type": "string",
- "metadata": {
- "description": "The public IP address of the public IP address resource."
- },
- "value": "[if(contains(reference('publicIpAddress'), 'ipAddress'), reference('publicIpAddress').ipAddress, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('publicIpAddress', '2023-04-01', 'full').location]"
- }
- }
- }
- }
- },
- "networkInterface": {
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-NetworkInterface', deployment().name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('networkInterfaceName')]"
- },
- "ipConfigurations": {
- "copy": [
- {
- "name": "value",
- "count": "[length(parameters('ipConfigurations'))]",
- "input": "[createObject('name', if(not(empty(parameters('ipConfigurations')[copyIndex('value')].name)), parameters('ipConfigurations')[copyIndex('value')].name, null()), 'primary', equals(copyIndex('value'), 0), 'privateIPAllocationMethod', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'privateIPAllocationMethod'), if(not(empty(parameters('ipConfigurations')[copyIndex('value')].privateIPAllocationMethod)), parameters('ipConfigurations')[copyIndex('value')].privateIPAllocationMethod, null()), null()), 'privateIPAddress', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'privateIPAddress'), if(not(empty(parameters('ipConfigurations')[copyIndex('value')].privateIPAddress)), parameters('ipConfigurations')[copyIndex('value')].privateIPAddress, null()), null()), 'publicIPAddressResourceId', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'pipconfiguration'), resourceId('Microsoft.Network/publicIPAddresses', format('{0}{1}', parameters('virtualMachineName'), parameters('ipConfigurations')[copyIndex('value')].pipconfiguration.publicIpNameSuffix)), null()), 'subnetResourceId', parameters('ipConfigurations')[copyIndex('value')].subnetResourceId, 'loadBalancerBackendAddressPools', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'loadBalancerBackendAddressPools'), parameters('ipConfigurations')[copyIndex('value')].loadBalancerBackendAddressPools, null()), 'applicationSecurityGroups', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'applicationSecurityGroups'), parameters('ipConfigurations')[copyIndex('value')].applicationSecurityGroups, null()), 'applicationGatewayBackendAddressPools', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'applicationGatewayBackendAddressPools'), parameters('ipConfigurations')[copyIndex('value')].applicationGatewayBackendAddressPools, null()), 'gatewayLoadBalancer', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'gatewayLoadBalancer'), parameters('ipConfigurations')[copyIndex('value')].gatewayLoadBalancer, null()), 'loadBalancerInboundNatRules', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'loadBalancerInboundNatRules'), parameters('ipConfigurations')[copyIndex('value')].loadBalancerInboundNatRules, null()), 'privateIPAddressVersion', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'privateIPAddressVersion'), parameters('ipConfigurations')[copyIndex('value')].privateIPAddressVersion, null()), 'virtualNetworkTaps', if(contains(parameters('ipConfigurations')[copyIndex('value')], 'virtualNetworkTaps'), parameters('ipConfigurations')[copyIndex('value')].virtualNetworkTaps, null()))]"
- }
- ]
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "tags": {
- "value": "[parameters('tags')]"
- },
- "diagnosticSettings": {
- "value": "[parameters('diagnosticSettings')]"
- },
- "dnsServers": "[if(not(empty(parameters('dnsServers'))), createObject('value', parameters('dnsServers')), createObject('value', createArray()))]",
- "enableAcceleratedNetworking": {
- "value": "[parameters('enableAcceleratedNetworking')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "enableIPForwarding": {
- "value": "[parameters('enableIPForwarding')]"
- },
- "lock": {
- "value": "[parameters('lock')]"
- },
- "networkSecurityGroupResourceId": "[if(not(empty(parameters('networkSecurityGroupResourceId'))), createObject('value', parameters('networkSecurityGroupResourceId')), createObject('value', ''))]",
- "roleAssignments": "[if(not(empty(parameters('roleAssignments'))), createObject('value', parameters('roleAssignments')), createObject('value', createArray()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "2750011165297287068"
- },
- "name": "Network Interface",
- "description": "This module deploys a Network Interface.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the network interface."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "enableIPForwarding": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether IP forwarding is enabled on this network interface."
- }
- },
- "enableAcceleratedNetworking": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If the network interface is accelerated networking enabled."
- }
- },
- "dnsServers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection."
- }
- },
- "networkSecurityGroupResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The network security group (NSG) to attach to the network interface."
- }
- },
- "auxiliaryMode": {
- "type": "string",
- "defaultValue": "None",
- "allowedValues": [
- "Floating",
- "MaxConnections",
- "None"
- ],
- "metadata": {
- "description": "Optional. Auxiliary mode of Network Interface resource. Not all regions are enabled for Auxiliary Mode Nic."
- }
- },
- "auxiliarySku": {
- "type": "string",
- "defaultValue": "None",
- "allowedValues": [
- "A1",
- "A2",
- "A4",
- "A8",
- "None"
- ],
- "metadata": {
- "description": "Optional. Auxiliary sku of Network Interface resource. Not all regions are enabled for Auxiliary Mode Nic."
- }
- },
- "disableTcpStateTracking": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether to disable tcp state tracking. Subscription must be registered for the Microsoft.Network/AllowDisableTcpStateTracking feature before this property can be set to true."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "metadata": {
- "description": "Required. A list of IPConfigurations of the network interface."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "networkInterface": {
- "type": "Microsoft.Network/networkInterfaces",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "ipConfigurations",
- "count": "[length(parameters('ipConfigurations'))]",
- "input": {
- "name": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'name'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].name, format('ipconfig0{0}', add(copyIndex('ipConfigurations'), 1)))]",
- "properties": {
- "primary": "[if(equals(copyIndex('ipConfigurations'), 0), true(), false())]",
- "privateIPAllocationMethod": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'privateIPAllocationMethod'), if(not(empty(parameters('ipConfigurations')[copyIndex('ipConfigurations')].privateIPAllocationMethod)), parameters('ipConfigurations')[copyIndex('ipConfigurations')].privateIPAllocationMethod, null()), null())]",
- "privateIPAddress": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'privateIPAddress'), if(not(empty(parameters('ipConfigurations')[copyIndex('ipConfigurations')].privateIPAddress)), parameters('ipConfigurations')[copyIndex('ipConfigurations')].privateIPAddress, null()), null())]",
- "publicIPAddress": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'publicIPAddressResourceId'), if(not(equals(parameters('ipConfigurations')[copyIndex('ipConfigurations')].publicIPAddressResourceId, null())), createObject('id', parameters('ipConfigurations')[copyIndex('ipConfigurations')].publicIPAddressResourceId), null()), null())]",
- "subnet": {
- "id": "[parameters('ipConfigurations')[copyIndex('ipConfigurations')].subnetResourceId]"
- },
- "loadBalancerBackendAddressPools": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'loadBalancerBackendAddressPools'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].loadBalancerBackendAddressPools, null())]",
- "applicationSecurityGroups": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'applicationSecurityGroups'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].applicationSecurityGroups, null())]",
- "applicationGatewayBackendAddressPools": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'applicationGatewayBackendAddressPools'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].applicationGatewayBackendAddressPools, null())]",
- "gatewayLoadBalancer": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'gatewayLoadBalancer'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].gatewayLoadBalancer, null())]",
- "loadBalancerInboundNatRules": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'loadBalancerInboundNatRules'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].loadBalancerInboundNatRules, null())]",
- "privateIPAddressVersion": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'privateIPAddressVersion'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].privateIPAddressVersion, null())]",
- "virtualNetworkTaps": "[if(contains(parameters('ipConfigurations')[copyIndex('ipConfigurations')], 'virtualNetworkTaps'), parameters('ipConfigurations')[copyIndex('ipConfigurations')].virtualNetworkTaps, null())]"
- }
- }
- }
- ],
- "auxiliaryMode": "[parameters('auxiliaryMode')]",
- "auxiliarySku": "[parameters('auxiliarySku')]",
- "disableTcpStateTracking": "[parameters('disableTcpStateTracking')]",
- "dnsSettings": "[if(not(empty(parameters('dnsServers'))), createObject('dnsServers', parameters('dnsServers')), null())]",
- "enableAcceleratedNetworking": "[parameters('enableAcceleratedNetworking')]",
- "enableIPForwarding": "[parameters('enableIPForwarding')]",
- "networkSecurityGroup": "[if(not(empty(parameters('networkSecurityGroupResourceId'))), createObject('id', parameters('networkSecurityGroupResourceId')), null())]"
- }
- },
- "networkInterface_diagnosticSettings": {
- "copy": {
- "name": "networkInterface_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Network/networkInterfaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "networkInterface"
- ]
- },
- "networkInterface_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/networkInterfaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "networkInterface"
- ]
- },
- "networkInterface_roleAssignments": {
- "copy": {
- "name": "networkInterface_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "name": "[guid(resourceId('Microsoft.Network/networkInterfaces', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "networkInterface"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed resource."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed resource."
- },
- "value": "[resourceId('Microsoft.Network/networkInterfaces', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed resource."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('networkInterface', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "networkInterface_publicIPAddresses"
- ]
- }
- }
- }
- }
- },
- "vm_aadJoinExtension": {
- "condition": "[parameters('extensionAadJoinConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-AADLogin', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "AADLogin"
- },
- "publisher": {
- "value": "Microsoft.Azure.ActiveDirectory"
- },
- "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'AADLoginForWindows'), createObject('value', 'AADSSHLoginforLinux'))]",
- "typeHandlerVersion": "[if(contains(parameters('extensionAadJoinConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionAadJoinConfig').typeHandlerVersion), createObject('value', '1.0'))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionAadJoinConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionAadJoinConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionAadJoinConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionAadJoinConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "settings": "[if(contains(parameters('extensionAadJoinConfig'), 'settings'), createObject('value', parameters('extensionAadJoinConfig').settings), createObject('value', createObject()))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionAadJoinConfig'), 'tags'), parameters('tags'))]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_domainJoinExtension": {
- "condition": "[parameters('extensionDomainJoinConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-DomainJoin', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "DomainJoin"
- },
- "publisher": {
- "value": "Microsoft.Compute"
- },
- "type": {
- "value": "JsonADDomainExtension"
- },
- "typeHandlerVersion": "[if(contains(parameters('extensionDomainJoinConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionDomainJoinConfig').typeHandlerVersion), createObject('value', '1.3'))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionDomainJoinConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionDomainJoinConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionDomainJoinConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionDomainJoinConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "settings": {
- "value": "[parameters('extensionDomainJoinConfig').settings]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionDomainJoinConfig'), 'tags'), parameters('tags'))]"
- },
- "protectedSettings": {
- "value": {
- "Password": "[parameters('extensionDomainJoinPassword')]"
- }
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_microsoftAntiMalwareExtension": {
- "condition": "[parameters('extensionAntiMalwareConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-MicrosoftAntiMalware', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "MicrosoftAntiMalware"
- },
- "publisher": {
- "value": "Microsoft.Azure.Security"
- },
- "type": {
- "value": "IaaSAntimalware"
- },
- "typeHandlerVersion": "[if(contains(parameters('extensionAntiMalwareConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionAntiMalwareConfig').typeHandlerVersion), createObject('value', '1.3'))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionAntiMalwareConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionAntiMalwareConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionAntiMalwareConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionAntiMalwareConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "settings": {
- "value": "[parameters('extensionAntiMalwareConfig').settings]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionAntiMalwareConfig'), 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_microsoftMonitoringAgentExtension": {
- "condition": "[parameters('extensionMonitoringAgentConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-MicrosoftMonitoringAgent', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "MicrosoftMonitoringAgent"
- },
- "publisher": {
- "value": "Microsoft.EnterpriseCloud.Monitoring"
- },
- "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'MicrosoftMonitoringAgent'), createObject('value', 'OmsAgentForLinux'))]",
- "typeHandlerVersion": "[if(contains(parameters('extensionMonitoringAgentConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionMonitoringAgentConfig').typeHandlerVersion), if(equals(parameters('osType'), 'Windows'), createObject('value', '1.0'), createObject('value', '1.7')))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionMonitoringAgentConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionMonitoringAgentConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionMonitoringAgentConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionMonitoringAgentConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "settings": {
- "value": {
- "workspaceId": "[if(not(empty(parameters('monitoringWorkspaceId'))), reference('vm_logAnalyticsWorkspace').customerId, '')]"
- }
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionMonitoringAgentConfig'), 'tags'), parameters('tags'))]"
- },
- "protectedSettings": {
- "value": {
- "workspaceKey": "[if(not(empty(parameters('monitoringWorkspaceId'))), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '//'), '/')[2], split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), '////'), '/')[4]), 'Microsoft.OperationalInsights/workspaces', last(split(if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), 'law'), '/'))), '2021-06-01').primarySharedKey, '')]"
- }
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm",
- "vm_logAnalyticsWorkspace"
- ]
- },
- "vm_dependencyAgentExtension": {
- "condition": "[parameters('extensionDependencyAgentConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-DependencyAgent', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "DependencyAgent"
- },
- "publisher": {
- "value": "Microsoft.Azure.Monitoring.DependencyAgent"
- },
- "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'DependencyAgentWindows'), createObject('value', 'DependencyAgentLinux'))]",
- "typeHandlerVersion": "[if(contains(parameters('extensionDependencyAgentConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionDependencyAgentConfig').typeHandlerVersion), createObject('value', '9.5'))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionDependencyAgentConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionDependencyAgentConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionDependencyAgentConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionDependencyAgentConfig').enableAutomaticUpgrade), createObject('value', true()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionDependencyAgentConfig'), 'tags'), parameters('tags'))]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_networkWatcherAgentExtension": {
- "condition": "[parameters('extensionNetworkWatcherAgentConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-NetworkWatcherAgent', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "NetworkWatcherAgent"
- },
- "publisher": {
- "value": "Microsoft.Azure.NetworkWatcher"
- },
- "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'NetworkWatcherAgentWindows'), createObject('value', 'NetworkWatcherAgentLinux'))]",
- "typeHandlerVersion": "[if(contains(parameters('extensionNetworkWatcherAgentConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionNetworkWatcherAgentConfig').typeHandlerVersion), createObject('value', '1.4'))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionNetworkWatcherAgentConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionNetworkWatcherAgentConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionNetworkWatcherAgentConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionNetworkWatcherAgentConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionNetworkWatcherAgentConfig'), 'tags'), parameters('tags'))]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_desiredStateConfigurationExtension": {
- "condition": "[parameters('extensionDSCConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-DesiredStateConfiguration', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "DesiredStateConfiguration"
- },
- "publisher": {
- "value": "Microsoft.Powershell"
- },
- "type": {
- "value": "DSC"
- },
- "typeHandlerVersion": "[if(contains(parameters('extensionDSCConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionDSCConfig').typeHandlerVersion), createObject('value', '2.77'))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionDSCConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionDSCConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionDSCConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionDSCConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "settings": "[if(contains(parameters('extensionDSCConfig'), 'settings'), createObject('value', parameters('extensionDSCConfig').settings), createObject('value', createObject()))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionDSCConfig'), 'tags'), parameters('tags'))]"
- },
- "protectedSettings": "[if(contains(parameters('extensionDSCConfig'), 'protectedSettings'), createObject('value', parameters('extensionDSCConfig').protectedSettings), createObject('value', createObject()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm"
- ]
- },
- "vm_customScriptExtension": {
- "condition": "[parameters('extensionCustomScriptConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-CustomScriptExtension', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "CustomScriptExtension"
- },
- "publisher": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'Microsoft.Compute'), createObject('value', 'Microsoft.Azure.Extensions'))]",
- "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'CustomScriptExtension'), createObject('value', 'CustomScript'))]",
- "typeHandlerVersion": "[if(contains(parameters('extensionCustomScriptConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionCustomScriptConfig').typeHandlerVersion), if(equals(parameters('osType'), 'Windows'), createObject('value', '1.10'), createObject('value', '2.1')))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionCustomScriptConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionCustomScriptConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionCustomScriptConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionCustomScriptConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "settings": {
- "value": {
- "copy": [
- {
- "name": "fileUris",
- "count": "[length(parameters('extensionCustomScriptConfig').fileData)]",
- "input": "[if(contains(parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')], 'storageAccountId'), format('{0}?{1}', parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')].uri, listAccountSas(parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')].storageAccountId, '2019-04-01', variables('accountSasProperties')).accountSasToken), parameters('extensionCustomScriptConfig').fileData[copyIndex('fileUris')].uri)]"
- }
- ]
- }
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionCustomScriptConfig'), 'tags'), parameters('tags'))]"
- },
- "protectedSettings": {
- "value": "[parameters('extensionCustomScriptProtectedSetting')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm",
- "vm_desiredStateConfigurationExtension"
- ]
- },
- "vm_azureDiskEncryptionExtension": {
- "condition": "[parameters('extensionAzureDiskEncryptionConfig').enabled]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-AzureDiskEncryption', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "virtualMachineName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "AzureDiskEncryption"
- },
- "publisher": {
- "value": "Microsoft.Azure.Security"
- },
- "type": "[if(equals(parameters('osType'), 'Windows'), createObject('value', 'AzureDiskEncryption'), createObject('value', 'AzureDiskEncryptionForLinux'))]",
- "typeHandlerVersion": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'typeHandlerVersion'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').typeHandlerVersion), if(equals(parameters('osType'), 'Windows'), createObject('value', '2.2'), createObject('value', '1.1')))]",
- "autoUpgradeMinorVersion": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'autoUpgradeMinorVersion'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').autoUpgradeMinorVersion), createObject('value', true()))]",
- "enableAutomaticUpgrade": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'enableAutomaticUpgrade'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').enableAutomaticUpgrade), createObject('value', false()))]",
- "forceUpdateTag": "[if(contains(parameters('extensionAzureDiskEncryptionConfig'), 'forceUpdateTag'), createObject('value', parameters('extensionAzureDiskEncryptionConfig').forceUpdateTag), createObject('value', '1.0'))]",
- "settings": {
- "value": "[parameters('extensionAzureDiskEncryptionConfig').settings]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('extensionAzureDiskEncryptionConfig'), 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5421737065579119324"
- },
- "name": "Virtual Machine Extensions",
- "description": "This module deploys a Virtual Machine Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "virtualMachineName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent virtual machine that extension is provisioned for. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual machine extension."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. The location the extension is deployed to."
- }
- },
- "publisher": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the extension handler publisher."
- }
- },
- "type": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the type of the extension; an example is \"CustomScriptExtension\"."
- }
- },
- "typeHandlerVersion": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the version of the script handler."
- }
- },
- "autoUpgradeMinorVersion": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
- }
- },
- "forceUpdateTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How the extension handler should be forced to update even if the extension configuration has not changed."
- }
- },
- "settings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific settings."
- }
- },
- "protectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Any object that contains the extension specific protected settings."
- }
- },
- "supressFailures": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
- }
- },
- "enableAutomaticUpgrade": {
- "type": "bool",
- "metadata": {
- "description": "Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "virtualMachine": {
- "existing": true,
- "type": "Microsoft.Compute/virtualMachines",
- "apiVersion": "2022-11-01",
- "name": "[parameters('virtualMachineName')]"
- },
- "extension": {
- "type": "Microsoft.Compute/virtualMachines/extensions",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('virtualMachineName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publisher": "[parameters('publisher')]",
- "type": "[parameters('type')]",
- "typeHandlerVersion": "[parameters('typeHandlerVersion')]",
- "autoUpgradeMinorVersion": "[parameters('autoUpgradeMinorVersion')]",
- "enableAutomaticUpgrade": "[parameters('enableAutomaticUpgrade')]",
- "forceUpdateTag": "[if(not(empty(parameters('forceUpdateTag'))), parameters('forceUpdateTag'), null())]",
- "settings": "[if(not(empty(parameters('settings'))), parameters('settings'), null())]",
- "protectedSettings": "[if(not(empty(parameters('protectedSettings'))), parameters('protectedSettings'), null())]",
- "suppressFailures": "[parameters('supressFailures')]"
- },
- "dependsOn": [
- "virtualMachine"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines/extensions', parameters('virtualMachineName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the extension was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('extension', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "vm",
- "vm_customScriptExtension",
- "vm_microsoftMonitoringAgentExtension"
- ]
- },
- "vm_backup": {
- "condition": "[not(empty(parameters('backupVaultName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-VM-Backup', uniqueString(deployment().name, parameters('location')))]",
- "resourceGroup": "[parameters('backupVaultResourceGroup')]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[format('vm;iaasvmcontainerv2;{0};{1}', resourceGroup().name, parameters('name'))]"
- },
- "policyId": {
- "value": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', parameters('backupVaultName'), parameters('backupPolicyName'))]"
- },
- "protectedItemType": {
- "value": "Microsoft.Compute/virtualMachines"
- },
- "protectionContainerName": {
- "value": "[format('iaasvmcontainer;iaasvmcontainerv2;{0};{1}', resourceGroup().name, parameters('name'))]"
- },
- "recoveryVaultName": {
- "value": "[parameters('backupVaultName')]"
- },
- "sourceResourceId": {
- "value": "[resourceId('Microsoft.Compute/virtualMachines', parameters('name'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "9921011786088905122"
- },
- "name": "Recovery Service Vaults Protection Container Protected Item",
- "description": "This module deploys a Recovery Services Vault Protection Container Protected Item.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the resource."
- }
- },
- "protectionContainerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. Name of the Azure Recovery Service Vault Protection Container. Required if the template is used in a standalone deployment."
- }
- },
- "recoveryVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Azure Recovery Service Vault. Required if the template is used in a standalone deployment."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "protectedItemType": {
- "type": "string",
- "allowedValues": [
- "AzureFileShareProtectedItem",
- "AzureVmWorkloadSAPAseDatabase",
- "AzureVmWorkloadSAPHanaDatabase",
- "AzureVmWorkloadSQLDatabase",
- "DPMProtectedItem",
- "GenericProtectedItem",
- "MabFileFolderProtectedItem",
- "Microsoft.ClassicCompute/virtualMachines",
- "Microsoft.Compute/virtualMachines",
- "Microsoft.Sql/servers/databases"
- ],
- "metadata": {
- "description": "Required. The backup item type."
- }
- },
- "policyId": {
- "type": "string",
- "metadata": {
- "description": "Required. ID of the backup policy with which this item is backed up."
- }
- },
- "sourceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource to back up."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems",
- "apiVersion": "2023-01-01",
- "name": "[format('{0}/Azure/{1}/{2}', parameters('recoveryVaultName'), parameters('protectionContainerName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "properties": {
- "protectedItemType": "[parameters('protectedItemType')]",
- "policyId": "[parameters('policyId')]",
- "sourceResourceId": "[parameters('sourceResourceId')]"
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the protected item was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the protected item."
- },
- "value": "[resourceId('Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems', split(format('{0}/Azure/{1}/{2}', parameters('recoveryVaultName'), parameters('protectionContainerName'), parameters('name')), '/')[0], split(format('{0}/Azure/{1}/{2}', parameters('recoveryVaultName'), parameters('protectionContainerName'), parameters('name')), '/')[1], split(format('{0}/Azure/{1}/{2}', parameters('recoveryVaultName'), parameters('protectionContainerName'), parameters('name')), '/')[2], split(format('{0}/Azure/{1}/{2}', parameters('recoveryVaultName'), parameters('protectionContainerName'), parameters('name')), '/')[3])]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the protected item."
- },
- "value": "[format('{0}/Azure/{1}/{2}', parameters('recoveryVaultName'), parameters('protectionContainerName'), parameters('name'))]"
- }
- }
- }
- },
- "dependsOn": [
- "vm",
- "vm_aadJoinExtension",
- "vm_customScriptExtension",
- "vm_dependencyAgentExtension",
- "vm_desiredStateConfigurationExtension",
- "vm_domainJoinExtension",
- "vm_microsoftAntiMalwareExtension",
- "vm_microsoftMonitoringAgentExtension",
- "vm_networkWatcherAgentExtension"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the VM."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the VM."
- },
- "value": "[resourceId('Microsoft.Compute/virtualMachines', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the VM was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('vm', '2022-11-01', 'full').identity, 'principalId')), reference('vm', '2022-11-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('vm', '2022-11-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/compute/virtual-machine/modules/nested_networkInterface.bicep b/modules/compute/virtual-machine/modules/nested_networkInterface.bicep
deleted file mode 100644
index a7e44aaf79..0000000000
--- a/modules/compute/virtual-machine/modules/nested_networkInterface.bicep
+++ /dev/null
@@ -1,147 +0,0 @@
-param networkInterfaceName string
-param virtualMachineName string
-param location string
-param tags object?
-param enableIPForwarding bool = false
-param enableAcceleratedNetworking bool = false
-param dnsServers array = []
-
-@description('Optional. The network security group (NSG) to attach to the network interface.')
-param networkSecurityGroupResourceId string = ''
-
-param ipConfigurations array
-param lock lockType
-
-@description('Optional. The diagnostic settings of the Network Interface.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-var enableReferencedModulesTelemetry = false
-
-module networkInterface_publicIPAddresses '../../../network/public-ip-address/main.bicep' = [for (ipConfiguration, index) in ipConfigurations: if (contains(ipConfiguration, 'pipconfiguration')) {
- name: '${deployment().name}-publicIP-${index}'
- params: {
- name: '${virtualMachineName}${ipConfiguration.pipconfiguration.publicIpNameSuffix}'
- diagnosticSettings: ipConfiguration.?diagnosticSettings
- location: location
- lock: lock
- publicIPAddressVersion: contains(ipConfiguration, 'publicIPAddressVersion') ? ipConfiguration.publicIPAddressVersion : 'IPv4'
- publicIPAllocationMethod: contains(ipConfiguration, 'publicIPAllocationMethod') ? ipConfiguration.publicIPAllocationMethod : 'Static'
- publicIPPrefixResourceId: contains(ipConfiguration, 'publicIPPrefixResourceId') ? ipConfiguration.publicIPPrefixResourceId : ''
- roleAssignments: contains(ipConfiguration, 'roleAssignments') ? ipConfiguration.roleAssignments : []
- skuName: contains(ipConfiguration, 'skuName') ? ipConfiguration.skuName : 'Standard'
- skuTier: contains(ipConfiguration, 'skuTier') ? ipConfiguration.skuTier : 'Regional'
- tags: ipConfiguration.?tags ?? tags
- zones: contains(ipConfiguration, 'zones') ? ipConfiguration.zones : []
- }
-}]
-
-module networkInterface '../../../network/network-interface/main.bicep' = {
- name: '${deployment().name}-NetworkInterface'
- params: {
- name: networkInterfaceName
- ipConfigurations: [for (ipConfiguration, index) in ipConfigurations: {
- name: !empty(ipConfiguration.name) ? ipConfiguration.name : null
- primary: index == 0
- privateIPAllocationMethod: contains(ipConfiguration, 'privateIPAllocationMethod') ? (!empty(ipConfiguration.privateIPAllocationMethod) ? ipConfiguration.privateIPAllocationMethod : null) : null
- privateIPAddress: contains(ipConfiguration, 'privateIPAddress') ? (!empty(ipConfiguration.privateIPAddress) ? ipConfiguration.privateIPAddress : null) : null
- publicIPAddressResourceId: contains(ipConfiguration, 'pipconfiguration') ? resourceId('Microsoft.Network/publicIPAddresses', '${virtualMachineName}${ipConfiguration.pipconfiguration.publicIpNameSuffix}') : null
- subnetResourceId: ipConfiguration.subnetResourceId
- loadBalancerBackendAddressPools: contains(ipConfiguration, 'loadBalancerBackendAddressPools') ? ipConfiguration.loadBalancerBackendAddressPools : null
- applicationSecurityGroups: contains(ipConfiguration, 'applicationSecurityGroups') ? ipConfiguration.applicationSecurityGroups : null
- applicationGatewayBackendAddressPools: contains(ipConfiguration, 'applicationGatewayBackendAddressPools') ? ipConfiguration.applicationGatewayBackendAddressPools : null
- gatewayLoadBalancer: contains(ipConfiguration, 'gatewayLoadBalancer') ? ipConfiguration.gatewayLoadBalancer : null
- loadBalancerInboundNatRules: contains(ipConfiguration, 'loadBalancerInboundNatRules') ? ipConfiguration.loadBalancerInboundNatRules : null
- privateIPAddressVersion: contains(ipConfiguration, 'privateIPAddressVersion') ? ipConfiguration.privateIPAddressVersion : null
- virtualNetworkTaps: contains(ipConfiguration, 'virtualNetworkTaps') ? ipConfiguration.virtualNetworkTaps : null
- }]
- location: location
- tags: tags
- diagnosticSettings: diagnosticSettings
- dnsServers: !empty(dnsServers) ? dnsServers : []
- enableAcceleratedNetworking: enableAcceleratedNetworking
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- enableIPForwarding: enableIPForwarding
- lock: lock
- networkSecurityGroupResourceId: !empty(networkSecurityGroupResourceId) ? networkSecurityGroupResourceId : ''
- roleAssignments: !empty(roleAssignments) ? roleAssignments : []
- }
- dependsOn: [
- networkInterface_publicIPAddresses
- ]
-}
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to llLogs to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/compute/virtual-machine/tests/e2e/linux.atmg/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/linux.atmg/dependencies.bicep
deleted file mode 100644
index d8b2e100e0..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/linux.atmg/dependencies.bicep
+++ /dev/null
@@ -1,86 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create for the SSH Key generation.')
-param sshDeploymentScriptName string
-
-@description('Required. The name of the SSH Key to create.')
-param sshKeyName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(resourceGroup().id, 'Contributor', managedIdentity.id)
- scope: resourceGroup()
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource sshDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: sshDeploymentScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '9.0'
- retentionInterval: 'P1D'
- arguments: ' -SSHKeyName "${sshKeyName}" -ResourceGroupName "${resourceGroup().name}"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1')
- }
- dependsOn: [
- msiRGContrRoleAssignment
- ]
-}
-
-resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' = {
- name: sshKeyName
- location: location
- properties: {
- publicKey: sshDeploymentScript.properties.outputs.publicKey
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The Public Key of the created SSH Key.')
-output SSHKeyPublicKey string = sshKey.properties.publicKey
diff --git a/modules/compute/virtual-machine/tests/e2e/linux.atmg/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/linux.atmg/main.test.bicep
deleted file mode 100644
index 4e53732a23..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/linux.atmg/main.test.bicep
+++ /dev/null
@@ -1,123 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmlinatmg'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-// resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' existing = {
-// name: sshKeyName
-// scope: resourceGroup
-// }
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- location: location
- name: '${namePrefix}${serviceShort}'
- adminUsername: 'localAdminUser'
- imageReference: {
- publisher: 'Canonical'
- offer: '0001-com-ubuntu-server-jammy'
- sku: '22_04-lts-gen2'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- pipConfiguration: {
- publicIpNameSuffix: '-pip-01'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- zones: [
- '1'
- '2'
- '3'
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- nicSuffix: '-nic-01'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- osDisk: {
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Linux'
- vmSize: 'Standard_DS2_v2'
- configurationProfile: '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction'
- disablePasswordAuthentication: true
- publicKeys: [
- {
- keyData: nestedDependencies.outputs.SSHKeyPublicKey
- path: '/home/localAdminUser/.ssh/authorized_keys'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- dependsOn: [
- nestedDependencies // Required to leverage `existing` SSH key reference
- ]
-}
diff --git a/modules/compute/virtual-machine/tests/e2e/linux.min/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/linux.min/dependencies.bicep
deleted file mode 100644
index c88f2b1230..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/linux.min/dependencies.bicep
+++ /dev/null
@@ -1,86 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create for the SSH Key generation.')
-param sshDeploymentScriptName string
-
-@description('Required. The name of the SSH Key to create.')
-param sshKeyName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(resourceGroup().id, 'Contributor', managedIdentity.id)
- scope: resourceGroup()
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource sshDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: sshDeploymentScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '9.0'
- retentionInterval: 'P1D'
- arguments: '-SSHKeyName "${sshKeyName}" -ResourceGroupName "${resourceGroup().name}"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1')
- }
- dependsOn: [
- msiRGContrRoleAssignment
- ]
-}
-
-resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' = {
- name: sshKeyName
- location: location
- properties: {
- publicKey: sshDeploymentScript.properties.outputs.publicKey
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The Public Key of the created SSH Key.')
-output SSHKeyPublicKey string = sshKey.properties.publicKey
diff --git a/modules/compute/virtual-machine/tests/e2e/linux.min/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/linux.min/main.test.bicep
deleted file mode 100644
index 4c3fffb43d..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/linux.min/main.test.bicep
+++ /dev/null
@@ -1,102 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmlinmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-// resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' existing = {
-// name: sshKeyName
-// scope: resourceGroup
-// }
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- location: location
- name: '${namePrefix}${serviceShort}'
- adminUsername: 'localAdminUser'
- imageReference: {
- publisher: 'Canonical'
- offer: '0001-com-ubuntu-server-jammy'
- sku: '22_04-lts-gen2'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- pipConfiguration: {
- publicIpNameSuffix: '-pip-01'
- }
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- nicSuffix: '-nic-01'
- }
- ]
- osDisk: {
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Linux'
- vmSize: 'Standard_DS2_v2'
- disablePasswordAuthentication: true
- publicKeys: [
- {
- keyData: nestedDependencies.outputs.SSHKeyPublicKey
- path: '/home/localAdminUser/.ssh/authorized_keys'
- }
- ]
- }
- dependsOn: [
- nestedDependencies // Required to leverage `existing` SSH key reference
- ]
-}
diff --git a/modules/compute/virtual-machine/tests/e2e/linux/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/linux/dependencies.bicep
deleted file mode 100644
index 4dbd74b07b..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/linux/dependencies.bicep
+++ /dev/null
@@ -1,337 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Application Security Group to create.')
-param applicationSecurityGroupName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Load Balancer to create.')
-param loadBalancerName string
-
-@description('Required. The name of the Recovery Services Vault to create.')
-param recoveryServicesVaultName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Deployment Script used to upload data to the Storage Account.')
-param storageUploadDeploymentScriptName string
-
-@description('Required. The name of the Deployment Script to create for the SSH Key generation.')
-param sshDeploymentScriptName string
-
-@description('Required. The name of the SSH Key to create.')
-param sshKeyName string
-
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-var storageAccountCSEFileName = 'scriptExtensionMasterInstaller.ps1'
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource applicationSecurityGroup 'Microsoft.Network/applicationSecurityGroups@2023-04-01' = {
- name: applicationSecurityGroupName
- location: location
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(resourceGroup().id, 'Contributor', managedIdentity.id)
- scope: resourceGroup()
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource loadBalancer 'Microsoft.Network/loadBalancers@2023-04-01' = {
- name: loadBalancerName
- location: location
- sku: {
- name: 'Standard'
- }
- properties: {
- frontendIPConfigurations: [
- {
- name: 'privateIPConfig1'
- properties: {
- subnet: virtualNetwork.properties.subnets[0]
- }
- }
- ]
- backendAddressPools: [
- {
- name: 'servers'
- }
- ]
- }
-}
-
-resource recoveryServicesVault 'Microsoft.RecoveryServices/vaults@2022-04-01' = {
- name: recoveryServicesVaultName
- location: location
- sku: {
- name: 'RS0'
- tier: 'Standard'
- }
- properties: {}
-
- resource backupPolicy 'backupPolicies@2022-03-01' = {
- name: 'backupPolicy'
- properties: {
- backupManagementType: 'AzureIaasVM'
- instantRPDetails: {}
- schedulePolicy: {
- schedulePolicyType: 'SimpleSchedulePolicy'
- scheduleRunFrequency: 'Daily'
- scheduleRunTimes: [
- '2019-11-07T07:00:00Z'
- ]
- scheduleWeeklyFrequency: 0
- }
- retentionPolicy: {
- retentionPolicyType: 'LongTermRetentionPolicy'
- dailySchedule: {
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 180
- durationType: 'Days'
- }
- }
- weeklySchedule: {
- daysOfTheWeek: [
- 'Sunday'
- ]
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 12
- durationType: 'Weeks'
- }
- }
- monthlySchedule: {
- retentionScheduleFormatType: 'Weekly'
- retentionScheduleWeekly: {
- daysOfTheWeek: [
- 'Sunday'
- ]
- weeksOfTheMonth: [
- 'First'
- ]
- }
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 60
- durationType: 'Months'
- }
- }
- yearlySchedule: {
- retentionScheduleFormatType: 'Weekly'
- monthsOfYear: [
- 'January'
- ]
- retentionScheduleWeekly: {
- daysOfTheWeek: [
- 'Sunday'
- ]
- weeksOfTheMonth: [
- 'First'
- ]
- }
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 10
- durationType: 'Years'
- }
- }
- }
- instantRpRetentionRangeInDays: 2
- timeZone: 'UTC'
- protectedItemsCount: 0
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource msiKVCryptoUserRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-
- resource blobService 'blobServices@2021-09-01' = {
- name: 'default'
-
- resource container 'containers@2021-09-01' = {
- name: 'scripts'
- }
- }
-}
-
-resource storageUpload 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: storageUploadDeploymentScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '9.0'
- retentionInterval: 'P1D'
- arguments: '-StorageAccountName "${storageAccount.name}" -ResourceGroupName "${resourceGroup().name}" -ContainerName "${storageAccount::blobService::container.name}" -FileName "${storageAccountCSEFileName}"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Set-BlobContent.ps1')
- }
- dependsOn: [
- msiRGContrRoleAssignment
- ]
-}
-
-resource sshDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: sshDeploymentScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '9.0'
- retentionInterval: 'P1D'
- arguments: '-SSHKeyName "${sshKeyName}" -ResourceGroupName "${resourceGroup().name}"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/New-SSHKey.ps1')
- }
- dependsOn: [
- msiRGContrRoleAssignment
- ]
-}
-
-resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-03-01' = {
- name: sshKeyName
- location: location
- properties: {
- publicKey: sshDeploymentScript.properties.outputs.publicKey
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Application Security Group.')
-output applicationSecurityGroupResourceId string = applicationSecurityGroup.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Load Balancer Backend Pool.')
-output loadBalancerBackendPoolResourceId string = loadBalancer.properties.backendAddressPools[0].id
-
-@description('The name of the created Recovery Services Vault.')
-output recoveryServicesVaultName string = recoveryServicesVault.name
-
-@description('The name of the Resource Group, the Recovery Services Vault was created in.')
-output recoveryServicesVaultResourceGroupName string = resourceGroup().name
-
-@description('The name of the Backup Policy created in the Backup Recovery Vault.')
-output recoveryServicesVaultBackupPolicyName string = recoveryServicesVault::backupPolicy.name
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The URL of the created Key Vault Encryption Key.')
-output keyVaultEncryptionKeyUrl string = keyVault::key.properties.keyUriWithVersion
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The URL of the Custom Script Extension in the created Storage Account.')
-output storageAccountCSEFileUrl string = '${storageAccount.properties.primaryEndpoints.blob}${storageAccount::blobService::container.name}/${storageAccountCSEFileName}'
-
-@description('The name of the Custom Script Extension in the created Storage Account.')
-output storageAccountCSEFileName string = storageAccountCSEFileName
-
-@description('The Public Key of the created SSH Key.')
-output SSHKeyPublicKey string = sshKey.properties.publicKey
diff --git a/modules/compute/virtual-machine/tests/e2e/linux/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/linux/main.test.bicep
deleted file mode 100644
index b4b5e7ba57..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/linux/main.test.bicep
+++ /dev/null
@@ -1,314 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmlincom'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- loadBalancerName: 'dep-${namePrefix}-lb-${serviceShort}'
- recoveryServicesVaultName: 'dep-${namePrefix}-rsv-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}01'
- storageUploadDeploymentScriptName: 'dep-${namePrefix}-sads-${serviceShort}'
- sshDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}'
- computerName: '${namePrefix}linvm1'
- location: location
- adminUsername: 'localAdministrator'
- imageReference: {
- publisher: 'Canonical'
- offer: '0001-com-ubuntu-server-focal'
- sku: '20_04-lts-gen2' // Note: 22.04 does not support OMS extension
- version: 'latest'
- }
- nicConfigurations: [
- {
- deleteOption: 'Delete'
- ipConfigurations: [
- {
- applicationSecurityGroups: [
- {
- id: nestedDependencies.outputs.applicationSecurityGroupResourceId
- }
- ]
- loadBalancerBackendAddressPools: [
- {
- id: nestedDependencies.outputs.loadBalancerBackendPoolResourceId
- }
- ]
- name: 'ipconfig01'
- pipConfiguration: {
- publicIpNameSuffix: '-pip-01'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- }
- zones: [
- '1'
- '2'
- '3'
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- }
- ]
- nicSuffix: '-nic-01'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- }
- ]
- osDisk: {
- caching: 'ReadOnly'
- createOption: 'fromImage'
- deleteOption: 'Delete'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Linux'
- vmSize: 'Standard_DS2_v2'
- availabilityZone: 1
- backupPolicyName: nestedDependencies.outputs.recoveryServicesVaultBackupPolicyName
- backupVaultName: nestedDependencies.outputs.recoveryServicesVaultName
- backupVaultResourceGroup: nestedDependencies.outputs.recoveryServicesVaultResourceGroupName
- dataDisks: [
- {
- caching: 'ReadWrite'
- createOption: 'Empty'
- deleteOption: 'Delete'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- {
- caching: 'ReadWrite'
- createOption: 'Empty'
- deleteOption: 'Delete'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- ]
- enableAutomaticUpdates: true
- patchMode: 'AutomaticByPlatform'
- disablePasswordAuthentication: true
- encryptionAtHost: false
- extensionCustomScriptConfig: {
- enabled: true
- fileData: [
- {
- storageAccountId: nestedDependencies.outputs.storageAccountResourceId
- uri: nestedDependencies.outputs.storageAccountCSEFileUrl
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionCustomScriptProtectedSetting: {
- commandToExecute: 'value=$(./${nestedDependencies.outputs.storageAccountCSEFileName}); echo "$value"'
- }
- extensionDependencyAgentConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionAzureDiskEncryptionConfig: {
- enabled: true
- settings: {
- EncryptionOperation: 'EnableEncryption'
- KekVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- KeyEncryptionAlgorithm: 'RSA-OAEP'
- KeyEncryptionKeyURL: nestedDependencies.outputs.keyVaultEncryptionKeyUrl
- KeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- KeyVaultURL: nestedDependencies.outputs.keyVaultUrl
- ResizeOSDisk: 'false'
- VolumeType: 'All'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionAadJoinConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionDSCConfig: {
- enabled: false
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionMonitoringAgentConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionNetworkWatcherAgentConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- monitoringWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- publicKeys: [
- {
- keyData: nestedDependencies.outputs.SSHKeyPublicKey
- path: '/home/localAdministrator/.ssh/authorized_keys'
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- dependsOn: [
- nestedDependencies // Required to leverage `existing` SSH key reference
- ]
-}
diff --git a/modules/compute/virtual-machine/tests/e2e/windows.atmg/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/windows.atmg/dependencies.bicep
deleted file mode 100644
index a546ea7dba..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows.atmg/dependencies.bicep
+++ /dev/null
@@ -1,30 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
diff --git a/modules/compute/virtual-machine/tests/e2e/windows.atmg/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/windows.atmg/main.test.bicep
deleted file mode 100644
index b1314bce14..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows.atmg/main.test.bicep
+++ /dev/null
@@ -1,92 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmwinatmg'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- location: location
- name: '${namePrefix}${serviceShort}'
- adminUsername: 'localAdministrator'
- imageReference: {
- publisher: 'MicrosoftWindowsServer'
- offer: 'WindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- nicSuffix: '-nic-01'
- }
- ]
- osDisk: {
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Windows'
- vmSize: 'Standard_DS2_v2'
- adminPassword: password
- configurationProfile: '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/compute/virtual-machine/tests/e2e/windows.min/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/windows.min/dependencies.bicep
deleted file mode 100644
index 68972ec7ec..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows.min/dependencies.bicep
+++ /dev/null
@@ -1,30 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
diff --git a/modules/compute/virtual-machine/tests/e2e/windows.min/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/windows.min/main.test.bicep
deleted file mode 100644
index 68c34d8494..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows.min/main.test.bicep
+++ /dev/null
@@ -1,85 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmwinmin'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- location: location
- name: '${namePrefix}${serviceShort}'
- adminUsername: 'localAdminUser'
- imageReference: {
- publisher: 'MicrosoftWindowsServer'
- offer: 'WindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- nicSuffix: '-nic-01'
- }
- ]
- osDisk: {
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Windows'
- vmSize: 'Standard_DS2_v2'
- adminPassword: password
- }
-}
diff --git a/modules/compute/virtual-machine/tests/e2e/windows.ssecmk/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/windows.ssecmk/dependencies.bicep
deleted file mode 100644
index e5cb91cea0..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows.ssecmk/dependencies.bicep
+++ /dev/null
@@ -1,92 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Disk Encryption Set to create.')
-param diskEncryptionSetName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by disk encryption set
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2021-04-01' = {
- name: diskEncryptionSetName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- activeKey: {
- sourceVault: {
- id: keyVault.id
- }
- keyUrl: keyVault::key.properties.keyUriWithVersion
- }
- encryptionType: 'EncryptionAtRestWithPlatformAndCustomerKeys'
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(keyVault::key.id, 'Key Vault Crypto User', diskEncryptionSet.id)
- scope: keyVault
- properties: {
- principalId: diskEncryptionSet.identity.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') // Key Vault Crypto Service Encryption User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Disk Encryption Set.')
-output diskEncryptionSetResourceId string = diskEncryptionSet.id
diff --git a/modules/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep
deleted file mode 100644
index ff7c06d244..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep
+++ /dev/null
@@ -1,110 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmwincmk'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep${namePrefix}kv${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- location: location
- name: '${namePrefix}${serviceShort}'
- adminUsername: 'VMAdministrator'
- imageReference: {
- publisher: 'MicrosoftWindowsServer'
- offer: 'WindowsServer'
- sku: '2019-datacenter'
- version: 'latest'
- }
- nicConfigurations: [
- {
- ipConfigurations: [
- {
- name: 'ipconfig01'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- nicSuffix: '-nic-01'
- }
- ]
- osDisk: {
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- diskEncryptionSet: {
- id: nestedDependencies.outputs.diskEncryptionSetResourceId
- }
- }
- }
- osType: 'Windows'
- vmSize: 'Standard_DS2_v2'
- adminPassword: password
- dataDisks: [
- {
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- diskEncryptionSet: {
- id: nestedDependencies.outputs.diskEncryptionSetResourceId
- }
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/compute/virtual-machine/tests/e2e/windows/dependencies.bicep b/modules/compute/virtual-machine/tests/e2e/windows/dependencies.bicep
deleted file mode 100644
index 6a1f5fcc13..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows/dependencies.bicep
+++ /dev/null
@@ -1,310 +0,0 @@
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Application Security Group to create.')
-param applicationSecurityGroupName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Load Balancer to create.')
-param loadBalancerName string
-
-@description('Required. The name of the Recovery Services Vault to create.')
-param recoveryServicesVaultName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Deployment Script used to upload data to the Storage Account.')
-param storageUploadDeploymentScriptName string
-
-@description('Required. The name of the Proximity Placement Group to create.')
-param proximityPlacementGroupName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var storageAccountCSEFileName = 'scriptExtensionMasterInstaller.ps1'
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource applicationSecurityGroup 'Microsoft.Network/applicationSecurityGroups@2023-04-01' = {
- name: applicationSecurityGroupName
- location: location
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource msiRGContrRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(resourceGroup().id, 'Contributor', managedIdentity.id)
- scope: resourceGroup()
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource loadBalancer 'Microsoft.Network/loadBalancers@2023-04-01' = {
- name: loadBalancerName
- location: location
- sku: {
- name: 'Standard'
- }
- properties: {
- frontendIPConfigurations: [
- {
- name: 'privateIPConfig1'
- properties: {
- subnet: virtualNetwork.properties.subnets[0]
- }
- }
- ]
- backendAddressPools: [
- {
- name: 'servers'
- }
- ]
- }
-}
-
-resource recoveryServicesVault 'Microsoft.RecoveryServices/vaults@2022-04-01' = {
- name: recoveryServicesVaultName
- location: location
- sku: {
- name: 'RS0'
- tier: 'Standard'
- }
- properties: {}
-
- resource backupPolicy 'backupPolicies@2022-03-01' = {
- name: 'backupPolicy'
- properties: {
- backupManagementType: 'AzureIaasVM'
- instantRPDetails: {}
- schedulePolicy: {
- schedulePolicyType: 'SimpleSchedulePolicy'
- scheduleRunFrequency: 'Daily'
- scheduleRunTimes: [
- '2019-11-07T07:00:00Z'
- ]
- scheduleWeeklyFrequency: 0
- }
- retentionPolicy: {
- retentionPolicyType: 'LongTermRetentionPolicy'
- dailySchedule: {
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 180
- durationType: 'Days'
- }
- }
- weeklySchedule: {
- daysOfTheWeek: [
- 'Sunday'
- ]
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 12
- durationType: 'Weeks'
- }
- }
- monthlySchedule: {
- retentionScheduleFormatType: 'Weekly'
- retentionScheduleWeekly: {
- daysOfTheWeek: [
- 'Sunday'
- ]
- weeksOfTheMonth: [
- 'First'
- ]
- }
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 60
- durationType: 'Months'
- }
- }
- yearlySchedule: {
- retentionScheduleFormatType: 'Weekly'
- monthsOfYear: [
- 'January'
- ]
- retentionScheduleWeekly: {
- daysOfTheWeek: [
- 'Sunday'
- ]
- weeksOfTheMonth: [
- 'First'
- ]
- }
- retentionTimes: [
- '2019-11-07T07:00:00Z'
- ]
- retentionDuration: {
- count: 10
- durationType: 'Years'
- }
- }
- }
- instantRpRetentionRangeInDays: 2
- timeZone: 'UTC'
- protectedItemsCount: 0
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource msiKVReadRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-
- resource blobService 'blobServices@2021-09-01' = {
- name: 'default'
-
- resource container 'containers@2021-09-01' = {
- name: 'scripts'
- }
- }
-}
-
-resource storageUpload 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: storageUploadDeploymentScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '9.0'
- retentionInterval: 'P1D'
- arguments: '-StorageAccountName "${storageAccount.name}" -ResourceGroupName "${resourceGroup().name}" -ContainerName "${storageAccount::blobService::container.name}" -FileName "${storageAccountCSEFileName}"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Set-BlobContent.ps1')
- }
- dependsOn: [
- msiRGContrRoleAssignment
- ]
-}
-
-resource proximityPlacementGroup 'Microsoft.Compute/proximityPlacementGroups@2022-03-01' = {
- name: proximityPlacementGroupName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Application Security Group.')
-output applicationSecurityGroupResourceId string = applicationSecurityGroup.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Load Balancer Backend Pool.')
-output loadBalancerBackendPoolResourceId string = loadBalancer.properties.backendAddressPools[0].id
-
-@description('The name of the created Recovery Services Vault.')
-output recoveryServicesVaultName string = recoveryServicesVault.name
-
-@description('The name of the Resource Group, the Recovery Services Vault was created in.')
-output recoveryServicesVaultResourceGroupName string = resourceGroup().name
-
-@description('The name of the Backup Policy created in the Backup Recovery Vault.')
-output recoveryServicesVaultBackupPolicyName string = recoveryServicesVault::backupPolicy.name
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The URL of the created Key Vault Encryption Key.')
-output keyVaultEncryptionKeyUrl string = keyVault::key.properties.keyUriWithVersion
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the Custom Script Extension in the created Storage Account.')
-output storageAccountCSEFileName string = storageAccountCSEFileName
-
-@description('The URL of the Custom Script Extension in the created Storage Account')
-output storageAccountCSEFileUrl string = '${storageAccount.properties.primaryEndpoints.blob}${storageAccount::blobService::container.name}/${storageAccountCSEFileName}'
-
-@description('The resource ID of the created Proximity Placement Group.')
-output proximityPlacementGroupResourceId string = proximityPlacementGroup.id
diff --git a/modules/compute/virtual-machine/tests/e2e/windows/main.test.bicep b/modules/compute/virtual-machine/tests/e2e/windows/main.test.bicep
deleted file mode 100644
index 7bc8a2c00f..0000000000
--- a/modules/compute/virtual-machine/tests/e2e/windows/main.test.bicep
+++ /dev/null
@@ -1,332 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${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 = 'cvmwincom'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- location: location
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- loadBalancerName: 'dep-${namePrefix}-lb-${serviceShort}'
- recoveryServicesVaultName: 'dep-${namePrefix}-rsv-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}01'
- storageUploadDeploymentScriptName: 'dep-${namePrefix}-sads-${serviceShort}'
- proximityPlacementGroupName: 'dep-${namePrefix}-ppg-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- location: location
- name: '${namePrefix}${serviceShort}'
- computerName: '${namePrefix}winvm1'
- adminUsername: 'VMAdmin'
- imageReference: {
- publisher: 'MicrosoftWindowsServer'
- offer: 'WindowsServer'
- sku: '2019-datacenter'
- version: 'latest'
- }
- nicConfigurations: [
- {
- deleteOption: 'Delete'
- ipConfigurations: [
- {
- applicationSecurityGroups: [
- {
- id: nestedDependencies.outputs.applicationSecurityGroupResourceId
- }
- ]
- loadBalancerBackendAddressPools: [
- {
- id: nestedDependencies.outputs.loadBalancerBackendPoolResourceId
- }
- ]
- name: 'ipconfig01'
- pipConfiguration: {
- publicIpNameSuffix: '-pip-01'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- }
- zones: [
- '1'
- '2'
- '3'
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- }
- ]
- nicSuffix: '-nic-01'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- }
- ]
- osDisk: {
- caching: 'None'
- createOption: 'fromImage'
- deleteOption: 'Delete'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- osType: 'Windows'
- vmSize: 'Standard_DS2_v2'
- adminPassword: password
- availabilityZone: 2
- backupPolicyName: nestedDependencies.outputs.recoveryServicesVaultBackupPolicyName
- backupVaultName: nestedDependencies.outputs.recoveryServicesVaultName
- backupVaultResourceGroup: nestedDependencies.outputs.recoveryServicesVaultResourceGroupName
- dataDisks: [
- {
- caching: 'None'
- createOption: 'Empty'
- deleteOption: 'Delete'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- {
- caching: 'None'
- createOption: 'Empty'
- deleteOption: 'Delete'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- }
- }
- ]
- enableAutomaticUpdates: true
- patchMode: 'AutomaticByPlatform'
- encryptionAtHost: false
- extensionAntiMalwareConfig: {
- enabled: true
- settings: {
- AntimalwareEnabled: 'true'
- Exclusions: {
- Extensions: '.ext1;.ext2'
- Paths: 'c:\\excluded-path-1;c:\\excluded-path-2'
- Processes: 'excludedproc1.exe;excludedproc2.exe'
- }
- RealtimeProtectionEnabled: 'true'
- ScheduledScanSettings: {
- day: '7'
- isEnabled: 'true'
- scanType: 'Quick'
- time: '120'
- }
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionCustomScriptConfig: {
- enabled: true
- fileData: [
- {
- storageAccountId: nestedDependencies.outputs.storageAccountResourceId
- uri: nestedDependencies.outputs.storageAccountCSEFileUrl
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionCustomScriptProtectedSetting: {
- commandToExecute: 'powershell -ExecutionPolicy Unrestricted -Command "& ./${nestedDependencies.outputs.storageAccountCSEFileName}"'
- }
- extensionDependencyAgentConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionAzureDiskEncryptionConfig: {
- enabled: true
- settings: {
- EncryptionOperation: 'EnableEncryption'
- KekVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- KeyEncryptionAlgorithm: 'RSA-OAEP'
- KeyEncryptionKeyURL: nestedDependencies.outputs.keyVaultEncryptionKeyUrl
- KeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- KeyVaultURL: nestedDependencies.outputs.keyVaultUrl
- ResizeOSDisk: 'false'
- VolumeType: 'All'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- }
- extensionAadJoinConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionDSCConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionMonitoringAgentConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- extensionNetworkWatcherAgentConfig: {
- enabled: true
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- monitoringWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- proximityPlacementGroupResourceId: nestedDependencies.outputs.proximityPlacementGroupResourceId
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/compute/virtual-machine/version.json b/modules/compute/virtual-machine/version.json
deleted file mode 100644
index 9ed3662aba..0000000000
--- a/modules/compute/virtual-machine/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.6",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/consumption/budget/README.md b/modules/consumption/budget/README.md
index 27a7dbedeb..7421738bc7 100644
--- a/modules/consumption/budget/README.md
+++ b/modules/consumption/budget/README.md
@@ -1,405 +1,7 @@
-# Consumption Budgets `[Microsoft.Consumption/budgets]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`amount`](#parameter-amount) | int | The total amount of cost or usage to track with the budget. |
-| [`name`](#parameter-name) | string | The name of the budget. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actionGroups`](#parameter-actiongroups) | array | List of action group resource IDs that will receive the alert. Required if neither `contactEmails` nor `contactEmails` was provided. |
-| [`contactEmails`](#parameter-contactemails) | array | The list of email addresses to send the budget notification to when the thresholds are exceeded. Required if neither `contactRoles` nor `actionGroups` was provided. |
-| [`contactRoles`](#parameter-contactroles) | array | The list of contact roles to send the budget notification to when the thresholds are exceeded. Required if neither `contactEmails` nor `actionGroups` was provided. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`category`](#parameter-category) | string | The category of the budget, whether the budget tracks cost or usage. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`endDate`](#parameter-enddate) | string | The end date for the budget. If not provided, it will default to 10 years from the start date. |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`resetPeriod`](#parameter-resetperiod) | string | The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers. |
-| [`startDate`](#parameter-startdate) | string | The start date for the budget. Start date should be the first day of the month and cannot be in the past (except for the current month). |
-| [`thresholds`](#parameter-thresholds) | array | Percent thresholds of budget for when to get a notification. Can be up to 5 thresholds, where each must be between 1 and 1000. |
-
-### Parameter: `amount`
-
-The total amount of cost or usage to track with the budget.
-
-- Required: Yes
-- Type: int
-
-### Parameter: `name`
-
-The name of the budget.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actionGroups`
-
-List of action group resource IDs that will receive the alert. Required if neither `contactEmails` nor `contactEmails` was provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `contactEmails`
-
-The list of email addresses to send the budget notification to when the thresholds are exceeded. Required if neither `contactRoles` nor `actionGroups` was provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `contactRoles`
-
-The list of contact roles to send the budget notification to when the thresholds are exceeded. Required if neither `contactEmails` nor `actionGroups` was provided.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `category`
-
-The category of the budget, whether the budget tracks cost or usage.
-
-- Required: No
-- Type: string
-- Default: `'Cost'`
-- Allowed:
- ```Bicep
- [
- 'Cost'
- 'Usage'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `endDate`
-
-The end date for the budget. If not provided, it will default to 10 years from the start date.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `resetPeriod`
-
-The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers.
-
-- Required: No
-- Type: string
-- Default: `'Monthly'`
-- Allowed:
- ```Bicep
- [
- 'Annually'
- 'BillingAnnual'
- 'BillingMonth'
- 'BillingQuarter'
- 'Monthly'
- 'Quarterly'
- ]
- ```
-
-### Parameter: `startDate`
-
-The start date for the budget. Start date should be the first day of the month and cannot be in the past (except for the current month).
-
-- Required: No
-- Type: string
-- Default: `[format('{0}-{1}-01T00:00:00Z', utcNow('yyyy'), utcNow('MM'))]`
-
-### Parameter: `thresholds`
-
-Percent thresholds of budget for when to get a notification. Can be up to 5 thresholds, where each must be between 1 and 1000.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- 50
- 75
- 90
- 100
- 110
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the budget. |
-| `resourceId` | string | The resource ID of the budget. |
-| `subscriptionName` | string | The subscription the budget was deployed into. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/consumption/budget/main.bicep b/modules/consumption/budget/main.bicep
deleted file mode 100644
index 853e144964..0000000000
--- a/modules/consumption/budget/main.bicep
+++ /dev/null
@@ -1,111 +0,0 @@
-metadata name = 'Consumption Budgets'
-metadata description = 'This module deploys a Consumption Budget for Subscriptions.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@description('Required. The name of the budget.')
-param name string
-
-@allowed([
- 'Cost'
- 'Usage'
-])
-@description('Optional. The category of the budget, whether the budget tracks cost or usage.')
-param category string = 'Cost'
-
-@description('Required. The total amount of cost or usage to track with the budget.')
-param amount int
-
-@allowed([
- 'Monthly'
- 'Quarterly'
- 'Annually'
- 'BillingMonth'
- 'BillingQuarter'
- 'BillingAnnual'
-])
-@description('Optional. The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers.')
-param resetPeriod string = 'Monthly'
-
-@description('Optional. The start date for the budget. Start date should be the first day of the month and cannot be in the past (except for the current month).')
-param startDate string = '${utcNow('yyyy')}-${utcNow('MM')}-01T00:00:00Z'
-
-@description('Optional. The end date for the budget. If not provided, it will default to 10 years from the start date.')
-param endDate string = ''
-
-@maxLength(5)
-@description('Optional. Percent thresholds of budget for when to get a notification. Can be up to 5 thresholds, where each must be between 1 and 1000.')
-param thresholds array = [
- 50
- 75
- 90
- 100
- 110
-]
-
-@description('Conditional. The list of email addresses to send the budget notification to when the thresholds are exceeded. Required if neither `contactRoles` nor `actionGroups` was provided.')
-param contactEmails array = []
-
-@description('Conditional. The list of contact roles to send the budget notification to when the thresholds are exceeded. Required if neither `contactEmails` nor `actionGroups` was provided.')
-param contactRoles array = []
-
-@description('Conditional. List of action group resource IDs that will receive the alert. Required if neither `contactEmails` nor `contactEmails` was provided.')
-param actionGroups array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-var notificationsArray = [for threshold in thresholds: {
- 'Actual_GreaterThan_${threshold}_Percentage': {
- enabled: true
- operator: 'GreaterThan'
- threshold: threshold
- contactEmails: empty(contactEmails) ? null : array(contactEmails)
- contactRoles: empty(contactRoles) ? null : array(contactRoles)
- contactGroups: empty(actionGroups) ? null : array(actionGroups)
- thresholdType: 'Actual'
- }
-}]
-
-var notifications = json(replace(replace(replace(string(notificationsArray), '[{', '{'), '}]', '}'), '}},{', '},'))
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource budget 'Microsoft.Consumption/budgets@2021-10-01' = {
- name: name
- properties: {
- category: category
- amount: amount
- timeGrain: resetPeriod
- timePeriod: {
- startDate: startDate
- endDate: endDate
- }
- filter: {}
- notifications: notifications
- }
-}
-
-@description('The name of the budget.')
-output name string = budget.name
-
-@description('The resource ID of the budget.')
-output resourceId string = budget.id
-
-@description('The subscription the budget was deployed into.')
-output subscriptionName string = subscription().displayName
diff --git a/modules/consumption/budget/main.json b/modules/consumption/budget/main.json
deleted file mode 100644
index 31a5523934..0000000000
--- a/modules/consumption/budget/main.json
+++ /dev/null
@@ -1,193 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10861664842554589267"
- },
- "name": "Consumption Budgets",
- "description": "This module deploys a Consumption Budget for Subscriptions.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the budget."
- }
- },
- "category": {
- "type": "string",
- "defaultValue": "Cost",
- "allowedValues": [
- "Cost",
- "Usage"
- ],
- "metadata": {
- "description": "Optional. The category of the budget, whether the budget tracks cost or usage."
- }
- },
- "amount": {
- "type": "int",
- "metadata": {
- "description": "Required. The total amount of cost or usage to track with the budget."
- }
- },
- "resetPeriod": {
- "type": "string",
- "defaultValue": "Monthly",
- "allowedValues": [
- "Monthly",
- "Quarterly",
- "Annually",
- "BillingMonth",
- "BillingQuarter",
- "BillingAnnual"
- ],
- "metadata": {
- "description": "Optional. The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers."
- }
- },
- "startDate": {
- "type": "string",
- "defaultValue": "[format('{0}-{1}-01T00:00:00Z', utcNow('yyyy'), utcNow('MM'))]",
- "metadata": {
- "description": "Optional. The start date for the budget. Start date should be the first day of the month and cannot be in the past (except for the current month)."
- }
- },
- "endDate": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The end date for the budget. If not provided, it will default to 10 years from the start date."
- }
- },
- "thresholds": {
- "type": "array",
- "defaultValue": [
- 50,
- 75,
- 90,
- 100,
- 110
- ],
- "maxLength": 5,
- "metadata": {
- "description": "Optional. Percent thresholds of budget for when to get a notification. Can be up to 5 thresholds, where each must be between 1 and 1000."
- }
- },
- "contactEmails": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Conditional. The list of email addresses to send the budget notification to when the thresholds are exceeded. Required if neither `contactRoles` nor `actionGroups` was provided."
- }
- },
- "contactRoles": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Conditional. The list of contact roles to send the budget notification to when the thresholds are exceeded. Required if neither `contactEmails` nor `actionGroups` was provided."
- }
- },
- "actionGroups": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Conditional. List of action group resource IDs that will receive the alert. Required if neither `contactEmails` nor `contactEmails` was provided."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "notificationsArray",
- "count": "[length(parameters('thresholds'))]",
- "input": {
- "[format('Actual_GreaterThan_{0}_Percentage', parameters('thresholds')[copyIndex('notificationsArray')])]": {
- "enabled": true,
- "operator": "GreaterThan",
- "threshold": "[parameters('thresholds')[copyIndex('notificationsArray')]]",
- "contactEmails": "[if(empty(parameters('contactEmails')), null(), array(parameters('contactEmails')))]",
- "contactRoles": "[if(empty(parameters('contactRoles')), null(), array(parameters('contactRoles')))]",
- "contactGroups": "[if(empty(parameters('actionGroups')), null(), array(parameters('actionGroups')))]",
- "thresholdType": "Actual"
- }
- }
- }
- ],
- "notifications": "[json(replace(replace(replace(string(variables('notificationsArray')), '[{', '{'), '}]', '}'), '}},{', '},'))]"
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Consumption/budgets",
- "apiVersion": "2021-10-01",
- "name": "[parameters('name')]",
- "properties": {
- "category": "[parameters('category')]",
- "amount": "[parameters('amount')]",
- "timeGrain": "[parameters('resetPeriod')]",
- "timePeriod": {
- "startDate": "[parameters('startDate')]",
- "endDate": "[parameters('endDate')]"
- },
- "filter": {},
- "notifications": "[variables('notifications')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the budget."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the budget."
- },
- "value": "[subscriptionResourceId('Microsoft.Consumption/budgets', parameters('name'))]"
- },
- "subscriptionName": {
- "type": "string",
- "metadata": {
- "description": "The subscription the budget was deployed into."
- },
- "value": "[subscription().displayName]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/consumption/budget/tests/e2e/defaults/main.test.bicep b/modules/consumption/budget/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 44789640d2..0000000000
--- a/modules/consumption/budget/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,34 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// 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 = 'cbmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- amount: 500
- contactEmails: [
- 'dummy@contoso.com'
- ]
- }
-}]
diff --git a/modules/consumption/budget/tests/e2e/max/main.test.bicep b/modules/consumption/budget/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 15fa49855c..0000000000
--- a/modules/consumption/budget/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,41 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// 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 = 'cbmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- amount: 500
- contactEmails: [
- 'dummy@contoso.com'
- ]
- thresholds: [
- 50
- 75
- 90
- 100
- 110
- ]
- }
-}]
diff --git a/modules/consumption/budget/tests/e2e/waf-aligned/main.test.bicep b/modules/consumption/budget/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 0d2260e7d8..0000000000
--- a/modules/consumption/budget/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,41 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// 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 = 'cbwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- name: '${uniqueString(deployment().name)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- amount: 500
- contactEmails: [
- 'dummy@contoso.com'
- ]
- thresholds: [
- 50
- 75
- 90
- 100
- 110
- ]
- }
-}]
diff --git a/modules/consumption/budget/version.json b/modules/consumption/budget/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/consumption/budget/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/container-instance/container-group/README.md b/modules/container-instance/container-group/README.md
index 8e0da9832e..fdc19805ad 100644
--- a/modules/container-instance/container-group/README.md
+++ b/modules/container-instance/container-group/README.md
@@ -1,1469 +1,7 @@
-# Container Instances Container Groups `[Microsoft.ContainerInstance/containerGroups]`
+
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _Private_
-
-
-
-
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`containers`](#parameter-containers) | array | The containers and their respective config within the container group. |
-| [`name`](#parameter-name) | string | Name for the container group. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`ipAddressPorts`](#parameter-ipaddressports) | array | Ports to open on the public IP address. Must include all ports assigned on container level. Required if `ipAddressType` is set to `public`. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`autoGeneratedDomainNameLabelScope`](#parameter-autogenerateddomainnamelabelscope) | string | Specify level of protection of the domain name label. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`dnsNameLabel`](#parameter-dnsnamelabel) | string | The Dns name label for the resource. |
-| [`dnsNameServers`](#parameter-dnsnameservers) | array | List of dns servers used by the containers for lookups. |
-| [`dnsSearchDomains`](#parameter-dnssearchdomains) | string | DNS search domain which will be appended to each DNS lookup. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`imageRegistryCredentials`](#parameter-imageregistrycredentials) | array | The image registry credentials by which the container group is created from. |
-| [`initContainers`](#parameter-initcontainers) | array | A list of container definitions which will be executed before the application container starts. |
-| [`ipAddressType`](#parameter-ipaddresstype) | string | Specifies if the IP is exposed to the public internet or private VNET. - Public or Private. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`osType`](#parameter-ostype) | string | The operating system type required by the containers in the container group. - Windows or Linux. |
-| [`restartPolicy`](#parameter-restartpolicy) | string | Restart policy for all containers within the container group. - Always: Always restart. OnFailure: Restart on failure. Never: Never restart. - Always, OnFailure, Never. |
-| [`sku`](#parameter-sku) | string | The container group SKU. |
-| [`subnetId`](#parameter-subnetid) | string | Resource ID of the subnet. Only specify when ipAddressType is Private. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`volumes`](#parameter-volumes) | array | Specify if volumes (emptyDir, AzureFileShare or GitRepo) shall be attached to your containergroup. |
-
-### Parameter: `containers`
-
-The containers and their respective config within the container group.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `name`
-
-Name for the container group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `ipAddressPorts`
-
-Ports to open on the public IP address. Must include all ports assigned on container level. Required if `ipAddressType` is set to `public`.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `autoGeneratedDomainNameLabelScope`
-
-Specify level of protection of the domain name label.
-
-- Required: No
-- Type: string
-- Default: `'TenantReuse'`
-- Allowed:
- ```Bicep
- [
- 'Noreuse'
- 'ResourceGroupReuse'
- 'SubscriptionReuse'
- 'TenantReuse'
- 'Unsecure'
- ]
- ```
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `dnsNameLabel`
-
-The Dns name label for the resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `dnsNameServers`
-
-List of dns servers used by the containers for lookups.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dnsSearchDomains`
-
-DNS search domain which will be appended to each DNS lookup.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `imageRegistryCredentials`
-
-The image registry credentials by which the container group is created from.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `initContainers`
-
-A list of container definitions which will be executed before the application container starts.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `ipAddressType`
-
-Specifies if the IP is exposed to the public internet or private VNET. - Public or Private.
-
-- Required: No
-- Type: string
-- Default: `'Public'`
-- Allowed:
- ```Bicep
- [
- 'Private'
- 'Public'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `osType`
-
-The operating system type required by the containers in the container group. - Windows or Linux.
-
-- Required: No
-- Type: string
-- Default: `'Linux'`
-
-### Parameter: `restartPolicy`
-
-Restart policy for all containers within the container group. - Always: Always restart. OnFailure: Restart on failure. Never: Never restart. - Always, OnFailure, Never.
-
-- Required: No
-- Type: string
-- Default: `'Always'`
-- Allowed:
- ```Bicep
- [
- 'Always'
- 'Never'
- 'OnFailure'
- ]
- ```
-
-### Parameter: `sku`
-
-The container group SKU.
-
-- Required: No
-- Type: string
-- Default: `'Standard'`
-- Allowed:
- ```Bicep
- [
- 'Dedicated'
- 'Standard'
- ]
- ```
-
-### Parameter: `subnetId`
-
-Resource ID of the subnet. Only specify when ipAddressType is Private.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `volumes`
-
-Specify if volumes (emptyDir, AzureFileShare or GitRepo) shall be attached to your containergroup.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `iPv4Address` | string | The IPv4 address of the container group. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the container group. |
-| `resourceGroupName` | string | The resource group the container group was deployed into. |
-| `resourceId` | string | The resource ID of the container group. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `imageRegistryCredentials`
-
-The image registry credentials by which the container group is created from.
-
-
-
-### Parameter Usage: `autoGeneratedDomainNameLabelScope`
-
-DNS name reuse is convenient for DevOps within any modern company. The idea of redeploying an application by reusing the DNS name fulfills an on-demand philosophy that secures cloud development. Therefore, it's important to note that DNS names that are available to anyone become a problem when one customer releases a name only to have that same name taken by another customer. This is called subdomain takeover. A customer releases a resource using a particular name, and another customer creates a new resource with that same DNS name. If there were any records pointing to the old resource, they now also point to the new resource.
-
-This field can only be used when the `ipAddressType` is set to `Public`.
-
-Allowed values are:
-| Policy name | Policy definition | | | |
-|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|---|---|
-| unsecure | Hash will be generated based on only the DNS name. Avoiding subdomain takeover is not guaranteed if another customer uses the same DNS name. | | | |
-| tenantReuse | Default Hash will be generated based on the DNS name and the tenant ID. Object's domain name label can be reused within the same tenant. | | | |
-| subscriptionReuse | Hash will be generated based on the DNS name and the tenant ID and subscription ID. Object's domain name label can be reused within the same subscription. | | | |
-| resourceGroupReuse | Hash will be generated based on the DNS name and the tenant ID, subscription ID, and resource group name. Object's domain name label can be reused within the same resource group. | | | |
-| noReuse | Hash will not be generated. Object's domain label can't be reused within resource group, subscription, or tenant. | | | |
-
-
-
-### Parameter Usage: `volumes`
-
-By default, Azure Container Instances are stateless. If the container is restarted, crashes, or stops, all of its state is lost. To persist state beyond the lifetime of the container, you must mount a volume from an external store. Currently, Azure volume mounting is only supported on a linux based image.
-
-You can mount:
-
-- an Azure File Share (make sure the storage account has a service endpoint when running the container in private mode!)
-- a secret
-- a GitHub Repository
-- an empty local directory
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/container-instance/container-group/main.bicep b/modules/container-instance/container-group/main.bicep
deleted file mode 100644
index bb632fbba5..0000000000
--- a/modules/container-instance/container-group/main.bicep
+++ /dev/null
@@ -1,218 +0,0 @@
-metadata name = 'Container Instances Container Groups'
-metadata description = 'This module deploys a Container Instance Container Group.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name for the container group.')
-param name string
-
-@description('Required. The containers and their respective config within the container group.')
-param containers array
-
-@description('Conditional. Ports to open on the public IP address. Must include all ports assigned on container level. Required if `ipAddressType` is set to `public`.')
-param ipAddressPorts array = []
-
-@description('Optional. The operating system type required by the containers in the container group. - Windows or Linux.')
-param osType string = 'Linux'
-
-@allowed([
- 'Always'
- 'OnFailure'
- 'Never'
-])
-@description('Optional. Restart policy for all containers within the container group. - Always: Always restart. OnFailure: Restart on failure. Never: Never restart. - Always, OnFailure, Never.')
-param restartPolicy string = 'Always'
-
-@allowed([
- 'Public'
- 'Private'
-])
-@description('Optional. Specifies if the IP is exposed to the public internet or private VNET. - Public or Private.')
-param ipAddressType string = 'Public'
-
-@description('Optional. The image registry credentials by which the container group is created from.')
-param imageRegistryCredentials array = []
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@allowed([
- 'Noreuse'
- 'ResourceGroupReuse'
- 'SubscriptionReuse'
- 'TenantReuse'
- 'Unsecure'
-])
-@description('Optional. Specify level of protection of the domain name label.')
-param autoGeneratedDomainNameLabelScope string = 'TenantReuse'
-
-@description('Optional. The Dns name label for the resource.')
-param dnsNameLabel string = ''
-
-@description('Optional. List of dns servers used by the containers for lookups.')
-param dnsNameServers array = []
-
-@description('Optional. DNS search domain which will be appended to each DNS lookup.')
-param dnsSearchDomains string = ''
-
-@description('Optional. A list of container definitions which will be executed before the application container starts.')
-param initContainers array = []
-
-@description('Optional. Resource ID of the subnet. Only specify when ipAddressType is Private.')
-param subnetId string = ''
-
-@description('Optional. Specify if volumes (emptyDir, AzureFileShare or GitRepo) shall be attached to your containergroup.')
-param volumes array = []
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The container group SKU.')
-@allowed([
- 'Dedicated'
- 'Standard'
-])
-param sku string = 'Standard'
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource containergroup 'Microsoft.ContainerInstance/containerGroups@2022-09-01' = {
- name: name
- location: location
- identity: identity
- tags: tags
- properties: union({
- containers: containers
- encryptionProperties: !empty(customerManagedKey) ? {
- identity: !empty(customerManagedKey.?userAssignedIdentityResourceId ?? '') ? cMKUserAssignedIdentity.id : null
- keyName: customerManagedKey!.keyName
- keyVersion: !empty(customerManagedKey.?keyVersion ?? '') ? customerManagedKey!.keyVersion : last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- vaultBaseUrl: cMKKeyVault.properties.vaultUri
- } : null
- imageRegistryCredentials: imageRegistryCredentials
- initContainers: initContainers
- restartPolicy: restartPolicy
- osType: osType
- ipAddress: {
- type: ipAddressType
- autoGeneratedDomainNameLabelScope: !empty(dnsNameServers) ? autoGeneratedDomainNameLabelScope : null
- dnsNameLabel: dnsNameLabel
- ports: ipAddressPorts
- }
- sku: sku
- subnetIds: !empty(subnetId) ? [
- {
- id: subnetId
- }
- ] : null
- volumes: volumes
- }, !empty(dnsNameServers) ? {
- dnsConfig: {
- nameServers: dnsNameServers
- searchDomains: dnsSearchDomains
- }
- } : {})
-}
-
-resource containergroup_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: containergroup
-}
-
-@description('The name of the container group.')
-output name string = containergroup.name
-
-@description('The resource ID of the container group.')
-output resourceId string = containergroup.id
-
-@description('The resource group the container group was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The IPv4 address of the container group.')
-output iPv4Address string = containergroup.properties.ipAddress.ip
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(containergroup.identity, 'principalId') ? containergroup.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = containergroup.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/container-instance/container-group/main.json b/modules/container-instance/container-group/main.json
deleted file mode 100644
index d62ed5361c..0000000000
--- a/modules/container-instance/container-group/main.json
+++ /dev/null
@@ -1,382 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "943190617690035013"
- },
- "name": "Container Instances Container Groups",
- "description": "This module deploys a Container Instance Container Group.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name for the container group."
- }
- },
- "containers": {
- "type": "array",
- "metadata": {
- "description": "Required. The containers and their respective config within the container group."
- }
- },
- "ipAddressPorts": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Conditional. Ports to open on the public IP address. Must include all ports assigned on container level. Required if `ipAddressType` is set to `public`."
- }
- },
- "osType": {
- "type": "string",
- "defaultValue": "Linux",
- "metadata": {
- "description": "Optional. The operating system type required by the containers in the container group. - Windows or Linux."
- }
- },
- "restartPolicy": {
- "type": "string",
- "defaultValue": "Always",
- "allowedValues": [
- "Always",
- "OnFailure",
- "Never"
- ],
- "metadata": {
- "description": "Optional. Restart policy for all containers within the container group. - Always: Always restart. OnFailure: Restart on failure. Never: Never restart. - Always, OnFailure, Never."
- }
- },
- "ipAddressType": {
- "type": "string",
- "defaultValue": "Public",
- "allowedValues": [
- "Public",
- "Private"
- ],
- "metadata": {
- "description": "Optional. Specifies if the IP is exposed to the public internet or private VNET. - Public or Private."
- }
- },
- "imageRegistryCredentials": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The image registry credentials by which the container group is created from."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "autoGeneratedDomainNameLabelScope": {
- "type": "string",
- "defaultValue": "TenantReuse",
- "allowedValues": [
- "Noreuse",
- "ResourceGroupReuse",
- "SubscriptionReuse",
- "TenantReuse",
- "Unsecure"
- ],
- "metadata": {
- "description": "Optional. Specify level of protection of the domain name label."
- }
- },
- "dnsNameLabel": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The Dns name label for the resource."
- }
- },
- "dnsNameServers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of dns servers used by the containers for lookups."
- }
- },
- "dnsSearchDomains": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. DNS search domain which will be appended to each DNS lookup."
- }
- },
- "initContainers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of container definitions which will be executed before the application container starts."
- }
- },
- "subnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the subnet. Only specify when ipAddressType is Private."
- }
- },
- "volumes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify if volumes (emptyDir, AzureFileShare or GitRepo) shall be attached to your containergroup."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "sku": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Dedicated",
- "Standard"
- ],
- "metadata": {
- "description": "Optional. The container group SKU."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]"
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "containergroup": {
- "type": "Microsoft.ContainerInstance/containerGroups",
- "apiVersion": "2022-09-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "tags": "[parameters('tags')]",
- "properties": "[union(createObject('containers', parameters('containers'), 'encryptionProperties', if(not(empty(parameters('customerManagedKey'))), createObject('identity', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), ''))), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))), null()), 'keyName', parameters('customerManagedKey').keyName, 'keyVersion', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), parameters('customerManagedKey').keyVersion, last(split(reference('cMKKeyVault::cMKKey').keyUriWithVersion, '/'))), 'vaultBaseUrl', reference('cMKKeyVault').vaultUri), null()), 'imageRegistryCredentials', parameters('imageRegistryCredentials'), 'initContainers', parameters('initContainers'), 'restartPolicy', parameters('restartPolicy'), 'osType', parameters('osType'), 'ipAddress', createObject('type', parameters('ipAddressType'), 'autoGeneratedDomainNameLabelScope', if(not(empty(parameters('dnsNameServers'))), parameters('autoGeneratedDomainNameLabelScope'), null()), 'dnsNameLabel', parameters('dnsNameLabel'), 'ports', parameters('ipAddressPorts')), 'sku', parameters('sku'), 'subnetIds', if(not(empty(parameters('subnetId'))), createArray(createObject('id', parameters('subnetId'))), null()), 'volumes', parameters('volumes')), if(not(empty(parameters('dnsNameServers'))), createObject('dnsConfig', createObject('nameServers', parameters('dnsNameServers'), 'searchDomains', parameters('dnsSearchDomains'))), createObject()))]",
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "containergroup_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.ContainerInstance/containerGroups/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "containergroup"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the container group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the container group."
- },
- "value": "[resourceId('Microsoft.ContainerInstance/containerGroups', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the container group was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "iPv4Address": {
- "type": "string",
- "metadata": {
- "description": "The IPv4 address of the container group."
- },
- "value": "[reference('containergroup').ipAddress.ip]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('containergroup', '2022-09-01', 'full').identity, 'principalId')), reference('containergroup', '2022-09-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('containergroup', '2022-09-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-instance/container-group/tests/e2e/defaults/main.test.bicep b/modules/container-instance/container-group/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index d8bb8445fd..0000000000
--- a/modules/container-instance/container-group/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,75 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerinstance.containergroups-${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 = 'cicgmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- containers: [
- {
- name: '${namePrefix}-az-aci-x-001'
- properties: {
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- ipAddressPorts: [
- {
- protocol: 'Tcp'
- port: 443
- }
- ]
- }
-}]
diff --git a/modules/container-instance/container-group/tests/e2e/encr/dependencies.bicep b/modules/container-instance/container-group/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index 465dc8e415..0000000000
--- a/modules/container-instance/container-group/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-@minLength(3)
-@maxLength(24)
-param keyVaultName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key Vault Crypto Service Encryption User')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') // Key Vault Crypto Service Encryption User. Allows Keys: get, list, wrap key, unwrap key
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created managed identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
diff --git a/modules/container-instance/container-group/tests/e2e/encr/main.test.bicep b/modules/container-instance/container-group/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index 661a32df6f..0000000000
--- a/modules/container-instance/container-group/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,135 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerinstance.containergroups-${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 = 'cicgenc'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- containers: [
- {
- name: '${namePrefix}-az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- {
- name: '${namePrefix}-az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- ipAddressPorts: [
- {
- protocol: 'Tcp'
- port: 80
- }
- {
- protocol: 'Tcp'
- port: 443
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-instance/container-group/tests/e2e/max/dependencies.bicep b/modules/container-instance/container-group/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 66dc10c2f2..0000000000
--- a/modules/container-instance/container-group/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created managed identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/container-instance/container-group/tests/e2e/max/main.test.bicep b/modules/container-instance/container-group/tests/e2e/max/main.test.bicep
deleted file mode 100644
index cf13c2ed38..0000000000
--- a/modules/container-instance/container-group/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,128 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerinstance.containergroups-${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 = 'cicgmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- containers: [
- {
- name: '${namePrefix}-az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- {
- name: '${namePrefix}-az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- ipAddressPorts: [
- {
- protocol: 'Tcp'
- port: 80
- }
- {
- protocol: 'Tcp'
- port: 443
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-instance/container-group/tests/e2e/private/dependencies.bicep b/modules/container-instance/container-group/tests/e2e/private/dependencies.bicep
deleted file mode 100644
index 4b89b7a4bd..0000000000
--- a/modules/container-instance/container-group/tests/e2e/private/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- delegations: [
- {
- name: 'Microsoft.ContainerInstance.containerGroups'
- properties: {
- serviceName: 'Microsoft.ContainerInstance/containerGroups'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
diff --git a/modules/container-instance/container-group/tests/e2e/private/main.test.bicep b/modules/container-instance/container-group/tests/e2e/private/main.test.bicep
deleted file mode 100644
index 31b7606b89..0000000000
--- a/modules/container-instance/container-group/tests/e2e/private/main.test.bicep
+++ /dev/null
@@ -1,144 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerinstance.containergroups-${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 = 'cicgprivate'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- containers: [
- {
- name: '${namePrefix}-az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 4
- }
- }
- volumeMounts: [
- {
- name: 'my-name'
- mountPath: '/mnt/empty'
- }
- ]
- }
- }
- {
- name: '${namePrefix}-az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- ipAddressType: 'Private'
- ipAddressPorts: [
- {
- protocol: 'Tcp'
- port: 80
- }
- {
- protocol: 'Tcp'
- port: 443
- }
- {
- protocol: 'Tcp'
- port: '8080'
- }
- ]
- subnetId: nestedDependencies.outputs.subnetResourceId
- volumes: [
- {
- emptyDir: {}
- name: 'my-name'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-instance/container-group/tests/e2e/waf-aligned/dependencies.bicep b/modules/container-instance/container-group/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 66dc10c2f2..0000000000
--- a/modules/container-instance/container-group/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created managed identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/container-instance/container-group/tests/e2e/waf-aligned/main.test.bicep b/modules/container-instance/container-group/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index cba1ba2b00..0000000000
--- a/modules/container-instance/container-group/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,128 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerinstance.containergroups-${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 = 'cicgwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- containers: [
- {
- name: '${namePrefix}-az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- {
- name: '${namePrefix}-az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- ipAddressPorts: [
- {
- protocol: 'Tcp'
- port: 80
- }
- {
- protocol: 'Tcp'
- port: 443
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-instance/container-group/version.json b/modules/container-instance/container-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/container-instance/container-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/container-registry/registry/README.md b/modules/container-registry/registry/README.md
index 51f807006c..3b0353cbf8 100644
--- a/modules/container-registry/registry/README.md
+++ b/modules/container-registry/registry/README.md
@@ -1,1654 +1,7 @@
-# Azure Container Registries (ACR) `[Microsoft.ContainerRegistry/registries]`
+
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _Pe_
-
-
-
-
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of your Azure container registry. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`acrAdminUserEnabled`](#parameter-acradminuserenabled) | bool | Enable admin user that have push / pull permission to the registry. |
-| [`acrSku`](#parameter-acrsku) | string | Tier of your Azure container registry. |
-| [`anonymousPullEnabled`](#parameter-anonymouspullenabled) | bool | Enables registry-wide pull from unauthenticated clients. It's in preview and available in the Standard and Premium service tiers. |
-| [`azureADAuthenticationAsArmPolicyStatus`](#parameter-azureadauthenticationasarmpolicystatus) | string | The value that indicates whether the policy for using ARM audience token for a container registr is enabled or not. Default is enabled. |
-| [`cacheRules`](#parameter-cacherules) | array | Array of Cache Rules. Note: This is a preview feature ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache#cache-for-acr-preview)). |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`dataEndpointEnabled`](#parameter-dataendpointenabled) | bool | Enable a single data endpoint per region for serving data. Not relevant in case of disabled public access. Note, requires the 'acrSku' to be 'Premium'. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exportPolicyStatus`](#parameter-exportpolicystatus) | string | The value that indicates whether the export policy is enabled or not. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`networkRuleBypassOptions`](#parameter-networkrulebypassoptions) | string | Whether to allow trusted Azure services to access a network restricted registry. |
-| [`networkRuleSetDefaultAction`](#parameter-networkrulesetdefaultaction) | string | The default action of allow or deny when no other rules match. |
-| [`networkRuleSetIpRules`](#parameter-networkrulesetiprules) | array | The IP ACL rules. Note, requires the 'acrSku' to be 'Premium'. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the 'acrSku' to be 'Premium'. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the 'acrSku' to be 'Premium'. |
-| [`quarantinePolicyStatus`](#parameter-quarantinepolicystatus) | string | The value that indicates whether the quarantine policy is enabled or not. |
-| [`replications`](#parameter-replications) | array | All replications to create. |
-| [`retentionPolicyDays`](#parameter-retentionpolicydays) | int | The number of days to retain an untagged manifest after which it gets purged. |
-| [`retentionPolicyStatus`](#parameter-retentionpolicystatus) | string | The value that indicates whether the retention policy is enabled or not. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`softDeletePolicyDays`](#parameter-softdeletepolicydays) | int | The number of days after which a soft-deleted item is permanently deleted. |
-| [`softDeletePolicyStatus`](#parameter-softdeletepolicystatus) | string | Soft Delete policy status. Default is disabled. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`trustPolicyStatus`](#parameter-trustpolicystatus) | string | The value that indicates whether the trust policy is enabled or not. |
-| [`webhooks`](#parameter-webhooks) | array | All webhooks to create. |
-| [`zoneRedundancy`](#parameter-zoneredundancy) | string | Whether or not zone redundancy is enabled for this container registry. |
-
-### Parameter: `name`
-
-Name of your Azure container registry.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `acrAdminUserEnabled`
-
-Enable admin user that have push / pull permission to the registry.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `acrSku`
-
-Tier of your Azure container registry.
-
-- Required: No
-- Type: string
-- Default: `'Basic'`
-- Allowed:
- ```Bicep
- [
- 'Basic'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `anonymousPullEnabled`
-
-Enables registry-wide pull from unauthenticated clients. It's in preview and available in the Standard and Premium service tiers.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `azureADAuthenticationAsArmPolicyStatus`
-
-The value that indicates whether the policy for using ARM audience token for a container registr is enabled or not. Default is enabled.
-
-- Required: No
-- Type: string
-- Default: `'enabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `cacheRules`
-
-Array of Cache Rules. Note: This is a preview feature ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache#cache-for-acr-preview)).
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `dataEndpointEnabled`
-
-Enable a single data endpoint per region for serving data. Not relevant in case of disabled public access. Note, requires the 'acrSku' to be 'Premium'.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exportPolicyStatus`
-
-The value that indicates whether the export policy is enabled or not.
-
-- Required: No
-- Type: string
-- Default: `'disabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `networkRuleBypassOptions`
-
-Whether to allow trusted Azure services to access a network restricted registry.
-
-- Required: No
-- Type: string
-- Default: `'AzureServices'`
-- Allowed:
- ```Bicep
- [
- 'AzureServices'
- 'None'
- ]
- ```
-
-### Parameter: `networkRuleSetDefaultAction`
-
-The default action of allow or deny when no other rules match.
-
-- Required: No
-- Type: string
-- Default: `'Deny'`
-- Allowed:
- ```Bicep
- [
- 'Allow'
- 'Deny'
- ]
- ```
-
-### Parameter: `networkRuleSetIpRules`
-
-The IP ACL rules. Note, requires the 'acrSku' to be 'Premium'.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the 'acrSku' to be 'Premium'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the 'acrSku' to be 'Premium'.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `quarantinePolicyStatus`
-
-The value that indicates whether the quarantine policy is enabled or not.
-
-- Required: No
-- Type: string
-- Default: `'disabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `replications`
-
-All replications to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `retentionPolicyDays`
-
-The number of days to retain an untagged manifest after which it gets purged.
-
-- Required: No
-- Type: int
-- Default: `15`
-
-### Parameter: `retentionPolicyStatus`
-
-The value that indicates whether the retention policy is enabled or not.
-
-- Required: No
-- Type: string
-- Default: `'enabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `softDeletePolicyDays`
-
-The number of days after which a soft-deleted item is permanently deleted.
-
-- Required: No
-- Type: int
-- Default: `7`
-
-### Parameter: `softDeletePolicyStatus`
-
-Soft Delete policy status. Default is disabled.
-
-- Required: No
-- Type: string
-- Default: `'disabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `trustPolicyStatus`
-
-The value that indicates whether the trust policy is enabled or not.
-
-- Required: No
-- Type: string
-- Default: `'disabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `webhooks`
-
-All webhooks to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `zoneRedundancy`
-
-Whether or not zone redundancy is enabled for this container registry.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `loginServer` | string | The reference to the Azure container registry. |
-| `name` | string | The Name of the Azure container registry. |
-| `resourceGroupName` | string | The name of the Azure container registry. |
-| `resourceId` | string | The resource ID of the Azure container registry. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/container-registry/registry/cache-rules/README.md b/modules/container-registry/registry/cache-rules/README.md
deleted file mode 100644
index 9e9dd03dda..0000000000
--- a/modules/container-registry/registry/cache-rules/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
-# Container Registries Cache `[Microsoft.ContainerRegistry/registries/cacheRules]`
-
-Cache for Azure Container Registry (Preview) feature allows users to cache container images in a private container registry. Cache for ACR, is a preview feature available in Basic, Standard, and Premium service tiers ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache)).
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ContainerRegistry/registries/cacheRules` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries/cacheRules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`registryName`](#parameter-registryname) | string | The name of the parent registry. Required if the template is used in a standalone deployment. |
-| [`sourceRepository`](#parameter-sourcerepository) | string | Source repository pulled from upstream. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`credentialSetResourceId`](#parameter-credentialsetresourceid) | string | The resource ID of the credential store which is associated with the cache rule. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`name`](#parameter-name) | string | The name of the cache rule. Will be dereived from the source repository name if not defined. |
-| [`targetRepository`](#parameter-targetrepository) | string | Target repository specified in docker pull command. E.g.: docker pull myregistry.azurecr.io/{targetRepository}:{tag}. |
-
-### Parameter: `registryName`
-
-The name of the parent registry. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `sourceRepository`
-
-Source repository pulled from upstream.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `credentialSetResourceId`
-
-The resource ID of the credential store which is associated with the cache rule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `name`
-
-The name of the cache rule. Will be dereived from the source repository name if not defined.
-
-- Required: No
-- Type: string
-- Default: `[replace(replace(parameters('sourceRepository'), '/', '-'), '.', '-')]`
-
-### Parameter: `targetRepository`
-
-Target repository specified in docker pull command. E.g.: docker pull myregistry.azurecr.io/{targetRepository}:{tag}.
-
-- Required: No
-- Type: string
-- Default: `[parameters('sourceRepository')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The Name of the Cache Rule. |
-| `resourceGroupName` | string | The name of the Cache Rule. |
-| `resourceId` | string | The resource ID of the Cache Rule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/container-registry/registry/cache-rules/main.bicep b/modules/container-registry/registry/cache-rules/main.bicep
deleted file mode 100644
index 7b263e5407..0000000000
--- a/modules/container-registry/registry/cache-rules/main.bicep
+++ /dev/null
@@ -1,56 +0,0 @@
-metadata name = 'Container Registries Cache'
-metadata description = 'Cache for Azure Container Registry (Preview) feature allows users to cache container images in a private container registry. Cache for ACR, is a preview feature available in Basic, Standard, and Premium service tiers ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache)).'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the parent registry. Required if the template is used in a standalone deployment.')
-param registryName string
-
-@description('Optional. The name of the cache rule. Will be dereived from the source repository name if not defined.')
-param name string = replace(replace(sourceRepository, '/', '-'), '.', '-')
-
-@description('Required. Source repository pulled from upstream.')
-param sourceRepository string
-
-@description('Optional. Target repository specified in docker pull command. E.g.: docker pull myregistry.azurecr.io/{targetRepository}:{tag}.')
-param targetRepository string = sourceRepository
-
-@description('Optional. The resource ID of the credential store which is associated with the cache rule.')
-param credentialSetResourceId string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource registry 'Microsoft.ContainerRegistry/registries@2023-06-01-preview' existing = {
- name: registryName
-}
-
-resource cacheRule 'Microsoft.ContainerRegistry/registries/cacheRules@2023-06-01-preview' = {
- name: name
- parent: registry
- properties: {
- sourceRepository: sourceRepository
- targetRepository: targetRepository
- credentialSetResourceId: !empty(credentialSetResourceId) ? credentialSetResourceId : null
- }
-}
-
-@description('The Name of the Cache Rule.')
-output name string = cacheRule.name
-
-@description('The name of the Cache Rule.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The resource ID of the Cache Rule.')
-output resourceId string = cacheRule.id
diff --git a/modules/container-registry/registry/cache-rules/main.json b/modules/container-registry/registry/cache-rules/main.json
deleted file mode 100644
index 05e6d97ffd..0000000000
--- a/modules/container-registry/registry/cache-rules/main.json
+++ /dev/null
@@ -1,105 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "6694265508496204217"
- },
- "name": "Container Registries Cache",
- "description": "Cache for Azure Container Registry (Preview) feature allows users to cache container images in a private container registry. Cache for ACR, is a preview feature available in Basic, Standard, and Premium service tiers ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache)).",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "registryName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent registry. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "[replace(replace(parameters('sourceRepository'), '/', '-'), '.', '-')]",
- "metadata": {
- "description": "Optional. The name of the cache rule. Will be dereived from the source repository name if not defined."
- }
- },
- "sourceRepository": {
- "type": "string",
- "metadata": {
- "description": "Required. Source repository pulled from upstream."
- }
- },
- "targetRepository": {
- "type": "string",
- "defaultValue": "[parameters('sourceRepository')]",
- "metadata": {
- "description": "Optional. Target repository specified in docker pull command. E.g.: docker pull myregistry.azurecr.io/{targetRepository}:{tag}."
- }
- },
- "credentialSetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the credential store which is associated with the cache rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ContainerRegistry/registries/cacheRules",
- "apiVersion": "2023-06-01-preview",
- "name": "[format('{0}/{1}', parameters('registryName'), parameters('name'))]",
- "properties": {
- "sourceRepository": "[parameters('sourceRepository')]",
- "targetRepository": "[parameters('targetRepository')]",
- "credentialSetResourceId": "[if(not(empty(parameters('credentialSetResourceId'))), parameters('credentialSetResourceId'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the Cache Rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Cache Rule."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Cache Rule."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries/cacheRules', parameters('registryName'), parameters('name'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-registry/registry/cache-rules/version.json b/modules/container-registry/registry/cache-rules/version.json
deleted file mode 100644
index cceb46e9bf..0000000000
--- a/modules/container-registry/registry/cache-rules/version.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "1.0",
- "pathFilters": [
- "./main.json",
- "./metadata.json"
- ]
-}
diff --git a/modules/container-registry/registry/main.bicep b/modules/container-registry/registry/main.bicep
deleted file mode 100644
index ff38067ac0..0000000000
--- a/modules/container-registry/registry/main.bicep
+++ /dev/null
@@ -1,543 +0,0 @@
-metadata name = 'Azure Container Registries (ACR)'
-metadata description = 'This module deploys an Azure Container Registry (ACR).'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of your Azure container registry.')
-@minLength(5)
-@maxLength(50)
-param name string
-
-@description('Optional. Enable admin user that have push / pull permission to the registry.')
-param acrAdminUserEnabled bool = false
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tier of your Azure container registry.')
-@allowed([
- 'Basic'
- 'Premium'
- 'Standard'
-])
-param acrSku string = 'Basic'
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. The value that indicates whether the export policy is enabled or not.')
-param exportPolicyStatus string = 'disabled'
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. The value that indicates whether the quarantine policy is enabled or not.')
-param quarantinePolicyStatus string = 'disabled'
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. The value that indicates whether the trust policy is enabled or not.')
-param trustPolicyStatus string = 'disabled'
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. The value that indicates whether the retention policy is enabled or not.')
-param retentionPolicyStatus string = 'enabled'
-
-@description('Optional. The number of days to retain an untagged manifest after which it gets purged.')
-param retentionPolicyDays int = 15
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. The value that indicates whether the policy for using ARM audience token for a container registr is enabled or not. Default is enabled.')
-param azureADAuthenticationAsArmPolicyStatus string = 'enabled'
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. Soft Delete policy status. Default is disabled.')
-param softDeletePolicyStatus string = 'disabled'
-
-@description('Optional. The number of days after which a soft-deleted item is permanently deleted.')
-param softDeletePolicyDays int = 7
-
-@description('Optional. Enable a single data endpoint per region for serving data. Not relevant in case of disabled public access. Note, requires the \'acrSku\' to be \'Premium\'.')
-param dataEndpointEnabled bool = false
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the \'acrSku\' to be \'Premium\'.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@allowed([
- 'AzureServices'
- 'None'
-])
-@description('Optional. Whether to allow trusted Azure services to access a network restricted registry.')
-param networkRuleBypassOptions string = 'AzureServices'
-
-@allowed([
- 'Allow'
- 'Deny'
-])
-@description('Optional. The default action of allow or deny when no other rules match.')
-param networkRuleSetDefaultAction string = 'Deny'
-
-@description('Optional. The IP ACL rules. Note, requires the \'acrSku\' to be \'Premium\'.')
-param networkRuleSetIpRules array = []
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the \'acrSku\' to be \'Premium\'.')
-param privateEndpoints privateEndpointType
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether or not zone redundancy is enabled for this container registry.')
-param zoneRedundancy string = 'Disabled'
-
-@description('Optional. All replications to create.')
-param replications array = []
-
-@description('Optional. All webhooks to create.')
-param webhooks array = []
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Enables registry-wide pull from unauthenticated clients. It\'s in preview and available in the Standard and Premium service tiers.')
-param anonymousPullEnabled bool = false
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. Array of Cache Rules. Note: This is a preview feature ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache#cache-for-acr-preview)).')
-param cacheRules array = []
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- AcrDelete: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c2f4ef07-c644-48eb-af81-4b1b4947fb11')
- AcrImageSigner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '6cef56e8-d556-48e5-a04f-b8e64114680f')
- AcrPull: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d')
- AcrPush: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8311e382-0749-4cb8-b61a-304f252e45ec')
- AcrQuarantineReader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'cdda3590-29a3-44f6-95f2-9f980659eb04')
- AcrQuarantineWriter: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c8d4ff99-41c3-41a8-9f60-21dfdad59608')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource registry 'Microsoft.ContainerRegistry/registries@2023-06-01-preview' = {
- name: name
- location: location
- identity: identity
- tags: tags
- sku: {
- name: acrSku
- }
- properties: {
- anonymousPullEnabled: anonymousPullEnabled
- adminUserEnabled: acrAdminUserEnabled
- encryption: !empty(customerManagedKey) ? {
- status: 'enabled'
- keyVaultProperties: {
- identity: !empty(customerManagedKey.?userAssignedIdentityResourceId ?? '') ? cMKUserAssignedIdentity.properties.clientId : null
- keyIdentifier: !empty(customerManagedKey.?keyVersion ?? '') ? '${cMKKeyVault::cMKKey.properties.keyUri}/${customerManagedKey!.keyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- }
- } : null
- policies: {
- azureADAuthenticationAsArmPolicy: {
- status: azureADAuthenticationAsArmPolicyStatus
- }
- exportPolicy: acrSku == 'Premium' ? {
- status: exportPolicyStatus
- } : null
- quarantinePolicy: {
- status: quarantinePolicyStatus
- }
- trustPolicy: {
- type: 'Notary'
- status: trustPolicyStatus
- }
- retentionPolicy: acrSku == 'Premium' ? {
- days: retentionPolicyDays
- status: retentionPolicyStatus
- } : null
- softDeletePolicy: {
- retentionDays: softDeletePolicyDays
- status: softDeletePolicyStatus
- }
- }
- dataEndpointEnabled: dataEndpointEnabled
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) && empty(networkRuleSetIpRules) ? 'Disabled' : null)
- networkRuleBypassOptions: networkRuleBypassOptions
- networkRuleSet: !empty(networkRuleSetIpRules) ? {
- defaultAction: networkRuleSetDefaultAction
- ipRules: networkRuleSetIpRules
- } : null
- zoneRedundancy: acrSku == 'Premium' ? zoneRedundancy : null
- }
-}
-
-module registry_replications 'replication/main.bicep' = [for (replication, index) in replications: {
- name: '${uniqueString(deployment().name, location)}-Registry-Replication-${index}'
- params: {
- name: replication.name
- registryName: registry.name
- location: replication.location
- regionEndpointEnabled: contains(replication, 'regionEndpointEnabled') ? replication.regionEndpointEnabled : true
- zoneRedundancy: contains(replication, 'zoneRedundancy') ? replication.zoneRedundancy : 'Disabled'
- tags: replication.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module registry_cacheRules 'cache-rules/main.bicep' = [for (cacheRule, index) in cacheRules: {
- name: '${uniqueString(deployment().name, location)}-Registry-Cache-${index}'
- params: {
- registryName: registry.name
- sourceRepository: cacheRule.sourceRepository
- name: contains(cacheRule, 'name') ? cacheRule.name : replace(replace(cacheRule.sourceRepository, '/', '-'), '.', '-')
- targetRepository: contains(cacheRule, 'targetRepository') ? cacheRule.targetRepository : cacheRule.sourceRepository
- credentialSetResourceId: contains(cacheRule, 'credentialSetResourceId') ? cacheRule.credentialSetResourceId : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module registry_webhooks 'webhook/main.bicep' = [for (webhook, index) in webhooks: {
- name: '${uniqueString(deployment().name, location)}-Registry-Webhook-${index}'
- params: {
- name: webhook.name
- registryName: registry.name
- location: contains(webhook, 'location') ? webhook.location : location
- action: contains(webhook, 'action') ? webhook.action : [
- 'chart_delete'
- 'chart_push'
- 'delete'
- 'push'
- 'quarantine'
- ]
- customHeaders: contains(webhook, 'customHeaders') ? webhook.customHeaders : {}
- scope: contains(webhook, 'scope') ? webhook.scope : ''
- status: contains(webhook, 'status') ? webhook.status : 'enabled'
- serviceUri: webhook.serviceUri
- tags: webhook.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource registry_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: registry
-}
-
-resource registry_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: registry
-}]
-
-resource registry_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(registry.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: registry
-}]
-
-module registry_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-registry-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'registry'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(registry.id, '/'))}-${privateEndpoint.?service ?? 'registry'}-${index}'
- serviceResourceId: registry.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The Name of the Azure container registry.')
-output name string = registry.name
-
-@description('The reference to the Azure container registry.')
-output loginServer string = reference(registry.id, '2019-05-01').loginServer
-
-@description('The name of the Azure container registry.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The resource ID of the Azure container registry.')
-output resourceId string = registry.id
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(registry.identity, 'principalId') ? registry.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = registry.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/container-registry/registry/main.json b/modules/container-registry/registry/main.json
deleted file mode 100644
index 39a04d3a66..0000000000
--- a/modules/container-registry/registry/main.json
+++ /dev/null
@@ -1,2058 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6862455028328660677"
- },
- "name": "Azure Container Registries (ACR)",
- "description": "This module deploys an Azure Container Registry (ACR).",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 5,
- "maxLength": 50,
- "metadata": {
- "description": "Required. Name of your Azure container registry."
- }
- },
- "acrAdminUserEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Enable admin user that have push / pull permission to the registry."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "acrSku": {
- "type": "string",
- "defaultValue": "Basic",
- "allowedValues": [
- "Basic",
- "Premium",
- "Standard"
- ],
- "metadata": {
- "description": "Optional. Tier of your Azure container registry."
- }
- },
- "exportPolicyStatus": {
- "type": "string",
- "defaultValue": "disabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The value that indicates whether the export policy is enabled or not."
- }
- },
- "quarantinePolicyStatus": {
- "type": "string",
- "defaultValue": "disabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The value that indicates whether the quarantine policy is enabled or not."
- }
- },
- "trustPolicyStatus": {
- "type": "string",
- "defaultValue": "disabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The value that indicates whether the trust policy is enabled or not."
- }
- },
- "retentionPolicyStatus": {
- "type": "string",
- "defaultValue": "enabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The value that indicates whether the retention policy is enabled or not."
- }
- },
- "retentionPolicyDays": {
- "type": "int",
- "defaultValue": 15,
- "metadata": {
- "description": "Optional. The number of days to retain an untagged manifest after which it gets purged."
- }
- },
- "azureADAuthenticationAsArmPolicyStatus": {
- "type": "string",
- "defaultValue": "enabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The value that indicates whether the policy for using ARM audience token for a container registr is enabled or not. Default is enabled."
- }
- },
- "softDeletePolicyStatus": {
- "type": "string",
- "defaultValue": "disabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. Soft Delete policy status. Default is disabled."
- }
- },
- "softDeletePolicyDays": {
- "type": "int",
- "defaultValue": 7,
- "metadata": {
- "description": "Optional. The number of days after which a soft-deleted item is permanently deleted."
- }
- },
- "dataEndpointEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Enable a single data endpoint per region for serving data. Not relevant in case of disabled public access. Note, requires the 'acrSku' to be 'Premium'."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the 'acrSku' to be 'Premium'."
- }
- },
- "networkRuleBypassOptions": {
- "type": "string",
- "defaultValue": "AzureServices",
- "allowedValues": [
- "AzureServices",
- "None"
- ],
- "metadata": {
- "description": "Optional. Whether to allow trusted Azure services to access a network restricted registry."
- }
- },
- "networkRuleSetDefaultAction": {
- "type": "string",
- "defaultValue": "Deny",
- "allowedValues": [
- "Allow",
- "Deny"
- ],
- "metadata": {
- "description": "Optional. The default action of allow or deny when no other rules match."
- }
- },
- "networkRuleSetIpRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The IP ACL rules. Note, requires the 'acrSku' to be 'Premium'."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the 'acrSku' to be 'Premium'."
- }
- },
- "zoneRedundancy": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not zone redundancy is enabled for this container registry."
- }
- },
- "replications": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. All replications to create."
- }
- },
- "webhooks": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. All webhooks to create."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "anonymousPullEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Enables registry-wide pull from unauthenticated clients. It's in preview and available in the Standard and Premium service tiers."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "cacheRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of Cache Rules. Note: This is a preview feature ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache#cache-for-acr-preview))."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "AcrDelete": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c2f4ef07-c644-48eb-af81-4b1b4947fb11')]",
- "AcrImageSigner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '6cef56e8-d556-48e5-a04f-b8e64114680f')]",
- "AcrPull": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d')]",
- "AcrPush": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8311e382-0749-4cb8-b61a-304f252e45ec')]",
- "AcrQuarantineReader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'cdda3590-29a3-44f6-95f2-9f980659eb04')]",
- "AcrQuarantineWriter": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c8d4ff99-41c3-41a8-9f60-21dfdad59608')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "registry": {
- "type": "Microsoft.ContainerRegistry/registries",
- "apiVersion": "2023-06-01-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('acrSku')]"
- },
- "properties": {
- "anonymousPullEnabled": "[parameters('anonymousPullEnabled')]",
- "adminUserEnabled": "[parameters('acrAdminUserEnabled')]",
- "encryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('status', 'enabled', 'keyVaultProperties', createObject('identity', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), ''))), reference('cMKUserAssignedIdentity').clientId, null()), 'keyIdentifier', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('customerManagedKey').keyVersion), reference('cMKKeyVault::cMKKey').keyUriWithVersion))), null())]",
- "policies": {
- "azureADAuthenticationAsArmPolicy": {
- "status": "[parameters('azureADAuthenticationAsArmPolicyStatus')]"
- },
- "exportPolicy": "[if(equals(parameters('acrSku'), 'Premium'), createObject('status', parameters('exportPolicyStatus')), null())]",
- "quarantinePolicy": {
- "status": "[parameters('quarantinePolicyStatus')]"
- },
- "trustPolicy": {
- "type": "Notary",
- "status": "[parameters('trustPolicyStatus')]"
- },
- "retentionPolicy": "[if(equals(parameters('acrSku'), 'Premium'), createObject('days', parameters('retentionPolicyDays'), 'status', parameters('retentionPolicyStatus')), null())]",
- "softDeletePolicy": {
- "retentionDays": "[parameters('softDeletePolicyDays')]",
- "status": "[parameters('softDeletePolicyStatus')]"
- }
- },
- "dataEndpointEnabled": "[parameters('dataEndpointEnabled')]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('networkRuleSetIpRules'))), 'Disabled', null()))]",
- "networkRuleBypassOptions": "[parameters('networkRuleBypassOptions')]",
- "networkRuleSet": "[if(not(empty(parameters('networkRuleSetIpRules'))), createObject('defaultAction', parameters('networkRuleSetDefaultAction'), 'ipRules', parameters('networkRuleSetIpRules')), null())]",
- "zoneRedundancy": "[if(equals(parameters('acrSku'), 'Premium'), parameters('zoneRedundancy'), null())]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "registry_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.ContainerRegistry/registries/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "registry"
- ]
- },
- "registry_diagnosticSettings": {
- "copy": {
- "name": "registry_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.ContainerRegistry/registries/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "registry"
- ]
- },
- "registry_roleAssignments": {
- "copy": {
- "name": "registry_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.ContainerRegistry/registries/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.ContainerRegistry/registries', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "registry"
- ]
- },
- "registry_replications": {
- "copy": {
- "name": "registry_replications",
- "count": "[length(parameters('replications'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Registry-Replication-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('replications')[copyIndex()].name]"
- },
- "registryName": {
- "value": "[parameters('name')]"
- },
- "location": {
- "value": "[parameters('replications')[copyIndex()].location]"
- },
- "regionEndpointEnabled": "[if(contains(parameters('replications')[copyIndex()], 'regionEndpointEnabled'), createObject('value', parameters('replications')[copyIndex()].regionEndpointEnabled), createObject('value', true()))]",
- "zoneRedundancy": "[if(contains(parameters('replications')[copyIndex()], 'zoneRedundancy'), createObject('value', parameters('replications')[copyIndex()].zoneRedundancy), createObject('value', 'Disabled'))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('replications')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17278738816613868587"
- },
- "name": "Azure Container Registry (ACR) Replications",
- "description": "This module deploys an Azure Container Registry (ACR) Replication.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "registryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent registry. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the replication."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "regionEndpointEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications."
- }
- },
- "zoneRedundancy": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not zone redundancy is enabled for this container registry."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "registry": {
- "existing": true,
- "type": "Microsoft.ContainerRegistry/registries",
- "apiVersion": "2023-06-01-preview",
- "name": "[parameters('registryName')]"
- },
- "replication": {
- "type": "Microsoft.ContainerRegistry/registries/replications",
- "apiVersion": "2023-06-01-preview",
- "name": "[format('{0}/{1}', parameters('registryName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "regionEndpointEnabled": "[parameters('regionEndpointEnabled')]",
- "zoneRedundancy": "[parameters('zoneRedundancy')]"
- },
- "dependsOn": [
- "registry"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the replication."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the replication."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries/replications', parameters('registryName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the replication was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('replication', '2023-06-01-preview', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "registry"
- ]
- },
- "registry_cacheRules": {
- "copy": {
- "name": "registry_cacheRules",
- "count": "[length(parameters('cacheRules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Registry-Cache-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "registryName": {
- "value": "[parameters('name')]"
- },
- "sourceRepository": {
- "value": "[parameters('cacheRules')[copyIndex()].sourceRepository]"
- },
- "name": "[if(contains(parameters('cacheRules')[copyIndex()], 'name'), createObject('value', parameters('cacheRules')[copyIndex()].name), createObject('value', replace(replace(parameters('cacheRules')[copyIndex()].sourceRepository, '/', '-'), '.', '-')))]",
- "targetRepository": "[if(contains(parameters('cacheRules')[copyIndex()], 'targetRepository'), createObject('value', parameters('cacheRules')[copyIndex()].targetRepository), createObject('value', parameters('cacheRules')[copyIndex()].sourceRepository))]",
- "credentialSetResourceId": "[if(contains(parameters('cacheRules')[copyIndex()], 'credentialSetResourceId'), createObject('value', parameters('cacheRules')[copyIndex()].credentialSetResourceId), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "9350283035071510554"
- },
- "name": "Container Registries Cache",
- "description": "Cache for Azure Container Registry (Preview) feature allows users to cache container images in a private container registry. Cache for ACR, is a preview feature available in Basic, Standard, and Premium service tiers ([ref](https://learn.microsoft.com/en-us/azure/container-registry/tutorial-registry-cache)).",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "registryName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent registry. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "[replace(replace(parameters('sourceRepository'), '/', '-'), '.', '-')]",
- "metadata": {
- "description": "Optional. The name of the cache rule. Will be dereived from the source repository name if not defined."
- }
- },
- "sourceRepository": {
- "type": "string",
- "metadata": {
- "description": "Required. Source repository pulled from upstream."
- }
- },
- "targetRepository": {
- "type": "string",
- "defaultValue": "[parameters('sourceRepository')]",
- "metadata": {
- "description": "Optional. Target repository specified in docker pull command. E.g.: docker pull myregistry.azurecr.io/{targetRepository}:{tag}."
- }
- },
- "credentialSetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the credential store which is associated with the cache rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ContainerRegistry/registries/cacheRules",
- "apiVersion": "2023-06-01-preview",
- "name": "[format('{0}/{1}', parameters('registryName'), parameters('name'))]",
- "properties": {
- "sourceRepository": "[parameters('sourceRepository')]",
- "targetRepository": "[parameters('targetRepository')]",
- "credentialSetResourceId": "[if(not(empty(parameters('credentialSetResourceId'))), parameters('credentialSetResourceId'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the Cache Rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Cache Rule."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Cache Rule."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries/cacheRules', parameters('registryName'), parameters('name'))]"
- }
- }
- }
- },
- "dependsOn": [
- "registry"
- ]
- },
- "registry_webhooks": {
- "copy": {
- "name": "registry_webhooks",
- "count": "[length(parameters('webhooks'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Registry-Webhook-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('webhooks')[copyIndex()].name]"
- },
- "registryName": {
- "value": "[parameters('name')]"
- },
- "location": "[if(contains(parameters('webhooks')[copyIndex()], 'location'), createObject('value', parameters('webhooks')[copyIndex()].location), createObject('value', parameters('location')))]",
- "action": "[if(contains(parameters('webhooks')[copyIndex()], 'action'), createObject('value', parameters('webhooks')[copyIndex()].action), createObject('value', createArray('chart_delete', 'chart_push', 'delete', 'push', 'quarantine')))]",
- "customHeaders": "[if(contains(parameters('webhooks')[copyIndex()], 'customHeaders'), createObject('value', parameters('webhooks')[copyIndex()].customHeaders), createObject('value', createObject()))]",
- "scope": "[if(contains(parameters('webhooks')[copyIndex()], 'scope'), createObject('value', parameters('webhooks')[copyIndex()].scope), createObject('value', ''))]",
- "status": "[if(contains(parameters('webhooks')[copyIndex()], 'status'), createObject('value', parameters('webhooks')[copyIndex()].status), createObject('value', 'enabled'))]",
- "serviceUri": {
- "value": "[parameters('webhooks')[copyIndex()].serviceUri]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('webhooks')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4878566967080590991"
- },
- "name": "Azure Container Registry (ACR) Webhooks",
- "description": "This module deploys an Azure Container Registry (ACR) Webhook.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "registryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent registry. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}webhook', parameters('registryName'))]",
- "minLength": 5,
- "maxLength": 50,
- "metadata": {
- "description": "Optional. The name of the registry webhook."
- }
- },
- "serviceUri": {
- "type": "string",
- "metadata": {
- "description": "Required. The service URI for the webhook to post notifications."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "enabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The status of the webhook at the time the operation was called."
- }
- },
- "action": {
- "type": "array",
- "defaultValue": [
- "chart_delete",
- "chart_push",
- "delete",
- "push",
- "quarantine"
- ],
- "metadata": {
- "description": "Optional. The list of actions that trigger the webhook to post notifications."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "customHeaders": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Custom headers that will be added to the webhook notifications."
- }
- },
- "scope": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "registry": {
- "existing": true,
- "type": "Microsoft.ContainerRegistry/registries",
- "apiVersion": "2023-06-01-preview",
- "name": "[parameters('registryName')]"
- },
- "webhook": {
- "type": "Microsoft.ContainerRegistry/registries/webhooks",
- "apiVersion": "2023-06-01-preview",
- "name": "[format('{0}/{1}', parameters('registryName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "actions": "[parameters('action')]",
- "customHeaders": "[parameters('customHeaders')]",
- "scope": "[parameters('scope')]",
- "serviceUri": "[parameters('serviceUri')]",
- "status": "[parameters('status')]"
- },
- "dependsOn": [
- "registry"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the webhook."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries/webhooks', parameters('registryName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the webhook."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Azure container registry."
- },
- "value": "[resourceGroup().name]"
- },
- "actions": {
- "type": "array",
- "metadata": {
- "description": "The actions of the webhook."
- },
- "value": "[reference('webhook').actions]"
- },
- "status": {
- "type": "string",
- "metadata": {
- "description": "The status of the webhook."
- },
- "value": "[reference('webhook').status]"
- },
- "provistioningState": {
- "type": "string",
- "metadata": {
- "description": "The provisioning state of the webhook."
- },
- "value": "[reference('webhook').provisioningState]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('webhook', '2023-06-01-preview', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "registry"
- ]
- },
- "registry_privateEndpoints": {
- "copy": {
- "name": "registry_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-registry-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'registry')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.ContainerRegistry/registries', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'registry'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.ContainerRegistry/registries', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "registry"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the Azure container registry."
- },
- "value": "[parameters('name')]"
- },
- "loginServer": {
- "type": "string",
- "metadata": {
- "description": "The reference to the Azure container registry."
- },
- "value": "[reference(resourceId('Microsoft.ContainerRegistry/registries', parameters('name')), '2019-05-01').loginServer]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Azure container registry."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Azure container registry."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries', parameters('name'))]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('registry', '2023-06-01-preview', 'full').identity, 'principalId')), reference('registry', '2023-06-01-preview', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('registry', '2023-06-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-registry/registry/replication/README.md b/modules/container-registry/registry/replication/README.md
deleted file mode 100644
index 6f7f21c1f1..0000000000
--- a/modules/container-registry/registry/replication/README.md
+++ /dev/null
@@ -1,114 +0,0 @@
-# Azure Container Registry (ACR) Replications `[Microsoft.ContainerRegistry/registries/replications]`
-
-This module deploys an Azure Container Registry (ACR) Replication.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ContainerRegistry/registries/replications` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries/replications) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the replication. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`registryName`](#parameter-registryname) | string | The name of the parent registry. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`regionEndpointEnabled`](#parameter-regionendpointenabled) | bool | Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`zoneRedundancy`](#parameter-zoneredundancy) | string | Whether or not zone redundancy is enabled for this container registry. |
-
-### Parameter: `name`
-
-The name of the replication.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `registryName`
-
-The name of the parent registry. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `regionEndpointEnabled`
-
-Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `zoneRedundancy`
-
-Whether or not zone redundancy is enabled for this container registry.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the replication. |
-| `resourceGroupName` | string | The name of the resource group the replication was created in. |
-| `resourceId` | string | The resource ID of the replication. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/container-registry/registry/replication/main.bicep b/modules/container-registry/registry/replication/main.bicep
deleted file mode 100644
index a382a85fc0..0000000000
--- a/modules/container-registry/registry/replication/main.bicep
+++ /dev/null
@@ -1,67 +0,0 @@
-metadata name = 'Azure Container Registry (ACR) Replications'
-metadata description = 'This module deploys an Azure Container Registry (ACR) Replication.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent registry. Required if the template is used in a standalone deployment.')
-param registryName string
-
-@description('Required. The name of the replication.')
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications.')
-param regionEndpointEnabled bool = true
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Whether or not zone redundancy is enabled for this container registry.')
-param zoneRedundancy string = 'Disabled'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource registry 'Microsoft.ContainerRegistry/registries@2023-06-01-preview' existing = {
- name: registryName
-}
-
-resource replication 'Microsoft.ContainerRegistry/registries/replications@2023-06-01-preview' = {
- name: name
- parent: registry
- location: location
- tags: tags
- properties: {
- regionEndpointEnabled: regionEndpointEnabled
- zoneRedundancy: zoneRedundancy
- }
-}
-
-@description('The name of the replication.')
-output name string = replication.name
-
-@description('The resource ID of the replication.')
-output resourceId string = replication.id
-
-@description('The name of the resource group the replication was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = replication.location
diff --git a/modules/container-registry/registry/replication/main.json b/modules/container-registry/registry/replication/main.json
deleted file mode 100644
index 599a9db03f..0000000000
--- a/modules/container-registry/registry/replication/main.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12719783741437890545"
- },
- "name": "Azure Container Registry (ACR) Replications",
- "description": "This module deploys an Azure Container Registry (ACR) Replication.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "registryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent registry. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the replication."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "regionEndpointEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether the replication regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications."
- }
- },
- "zoneRedundancy": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not zone redundancy is enabled for this container registry."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "registry": {
- "existing": true,
- "type": "Microsoft.ContainerRegistry/registries",
- "apiVersion": "2023-06-01-preview",
- "name": "[parameters('registryName')]"
- },
- "replication": {
- "type": "Microsoft.ContainerRegistry/registries/replications",
- "apiVersion": "2023-06-01-preview",
- "name": "[format('{0}/{1}', parameters('registryName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "regionEndpointEnabled": "[parameters('regionEndpointEnabled')]",
- "zoneRedundancy": "[parameters('zoneRedundancy')]"
- },
- "dependsOn": [
- "registry"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the replication."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the replication."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries/replications', parameters('registryName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the replication was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('replication', '2023-06-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-registry/registry/replication/version.json b/modules/container-registry/registry/replication/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/container-registry/registry/replication/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/container-registry/registry/tests/e2e/defaults/main.test.bicep b/modules/container-registry/registry/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 648869f165..0000000000
--- a/modules/container-registry/registry/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${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 = 'crrmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/container-registry/registry/tests/e2e/encr/dependencies.bicep b/modules/container-registry/registry/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index 2a44c0d13c..0000000000
--- a/modules/container-registry/registry/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,87 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- // Key Vault Crypto User
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The name of the Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
diff --git a/modules/container-registry/registry/tests/e2e/encr/main.test.bicep b/modules/container-registry/registry/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index b24ad4c628..0000000000
--- a/modules/container-registry/registry/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,77 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${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 = 'crrencr'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- acrSku: 'Premium'
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- publicNetworkAccess: 'Disabled'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-registry/registry/tests/e2e/max/dependencies.bicep b/modules/container-registry/registry/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 4e89a810a0..0000000000
--- a/modules/container-registry/registry/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,99 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink${environment().suffixes.acrLoginServer}'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
diff --git a/modules/container-registry/registry/tests/e2e/max/main.test.bicep b/modules/container-registry/registry/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 767cc9ee2e..0000000000
--- a/modules/container-registry/registry/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,171 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${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 = 'crrmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- location: location
- managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- acrAdminUserEnabled: false
- acrSku: 'Premium'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- exportPolicyStatus: 'enabled'
- azureADAuthenticationAsArmPolicyStatus: 'enabled'
- softDeletePolicyStatus: 'disabled'
- softDeletePolicyDays: 7
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- service: 'registry'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- networkRuleSetIpRules: [
- {
- action: 'Allow'
- value: '40.74.28.0/23'
- }
- ]
- quarantinePolicyStatus: 'enabled'
- replications: [
- {
- location: nestedDependencies.outputs.pairedRegionName
- name: nestedDependencies.outputs.pairedRegionName
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- trustPolicyStatus: 'enabled'
- cacheRules: [
- {
- name: 'customRule'
- sourceRepository: 'docker.io/library/hello-world'
- targetRepository: 'cached-docker-hub/hello-world'
- }
- {
- sourceRepository: 'docker.io/library/hello-world'
- }
- ]
- webhooks: [
- {
- name: '${namePrefix}acrx001webhook'
- serviceUri: 'https://www.contoso.com/webhook'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-registry/registry/tests/e2e/pe/dependencies.bicep b/modules/container-registry/registry/tests/e2e/pe/dependencies.bicep
deleted file mode 100644
index 0422180c41..0000000000
--- a/modules/container-registry/registry/tests/e2e/pe/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink${environment().suffixes.acrLoginServer}'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/container-registry/registry/tests/e2e/pe/main.test.bicep b/modules/container-registry/registry/tests/e2e/pe/main.test.bicep
deleted file mode 100644
index ead4de2de4..0000000000
--- a/modules/container-registry/registry/tests/e2e/pe/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${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 = 'crrpe'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- acrSku: 'Premium'
- privateEndpoints: [
- {
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-registry/registry/tests/e2e/waf-aligned/dependencies.bicep b/modules/container-registry/registry/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 4e89a810a0..0000000000
--- a/modules/container-registry/registry/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,99 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink${environment().suffixes.acrLoginServer}'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
diff --git a/modules/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep b/modules/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 7f6dd675d7..0000000000
--- a/modules/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,154 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${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 = 'crrwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- location: location
- managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- acrAdminUserEnabled: false
- acrSku: 'Premium'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- exportPolicyStatus: 'enabled'
- azureADAuthenticationAsArmPolicyStatus: 'enabled'
- softDeletePolicyStatus: 'disabled'
- softDeletePolicyDays: 7
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- service: 'registry'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- networkRuleSetIpRules: [
- {
- action: 'Allow'
- value: '40.74.28.0/23'
- }
- ]
- quarantinePolicyStatus: 'enabled'
- replications: [
- {
- location: nestedDependencies.outputs.pairedRegionName
- name: nestedDependencies.outputs.pairedRegionName
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- trustPolicyStatus: 'enabled'
- cacheRules: [
- {
- name: 'customRule'
- sourceRepository: 'docker.io/library/hello-world'
- targetRepository: 'cached-docker-hub/hello-world'
- }
- {
- sourceRepository: 'docker.io/library/hello-world'
- }
- ]
- webhooks: [
- {
- name: '${namePrefix}acrx001webhook'
- serviceUri: 'https://www.contoso.com/webhook'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/container-registry/registry/version.json b/modules/container-registry/registry/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/container-registry/registry/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/container-registry/registry/webhook/README.md b/modules/container-registry/registry/webhook/README.md
deleted file mode 100644
index 55b48b3f3e..0000000000
--- a/modules/container-registry/registry/webhook/README.md
+++ /dev/null
@@ -1,153 +0,0 @@
-# Azure Container Registry (ACR) Webhooks `[Microsoft.ContainerRegistry/registries/webhooks]`
-
-This module deploys an Azure Container Registry (ACR) Webhook.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ContainerRegistry/registries/webhooks` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries/webhooks) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`serviceUri`](#parameter-serviceuri) | string | The service URI for the webhook to post notifications. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`registryName`](#parameter-registryname) | string | The name of the parent registry. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`action`](#parameter-action) | array | The list of actions that trigger the webhook to post notifications. |
-| [`customHeaders`](#parameter-customheaders) | object | Custom headers that will be added to the webhook notifications. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`name`](#parameter-name) | string | The name of the registry webhook. |
-| [`scope`](#parameter-scope) | string | The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events. |
-| [`status`](#parameter-status) | string | The status of the webhook at the time the operation was called. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `serviceUri`
-
-The service URI for the webhook to post notifications.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `registryName`
-
-The name of the parent registry. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `action`
-
-The list of actions that trigger the webhook to post notifications.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- 'chart_delete'
- 'chart_push'
- 'delete'
- 'push'
- 'quarantine'
- ]
- ```
-
-### Parameter: `customHeaders`
-
-Custom headers that will be added to the webhook notifications.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `name`
-
-The name of the registry webhook.
-
-- Required: No
-- Type: string
-- Default: `[format('{0}webhook', parameters('registryName'))]`
-
-### Parameter: `scope`
-
-The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `status`
-
-The status of the webhook at the time the operation was called.
-
-- Required: No
-- Type: string
-- Default: `'enabled'`
-- Allowed:
- ```Bicep
- [
- 'disabled'
- 'enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `actions` | array | The actions of the webhook. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the webhook. |
-| `provistioningState` | string | The provisioning state of the webhook. |
-| `resourceGroupName` | string | The name of the Azure container registry. |
-| `resourceId` | string | The resource ID of the webhook. |
-| `status` | string | The status of the webhook. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/container-registry/registry/webhook/main.bicep b/modules/container-registry/registry/webhook/main.bicep
deleted file mode 100644
index c537ad5153..0000000000
--- a/modules/container-registry/registry/webhook/main.bicep
+++ /dev/null
@@ -1,96 +0,0 @@
-metadata name = 'Azure Container Registry (ACR) Webhooks'
-metadata description = 'This module deploys an Azure Container Registry (ACR) Webhook.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent registry. Required if the template is used in a standalone deployment.')
-param registryName string
-
-@description('Optional. The name of the registry webhook.')
-@minLength(5)
-@maxLength(50)
-param name string = '${registryName}webhook'
-
-@description('Required. The service URI for the webhook to post notifications.')
-param serviceUri string
-
-@allowed([
- 'disabled'
- 'enabled'
-])
-@description('Optional. The status of the webhook at the time the operation was called.')
-param status string = 'enabled'
-
-@description('Optional. The list of actions that trigger the webhook to post notifications.')
-param action array = [
- 'chart_delete'
- 'chart_push'
- 'delete'
- 'push'
- 'quarantine'
-]
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Custom headers that will be added to the webhook notifications.')
-param customHeaders object = {}
-
-@description('Optional. The scope of repositories where the event can be triggered. For example, \'foo:*\' means events for all tags under repository \'foo\'. \'foo:bar\' means events for \'foo:bar\' only. \'foo\' is equivalent to \'foo:latest\'. Empty means all events.')
-param scope string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource registry 'Microsoft.ContainerRegistry/registries@2023-06-01-preview' existing = {
- name: registryName
-}
-
-resource webhook 'Microsoft.ContainerRegistry/registries/webhooks@2023-06-01-preview' = {
- name: name
- parent: registry
- location: location
- tags: tags
- properties: {
- actions: action
- customHeaders: customHeaders
- scope: scope
- serviceUri: serviceUri
- status: status
- }
-}
-
-@description('The resource ID of the webhook.')
-output resourceId string = webhook.id
-
-@description('The name of the webhook.')
-output name string = webhook.name
-
-@description('The name of the Azure container registry.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The actions of the webhook.')
-output actions array = webhook.properties.actions
-
-@description('The status of the webhook.')
-output status string = webhook.properties.status
-
-@description('The provisioning state of the webhook.')
-output provistioningState string = webhook.properties.provisioningState
-
-@description('The location the resource was deployed into.')
-output location string = webhook.location
diff --git a/modules/container-registry/registry/webhook/main.json b/modules/container-registry/registry/webhook/main.json
deleted file mode 100644
index 3d462e11c7..0000000000
--- a/modules/container-registry/registry/webhook/main.json
+++ /dev/null
@@ -1,187 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "17193481488069435754"
- },
- "name": "Azure Container Registry (ACR) Webhooks",
- "description": "This module deploys an Azure Container Registry (ACR) Webhook.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "registryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent registry. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}webhook', parameters('registryName'))]",
- "minLength": 5,
- "maxLength": 50,
- "metadata": {
- "description": "Optional. The name of the registry webhook."
- }
- },
- "serviceUri": {
- "type": "string",
- "metadata": {
- "description": "Required. The service URI for the webhook to post notifications."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "enabled",
- "allowedValues": [
- "disabled",
- "enabled"
- ],
- "metadata": {
- "description": "Optional. The status of the webhook at the time the operation was called."
- }
- },
- "action": {
- "type": "array",
- "defaultValue": [
- "chart_delete",
- "chart_push",
- "delete",
- "push",
- "quarantine"
- ],
- "metadata": {
- "description": "Optional. The list of actions that trigger the webhook to post notifications."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "customHeaders": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Custom headers that will be added to the webhook notifications."
- }
- },
- "scope": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "registry": {
- "existing": true,
- "type": "Microsoft.ContainerRegistry/registries",
- "apiVersion": "2023-06-01-preview",
- "name": "[parameters('registryName')]"
- },
- "webhook": {
- "type": "Microsoft.ContainerRegistry/registries/webhooks",
- "apiVersion": "2023-06-01-preview",
- "name": "[format('{0}/{1}', parameters('registryName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "actions": "[parameters('action')]",
- "customHeaders": "[parameters('customHeaders')]",
- "scope": "[parameters('scope')]",
- "serviceUri": "[parameters('serviceUri')]",
- "status": "[parameters('status')]"
- },
- "dependsOn": [
- "registry"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the webhook."
- },
- "value": "[resourceId('Microsoft.ContainerRegistry/registries/webhooks', parameters('registryName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the webhook."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Azure container registry."
- },
- "value": "[resourceGroup().name]"
- },
- "actions": {
- "type": "array",
- "metadata": {
- "description": "The actions of the webhook."
- },
- "value": "[reference('webhook').actions]"
- },
- "status": {
- "type": "string",
- "metadata": {
- "description": "The status of the webhook."
- },
- "value": "[reference('webhook').status]"
- },
- "provistioningState": {
- "type": "string",
- "metadata": {
- "description": "The provisioning state of the webhook."
- },
- "value": "[reference('webhook').provisioningState]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('webhook', '2023-06-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-registry/registry/webhook/version.json b/modules/container-registry/registry/webhook/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/container-registry/registry/webhook/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/container-service/managed-cluster/README.md b/modules/container-service/managed-cluster/README.md
index 0b88e6a7b3..b1e154ab73 100644
--- a/modules/container-service/managed-cluster/README.md
+++ b/modules/container-service/managed-cluster/README.md
@@ -1,2468 +1,7 @@
-# Azure Kubernetes Service (AKS) Managed Clusters `[Microsoft.ContainerService/managedClusters]`
+
-
-
-
-### Example 2: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-
-
-
-
-### Example 3: _Kubenet_
-
-
-
-
-
-### Example 4: _Priv_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Specifies the name of the AKS cluster. |
-| [`primaryAgentPoolProfile`](#parameter-primaryagentpoolprofile) | array | Properties of the primary agent pool. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`aksServicePrincipalProfile`](#parameter-aksserviceprincipalprofile) | object | Information about a service principal identity for the cluster to use for manipulating Azure APIs. Required if no managed identities are assigned to the cluster. |
-| [`appGatewayResourceId`](#parameter-appgatewayresourceid) | string | Specifies the resource ID of connected application gateway. Required if `ingressApplicationGatewayEnabled` is set to `true`. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`aadProfileAdminGroupObjectIDs`](#parameter-aadprofileadmingroupobjectids) | array | Specifies the AAD group object IDs that will have admin role of the cluster. |
-| [`aadProfileClientAppID`](#parameter-aadprofileclientappid) | string | The client AAD application ID. |
-| [`aadProfileEnableAzureRBAC`](#parameter-aadprofileenableazurerbac) | bool | Specifies whether to enable Azure RBAC for Kubernetes authorization. |
-| [`aadProfileManaged`](#parameter-aadprofilemanaged) | bool | Specifies whether to enable managed AAD integration. |
-| [`aadProfileServerAppID`](#parameter-aadprofileserverappid) | string | The server AAD application ID. |
-| [`aadProfileServerAppSecret`](#parameter-aadprofileserverappsecret) | string | The server AAD application secret. |
-| [`aadProfileTenantId`](#parameter-aadprofiletenantid) | string | Specifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication. |
-| [`aciConnectorLinuxEnabled`](#parameter-aciconnectorlinuxenabled) | bool | Specifies whether the aciConnectorLinux add-on is enabled or not. |
-| [`adminUsername`](#parameter-adminusername) | string | Specifies the administrator username of Linux virtual machines. |
-| [`agentPools`](#parameter-agentpools) | array | Define one or more secondary/additional agent pools. |
-| [`authorizedIPRanges`](#parameter-authorizedipranges) | array | IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. |
-| [`autoScalerProfileBalanceSimilarNodeGroups`](#parameter-autoscalerprofilebalancesimilarnodegroups) | string | Specifies the balance of similar node groups for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileExpander`](#parameter-autoscalerprofileexpander) | string | Specifies the expand strategy for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileMaxEmptyBulkDelete`](#parameter-autoscalerprofilemaxemptybulkdelete) | string | Specifies the maximum empty bulk delete for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileMaxGracefulTerminationSec`](#parameter-autoscalerprofilemaxgracefulterminationsec) | string | Specifies the max graceful termination time interval in seconds for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileMaxNodeProvisionTime`](#parameter-autoscalerprofilemaxnodeprovisiontime) | string | Specifies the maximum node provisioning time for the auto-scaler of the AKS cluster. Values must be an integer followed by an "m". No unit of time other than minutes (m) is supported. |
-| [`autoScalerProfileMaxTotalUnreadyPercentage`](#parameter-autoscalerprofilemaxtotalunreadypercentage) | string | Specifies the mximum total unready percentage for the auto-scaler of the AKS cluster. The maximum is 100 and the minimum is 0. |
-| [`autoScalerProfileNewPodScaleUpDelay`](#parameter-autoscalerprofilenewpodscaleupdelay) | string | For scenarios like burst/batch scale where you do not want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they are a certain age. Values must be an integer followed by a unit ("s" for seconds, "m" for minutes, "h" for hours, etc). |
-| [`autoScalerProfileOkTotalUnreadyCount`](#parameter-autoscalerprofileoktotalunreadycount) | string | Specifies the OK total unready count for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileScaleDownDelayAfterAdd`](#parameter-autoscalerprofilescaledowndelayafteradd) | string | Specifies the scale down delay after add of the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileScaleDownDelayAfterDelete`](#parameter-autoscalerprofilescaledowndelayafterdelete) | string | Specifies the scale down delay after delete of the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileScaleDownDelayAfterFailure`](#parameter-autoscalerprofilescaledowndelayafterfailure) | string | Specifies scale down delay after failure of the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileScaleDownUnneededTime`](#parameter-autoscalerprofilescaledownunneededtime) | string | Specifies the scale down unneeded time of the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileScaleDownUnreadyTime`](#parameter-autoscalerprofilescaledownunreadytime) | string | Specifies the scale down unready time of the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileScanInterval`](#parameter-autoscalerprofilescaninterval) | string | Specifies the scan interval of the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileSkipNodesWithLocalStorage`](#parameter-autoscalerprofileskipnodeswithlocalstorage) | string | Specifies if nodes with local storage should be skipped for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileSkipNodesWithSystemPods`](#parameter-autoscalerprofileskipnodeswithsystempods) | string | Specifies if nodes with system pods should be skipped for the auto-scaler of the AKS cluster. |
-| [`autoScalerProfileUtilizationThreshold`](#parameter-autoscalerprofileutilizationthreshold) | string | Specifies the utilization threshold of the auto-scaler of the AKS cluster. |
-| [`autoUpgradeProfileUpgradeChannel`](#parameter-autoupgradeprofileupgradechannel) | string | Auto-upgrade channel on the AKS cluster. |
-| [`azurePolicyEnabled`](#parameter-azurepolicyenabled) | bool | Specifies whether the azurepolicy add-on is enabled or not. For security reasons, this setting should be enabled. |
-| [`azurePolicyVersion`](#parameter-azurepolicyversion) | string | Specifies the azure policy version to use. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableLocalAccounts`](#parameter-disablelocalaccounts) | bool | If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. |
-| [`disableRunCommand`](#parameter-disableruncommand) | bool | Whether to disable run command for the cluster or not. |
-| [`diskEncryptionSetID`](#parameter-diskencryptionsetid) | string | The resource ID of the disc encryption set to apply to the cluster. For security reasons, this value should be provided. |
-| [`dnsPrefix`](#parameter-dnsprefix) | string | Specifies the DNS prefix specified when creating the managed cluster. |
-| [`dnsServiceIP`](#parameter-dnsserviceip) | string | Specifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. |
-| [`dnsZoneResourceId`](#parameter-dnszoneresourceid) | string | Specifies the resource ID of connected DNS zone. It will be ignored if `webApplicationRoutingEnabled` is set to `false`. |
-| [`enableAzureDefender`](#parameter-enableazuredefender) | bool | Whether to enable Azure Defender. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enableDnsZoneContributorRoleAssignment`](#parameter-enablednszonecontributorroleassignment) | bool | Specifies whether assing the DNS zone contributor role to the cluster service principal. It will be ignored if `webApplicationRoutingEnabled` is set to `false` or `dnsZoneResourceId` not provided. |
-| [`enableKeyvaultSecretsProvider`](#parameter-enablekeyvaultsecretsprovider) | bool | Specifies whether the KeyvaultSecretsProvider add-on is enabled or not. |
-| [`enableOidcIssuerProfile`](#parameter-enableoidcissuerprofile) | bool | Whether the The OIDC issuer profile of the Managed Cluster is enabled. |
-| [`enablePodSecurityPolicy`](#parameter-enablepodsecuritypolicy) | bool | Whether to enable Kubernetes pod security policy. Requires enabling the pod security policy feature flag on the subscription. |
-| [`enablePrivateCluster`](#parameter-enableprivatecluster) | bool | Specifies whether to create the cluster as a private cluster or not. |
-| [`enablePrivateClusterPublicFQDN`](#parameter-enableprivateclusterpublicfqdn) | bool | Whether to create additional public FQDN for private cluster or not. |
-| [`enableRBAC`](#parameter-enablerbac) | bool | Whether to enable Kubernetes Role-Based Access Control. |
-| [`enableSecretRotation`](#parameter-enablesecretrotation) | string | Specifies whether the KeyvaultSecretsProvider add-on uses secret rotation. |
-| [`enableStorageProfileBlobCSIDriver`](#parameter-enablestorageprofileblobcsidriver) | bool | Whether the AzureBlob CSI Driver for the storage profile is enabled. |
-| [`enableStorageProfileDiskCSIDriver`](#parameter-enablestorageprofilediskcsidriver) | bool | Whether the AzureDisk CSI Driver for the storage profile is enabled. |
-| [`enableStorageProfileFileCSIDriver`](#parameter-enablestorageprofilefilecsidriver) | bool | Whether the AzureFile CSI Driver for the storage profile is enabled. |
-| [`enableStorageProfileSnapshotController`](#parameter-enablestorageprofilesnapshotcontroller) | bool | Whether the snapshot controller for the storage profile is enabled. |
-| [`enableWorkloadIdentity`](#parameter-enableworkloadidentity) | bool | Whether to enable Workload Identity. Requires OIDC issuer profile to be enabled. |
-| [`fluxConfigurationProtectedSettings`](#parameter-fluxconfigurationprotectedsettings) | secureObject | Configuration settings that are sensitive, as name-value pairs for configuring this extension. |
-| [`fluxExtension`](#parameter-fluxextension) | object | Settings and configurations for the flux extension. |
-| [`httpApplicationRoutingEnabled`](#parameter-httpapplicationroutingenabled) | bool | Specifies whether the httpApplicationRouting add-on is enabled or not. |
-| [`httpProxyConfig`](#parameter-httpproxyconfig) | object | Configurations for provisioning the cluster with HTTP proxy servers. |
-| [`identityProfile`](#parameter-identityprofile) | object | Identities associated with the cluster. |
-| [`ingressApplicationGatewayEnabled`](#parameter-ingressapplicationgatewayenabled) | bool | Specifies whether the ingressApplicationGateway (AGIC) add-on is enabled or not. |
-| [`kubeDashboardEnabled`](#parameter-kubedashboardenabled) | bool | Specifies whether the kubeDashboard add-on is enabled or not. |
-| [`kubernetesVersion`](#parameter-kubernetesversion) | string | Version of Kubernetes specified when creating the managed cluster. |
-| [`loadBalancerSku`](#parameter-loadbalancersku) | string | Specifies the sku of the load balancer used by the virtual machine scale sets used by nodepools. |
-| [`location`](#parameter-location) | string | Specifies the location of AKS cluster. It picks up Resource Group's location by default. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both. |
-| [`managedOutboundIPCount`](#parameter-managedoutboundipcount) | int | Outbound IP Count for the Load balancer. |
-| [`monitoringWorkspaceId`](#parameter-monitoringworkspaceid) | string | Resource ID of the monitoring log analytics workspace. |
-| [`networkDataplane`](#parameter-networkdataplane) | string | Network dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin. |
-| [`networkPlugin`](#parameter-networkplugin) | string | Specifies the network plugin used for building Kubernetes network. |
-| [`networkPluginMode`](#parameter-networkpluginmode) | string | Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin. |
-| [`networkPolicy`](#parameter-networkpolicy) | string | Specifies the network policy used for building Kubernetes network. - calico or azure. |
-| [`nodeResourceGroup`](#parameter-noderesourcegroup) | string | Name of the resource group containing agent pool nodes. |
-| [`omsAgentEnabled`](#parameter-omsagentenabled) | bool | Specifies whether the OMS agent is enabled. |
-| [`openServiceMeshEnabled`](#parameter-openservicemeshenabled) | bool | Specifies whether the openServiceMesh add-on is enabled or not. |
-| [`outboundType`](#parameter-outboundtype) | string | Specifies outbound (egress) routing method. - loadBalancer or userDefinedRouting. |
-| [`podCidr`](#parameter-podcidr) | string | Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used. |
-| [`podIdentityProfileAllowNetworkPluginKubenet`](#parameter-podidentityprofileallownetworkpluginkubenet) | bool | Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. |
-| [`podIdentityProfileEnable`](#parameter-podidentityprofileenable) | bool | Whether the pod identity addon is enabled. |
-| [`podIdentityProfileUserAssignedIdentities`](#parameter-podidentityprofileuserassignedidentities) | array | The pod identities to use in the cluster. |
-| [`podIdentityProfileUserAssignedIdentityExceptions`](#parameter-podidentityprofileuserassignedidentityexceptions) | array | The pod identity exceptions to allow. |
-| [`privateDNSZone`](#parameter-privatednszone) | string | Private DNS Zone configuration. Set to 'system' and AKS will create a private DNS zone in the node resource group. Set to '' to disable private DNS Zone creation and use public DNS. Supply the resource ID here of an existing Private DNS zone to use an existing zone. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`serviceCidr`](#parameter-servicecidr) | string | A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. |
-| [`skuTier`](#parameter-skutier) | string | Tier of a managed cluster SKU. - Free or Standard. |
-| [`sshPublicKey`](#parameter-sshpublickey) | string | Specifies the SSH RSA public key string for the Linux nodes. |
-| [`supportPlan`](#parameter-supportplan) | string | The support plan for the Managed Cluster. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`webApplicationRoutingEnabled`](#parameter-webapplicationroutingenabled) | bool | Specifies whether the webApplicationRoutingEnabled add-on is enabled or not. |
-
-### Parameter: `name`
-
-Specifies the name of the AKS cluster.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `primaryAgentPoolProfile`
-
-Properties of the primary agent pool.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `aksServicePrincipalProfile`
-
-Information about a service principal identity for the cluster to use for manipulating Azure APIs. Required if no managed identities are assigned to the cluster.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `appGatewayResourceId`
-
-Specifies the resource ID of connected application gateway. Required if `ingressApplicationGatewayEnabled` is set to `true`.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `aadProfileAdminGroupObjectIDs`
-
-Specifies the AAD group object IDs that will have admin role of the cluster.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `aadProfileClientAppID`
-
-The client AAD application ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `aadProfileEnableAzureRBAC`
-
-Specifies whether to enable Azure RBAC for Kubernetes authorization.
-
-- Required: No
-- Type: bool
-- Default: `[parameters('enableRBAC')]`
-
-### Parameter: `aadProfileManaged`
-
-Specifies whether to enable managed AAD integration.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `aadProfileServerAppID`
-
-The server AAD application ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `aadProfileServerAppSecret`
-
-The server AAD application secret.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `aadProfileTenantId`
-
-Specifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication.
-
-- Required: No
-- Type: string
-- Default: `[subscription().tenantId]`
-
-### Parameter: `aciConnectorLinuxEnabled`
-
-Specifies whether the aciConnectorLinux add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `adminUsername`
-
-Specifies the administrator username of Linux virtual machines.
-
-- Required: No
-- Type: string
-- Default: `'azureuser'`
-
-### Parameter: `agentPools`
-
-Define one or more secondary/additional agent pools.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `authorizedIPRanges`
-
-IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `autoScalerProfileBalanceSimilarNodeGroups`
-
-Specifies the balance of similar node groups for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'false'`
-- Allowed:
- ```Bicep
- [
- 'false'
- 'true'
- ]
- ```
-
-### Parameter: `autoScalerProfileExpander`
-
-Specifies the expand strategy for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'random'`
-- Allowed:
- ```Bicep
- [
- 'least-waste'
- 'most-pods'
- 'priority'
- 'random'
- ]
- ```
-
-### Parameter: `autoScalerProfileMaxEmptyBulkDelete`
-
-Specifies the maximum empty bulk delete for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'10'`
-
-### Parameter: `autoScalerProfileMaxGracefulTerminationSec`
-
-Specifies the max graceful termination time interval in seconds for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'600'`
-
-### Parameter: `autoScalerProfileMaxNodeProvisionTime`
-
-Specifies the maximum node provisioning time for the auto-scaler of the AKS cluster. Values must be an integer followed by an "m". No unit of time other than minutes (m) is supported.
-
-- Required: No
-- Type: string
-- Default: `'15m'`
-
-### Parameter: `autoScalerProfileMaxTotalUnreadyPercentage`
-
-Specifies the mximum total unready percentage for the auto-scaler of the AKS cluster. The maximum is 100 and the minimum is 0.
-
-- Required: No
-- Type: string
-- Default: `'45'`
-
-### Parameter: `autoScalerProfileNewPodScaleUpDelay`
-
-For scenarios like burst/batch scale where you do not want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they are a certain age. Values must be an integer followed by a unit ("s" for seconds, "m" for minutes, "h" for hours, etc).
-
-- Required: No
-- Type: string
-- Default: `'0s'`
-
-### Parameter: `autoScalerProfileOkTotalUnreadyCount`
-
-Specifies the OK total unready count for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'3'`
-
-### Parameter: `autoScalerProfileScaleDownDelayAfterAdd`
-
-Specifies the scale down delay after add of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'10m'`
-
-### Parameter: `autoScalerProfileScaleDownDelayAfterDelete`
-
-Specifies the scale down delay after delete of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'20s'`
-
-### Parameter: `autoScalerProfileScaleDownDelayAfterFailure`
-
-Specifies scale down delay after failure of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'3m'`
-
-### Parameter: `autoScalerProfileScaleDownUnneededTime`
-
-Specifies the scale down unneeded time of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'10m'`
-
-### Parameter: `autoScalerProfileScaleDownUnreadyTime`
-
-Specifies the scale down unready time of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'20m'`
-
-### Parameter: `autoScalerProfileScanInterval`
-
-Specifies the scan interval of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'10s'`
-
-### Parameter: `autoScalerProfileSkipNodesWithLocalStorage`
-
-Specifies if nodes with local storage should be skipped for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'true'`
-- Allowed:
- ```Bicep
- [
- 'false'
- 'true'
- ]
- ```
-
-### Parameter: `autoScalerProfileSkipNodesWithSystemPods`
-
-Specifies if nodes with system pods should be skipped for the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'true'`
-- Allowed:
- ```Bicep
- [
- 'false'
- 'true'
- ]
- ```
-
-### Parameter: `autoScalerProfileUtilizationThreshold`
-
-Specifies the utilization threshold of the auto-scaler of the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `'0.5'`
-
-### Parameter: `autoUpgradeProfileUpgradeChannel`
-
-Auto-upgrade channel on the AKS cluster.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'node-image'
- 'none'
- 'patch'
- 'rapid'
- 'stable'
- ]
- ```
-
-### Parameter: `azurePolicyEnabled`
-
-Specifies whether the azurepolicy add-on is enabled or not. For security reasons, this setting should be enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `azurePolicyVersion`
-
-Specifies the azure policy version to use.
-
-- Required: No
-- Type: string
-- Default: `'v2'`
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultNetworkAccess`](#parameter-customermanagedkeykeyvaultnetworkaccess) | string | Network access of key vault. The possible values are Public and Private. Public means the key vault allows public access from all networks. Private means the key vault disables public access and enables private link. The default value is Public. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultNetworkAccess`
-
-Network access of key vault. The possible values are Public and Private. Public means the key vault allows public access from all networks. Private means the key vault disables public access and enables private link. The default value is Public.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Private'
- 'Public'
- ]
- ```
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableLocalAccounts`
-
-If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `disableRunCommand`
-
-Whether to disable run command for the cluster or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `diskEncryptionSetID`
-
-The resource ID of the disc encryption set to apply to the cluster. For security reasons, this value should be provided.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `dnsPrefix`
-
-Specifies the DNS prefix specified when creating the managed cluster.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `dnsServiceIP`
-
-Specifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `dnsZoneResourceId`
-
-Specifies the resource ID of connected DNS zone. It will be ignored if `webApplicationRoutingEnabled` is set to `false`.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableAzureDefender`
-
-Whether to enable Azure Defender.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDnsZoneContributorRoleAssignment`
-
-Specifies whether assing the DNS zone contributor role to the cluster service principal. It will be ignored if `webApplicationRoutingEnabled` is set to `false` or `dnsZoneResourceId` not provided.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableKeyvaultSecretsProvider`
-
-Specifies whether the KeyvaultSecretsProvider add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableOidcIssuerProfile`
-
-Whether the The OIDC issuer profile of the Managed Cluster is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enablePodSecurityPolicy`
-
-Whether to enable Kubernetes pod security policy. Requires enabling the pod security policy feature flag on the subscription.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enablePrivateCluster`
-
-Specifies whether to create the cluster as a private cluster or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enablePrivateClusterPublicFQDN`
-
-Whether to create additional public FQDN for private cluster or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableRBAC`
-
-Whether to enable Kubernetes Role-Based Access Control.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableSecretRotation`
-
-Specifies whether the KeyvaultSecretsProvider add-on uses secret rotation.
-
-- Required: No
-- Type: string
-- Default: `'false'`
-- Allowed:
- ```Bicep
- [
- 'false'
- 'true'
- ]
- ```
-
-### Parameter: `enableStorageProfileBlobCSIDriver`
-
-Whether the AzureBlob CSI Driver for the storage profile is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableStorageProfileDiskCSIDriver`
-
-Whether the AzureDisk CSI Driver for the storage profile is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableStorageProfileFileCSIDriver`
-
-Whether the AzureFile CSI Driver for the storage profile is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableStorageProfileSnapshotController`
-
-Whether the snapshot controller for the storage profile is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableWorkloadIdentity`
-
-Whether to enable Workload Identity. Requires OIDC issuer profile to be enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `fluxConfigurationProtectedSettings`
-
-Configuration settings that are sensitive, as name-value pairs for configuring this extension.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `fluxExtension`
-
-Settings and configurations for the flux extension.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `httpApplicationRoutingEnabled`
-
-Specifies whether the httpApplicationRouting add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `httpProxyConfig`
-
-Configurations for provisioning the cluster with HTTP proxy servers.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `identityProfile`
-
-Identities associated with the cluster.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `ingressApplicationGatewayEnabled`
-
-Specifies whether the ingressApplicationGateway (AGIC) add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `kubeDashboardEnabled`
-
-Specifies whether the kubeDashboard add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `kubernetesVersion`
-
-Version of Kubernetes specified when creating the managed cluster.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `loadBalancerSku`
-
-Specifies the sku of the load balancer used by the virtual machine scale sets used by nodepools.
-
-- Required: No
-- Type: string
-- Default: `'standard'`
-- Allowed:
- ```Bicep
- [
- 'basic'
- 'standard'
- ]
- ```
-
-### Parameter: `location`
-
-Specifies the location of AKS cluster. It picks up Resource Group's location by default.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `managedOutboundIPCount`
-
-Outbound IP Count for the Load balancer.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `monitoringWorkspaceId`
-
-Resource ID of the monitoring log analytics workspace.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `networkDataplane`
-
-Network dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'azure'
- 'cilium'
- ]
- ```
-
-### Parameter: `networkPlugin`
-
-Specifies the network plugin used for building Kubernetes network.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'azure'
- 'kubenet'
- ]
- ```
-
-### Parameter: `networkPluginMode`
-
-Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'overlay'
- ]
- ```
-
-### Parameter: `networkPolicy`
-
-Specifies the network policy used for building Kubernetes network. - calico or azure.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'azure'
- 'calico'
- ]
- ```
-
-### Parameter: `nodeResourceGroup`
-
-Name of the resource group containing agent pool nodes.
-
-- Required: No
-- Type: string
-- Default: `[format('{0}_aks_{1}_nodes', resourceGroup().name, parameters('name'))]`
-
-### Parameter: `omsAgentEnabled`
-
-Specifies whether the OMS agent is enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `openServiceMeshEnabled`
-
-Specifies whether the openServiceMesh add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `outboundType`
-
-Specifies outbound (egress) routing method. - loadBalancer or userDefinedRouting.
-
-- Required: No
-- Type: string
-- Default: `'loadBalancer'`
-- Allowed:
- ```Bicep
- [
- 'loadBalancer'
- 'userDefinedRouting'
- ]
- ```
-
-### Parameter: `podCidr`
-
-Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `podIdentityProfileAllowNetworkPluginKubenet`
-
-Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `podIdentityProfileEnable`
-
-Whether the pod identity addon is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `podIdentityProfileUserAssignedIdentities`
-
-The pod identities to use in the cluster.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `podIdentityProfileUserAssignedIdentityExceptions`
-
-The pod identity exceptions to allow.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `privateDNSZone`
-
-Private DNS Zone configuration. Set to 'system' and AKS will create a private DNS zone in the node resource group. Set to '' to disable private DNS Zone creation and use public DNS. Supply the resource ID here of an existing Private DNS zone to use an existing zone.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `serviceCidr`
-
-A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `skuTier`
-
-Tier of a managed cluster SKU. - Free or Standard.
-
-- Required: No
-- Type: string
-- Default: `'Free'`
-- Allowed:
- ```Bicep
- [
- 'Free'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `sshPublicKey`
-
-Specifies the SSH RSA public key string for the Linux nodes.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `supportPlan`
-
-The support plan for the Managed Cluster.
-
-- Required: No
-- Type: string
-- Default: `'KubernetesOfficial'`
-- Allowed:
- ```Bicep
- [
- 'AKSLongTermSupport'
- 'KubernetesOfficial'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `webApplicationRoutingEnabled`
-
-Specifies whether the webApplicationRoutingEnabled add-on is enabled or not.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `addonProfiles` | object | The addonProfiles of the Kubernetes cluster. |
-| `controlPlaneFQDN` | string | The control plane FQDN of the managed cluster. |
-| `keyvaultIdentityClientId` | string | The Client ID of the Key Vault Secrets Provider identity. |
-| `keyvaultIdentityObjectId` | string | The Object ID of the Key Vault Secrets Provider identity. |
-| `kubeletidentityObjectId` | string | The Object ID of the AKS identity. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the managed cluster. |
-| `oidcIssuerUrl` | string | The OIDC token issuer URL. |
-| `omsagentIdentityObjectId` | string | The Object ID of the OMS agent identity. |
-| `resourceGroupName` | string | The resource group the managed cluster was deployed into. |
-| `resourceId` | string | The resource ID of the managed cluster. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/kubernetes-configuration/extension` | Local reference |
-| `modules/kubernetes-configuration/flux-configuration` | Local reference |
-
-## Notes
-
-### Parameter Usage: `httpProxyConfig`
-
-Configurations for provisioning the cluster with HTTP proxy servers. You can specify in the following format:
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/container-service/managed-cluster/agent-pool/README.md b/modules/container-service/managed-cluster/agent-pool/README.md
deleted file mode 100644
index 5519e82572..0000000000
--- a/modules/container-service/managed-cluster/agent-pool/README.md
+++ /dev/null
@@ -1,435 +0,0 @@
-# Azure Kubernetes Service (AKS) Managed Cluster Agent Pools `[Microsoft.ContainerService/managedClusters/agentPools]`
-
-This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ContainerService/managedClusters/agentPools` | [2023-07-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-07-02-preview/managedClusters/agentPools) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the agent pool. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`managedClusterName`](#parameter-managedclustername) | string | The name of the parent managed cluster. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`availabilityZones`](#parameter-availabilityzones) | array | The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is "VirtualMachineScaleSets". |
-| [`count`](#parameter-count) | int | Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. |
-| [`enableAutoScaling`](#parameter-enableautoscaling) | bool | Whether to enable auto-scaler. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enableEncryptionAtHost`](#parameter-enableencryptionathost) | bool | This is only supported on certain VM sizes and in certain Azure regions. For more information, see: /azure/aks/enable-host-encryption. For security reasons, this setting should be enabled. |
-| [`enableFIPS`](#parameter-enablefips) | bool | See Add a FIPS-enabled node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details. |
-| [`enableNodePublicIP`](#parameter-enablenodepublicip) | bool | Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). |
-| [`enableUltraSSD`](#parameter-enableultrassd) | bool | Whether to enable UltraSSD. |
-| [`gpuInstanceProfile`](#parameter-gpuinstanceprofile) | string | GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. |
-| [`kubeletDiskType`](#parameter-kubeletdisktype) | string | Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. |
-| [`maxCount`](#parameter-maxcount) | int | The maximum number of nodes for auto-scaling. |
-| [`maxPods`](#parameter-maxpods) | int | The maximum number of pods that can run on a node. |
-| [`maxSurge`](#parameter-maxsurge) | string | This can either be set to an integer (e.g. "5") or a percentage (e.g. "50%"). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: /azure/aks/upgrade-cluster#customize-node-surge-upgrade. |
-| [`minCount`](#parameter-mincount) | int | The minimum number of nodes for auto-scaling. |
-| [`mode`](#parameter-mode) | string | A cluster must have at least one "System" Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: /azure/aks/use-system-pools. |
-| [`nodeLabels`](#parameter-nodelabels) | object | The node labels to be persisted across all nodes in agent pool. |
-| [`nodePublicIpPrefixId`](#parameter-nodepublicipprefixid) | string | ResourceId of the node PublicIPPrefix. |
-| [`nodeTaints`](#parameter-nodetaints) | array | The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. |
-| [`orchestratorVersion`](#parameter-orchestratorversion) | string | As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). |
-| [`osDiskSizeGB`](#parameter-osdisksizegb) | int | OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. |
-| [`osDiskType`](#parameter-osdisktype) | string | The default is "Ephemeral" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to "Managed". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os). |
-| [`osSku`](#parameter-ossku) | string | Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. |
-| [`osType`](#parameter-ostype) | string | The operating system type. The default is Linux. |
-| [`podSubnetId`](#parameter-podsubnetid) | string | Subnet ID for the pod IPs. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. |
-| [`proximityPlacementGroupResourceId`](#parameter-proximityplacementgroupresourceid) | string | The ID for the Proximity Placement Group. |
-| [`scaleDownMode`](#parameter-scaledownmode) | string | Describes how VMs are added to or removed from Agent Pools. See billing states (https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing). |
-| [`scaleSetEvictionPolicy`](#parameter-scalesetevictionpolicy) | string | The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see spot VMs. |
-| [`scaleSetPriority`](#parameter-scalesetpriority) | string | The Virtual Machine Scale Set priority. |
-| [`sourceResourceId`](#parameter-sourceresourceid) | string | This is the ARM ID of the source object to be used to create the target object. |
-| [`spotMaxPrice`](#parameter-spotmaxprice) | int | Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see spot VMs pricing (https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#pricing). |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`type`](#parameter-type) | string | The type of Agent Pool. |
-| [`vmSize`](#parameter-vmsize) | string | VM size. VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: /azure/aks/quotas-skus-regions. |
-| [`vnetSubnetId`](#parameter-vnetsubnetid) | string | Node Subnet ID. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. |
-| [`workloadRuntime`](#parameter-workloadruntime) | string | Determines the type of workload a node can run. |
-
-### Parameter: `name`
-
-Name of the agent pool.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `managedClusterName`
-
-The name of the parent managed cluster. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `availabilityZones`
-
-The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is "VirtualMachineScaleSets".
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `count`
-
-Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `enableAutoScaling`
-
-Whether to enable auto-scaler.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableEncryptionAtHost`
-
-This is only supported on certain VM sizes and in certain Azure regions. For more information, see: /azure/aks/enable-host-encryption. For security reasons, this setting should be enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableFIPS`
-
-See Add a FIPS-enabled node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableNodePublicIP`
-
-Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools).
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableUltraSSD`
-
-Whether to enable UltraSSD.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `gpuInstanceProfile`
-
-GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'MIG1g'
- 'MIG2g'
- 'MIG3g'
- 'MIG4g'
- 'MIG7g'
- ]
- ```
-
-### Parameter: `kubeletDiskType`
-
-Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `maxCount`
-
-The maximum number of nodes for auto-scaling.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `maxPods`
-
-The maximum number of pods that can run on a node.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `maxSurge`
-
-This can either be set to an integer (e.g. "5") or a percentage (e.g. "50%"). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: /azure/aks/upgrade-cluster#customize-node-surge-upgrade.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `minCount`
-
-The minimum number of nodes for auto-scaling.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `mode`
-
-A cluster must have at least one "System" Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: /azure/aks/use-system-pools.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `nodeLabels`
-
-The node labels to be persisted across all nodes in agent pool.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `nodePublicIpPrefixId`
-
-ResourceId of the node PublicIPPrefix.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `nodeTaints`
-
-The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `orchestratorVersion`
-
-As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `osDiskSizeGB`
-
-OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `osDiskType`
-
-The default is "Ephemeral" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to "Managed". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os).
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Ephemeral'
- 'Managed'
- ]
- ```
-
-### Parameter: `osSku`
-
-Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'AzureLinux'
- 'CBLMariner'
- 'Ubuntu'
- 'Windows2019'
- 'Windows2022'
- ]
- ```
-
-### Parameter: `osType`
-
-The operating system type. The default is Linux.
-
-- Required: No
-- Type: string
-- Default: `'Linux'`
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `podSubnetId`
-
-Subnet ID for the pod IPs. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `proximityPlacementGroupResourceId`
-
-The ID for the Proximity Placement Group.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `scaleDownMode`
-
-Describes how VMs are added to or removed from Agent Pools. See billing states (https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing).
-
-- Required: No
-- Type: string
-- Default: `'Delete'`
-- Allowed:
- ```Bicep
- [
- 'Deallocate'
- 'Delete'
- ]
- ```
-
-### Parameter: `scaleSetEvictionPolicy`
-
-The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see spot VMs.
-
-- Required: No
-- Type: string
-- Default: `'Delete'`
-- Allowed:
- ```Bicep
- [
- 'Deallocate'
- 'Delete'
- ]
- ```
-
-### Parameter: `scaleSetPriority`
-
-The Virtual Machine Scale Set priority.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Regular'
- 'Spot'
- ]
- ```
-
-### Parameter: `sourceResourceId`
-
-This is the ARM ID of the source object to be used to create the target object.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `spotMaxPrice`
-
-Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see spot VMs pricing (https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#pricing).
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `type`
-
-The type of Agent Pool.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `vmSize`
-
-VM size. VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: /azure/aks/quotas-skus-regions.
-
-- Required: No
-- Type: string
-- Default: `'Standard_D2s_v3'`
-
-### Parameter: `vnetSubnetId`
-
-Node Subnet ID. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `workloadRuntime`
-
-Determines the type of workload a node can run.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the agent pool. |
-| `resourceGroupName` | string | The resource group the agent pool was deployed into. |
-| `resourceId` | string | The resource ID of the agent pool. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/container-service/managed-cluster/agent-pool/main.bicep b/modules/container-service/managed-cluster/agent-pool/main.bicep
deleted file mode 100644
index aae427dcdc..0000000000
--- a/modules/container-service/managed-cluster/agent-pool/main.bicep
+++ /dev/null
@@ -1,228 +0,0 @@
-metadata name = 'Azure Kubernetes Service (AKS) Managed Cluster Agent Pools'
-metadata description = 'This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent managed cluster. Required if the template is used in a standalone deployment.')
-param managedClusterName string
-
-@description('Required. Name of the agent pool.')
-param name string
-
-@description('Optional. The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is "VirtualMachineScaleSets".')
-param availabilityZones array = []
-
-@description('Optional. Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.')
-@minValue(0)
-@maxValue(1000)
-param count int = 1
-
-@description('Optional. This is the ARM ID of the source object to be used to create the target object.')
-param sourceResourceId string = ''
-
-@description('Optional. Whether to enable auto-scaler.')
-param enableAutoScaling bool = false
-
-@description('Optional. This is only supported on certain VM sizes and in certain Azure regions. For more information, see: /azure/aks/enable-host-encryption. For security reasons, this setting should be enabled.')
-param enableEncryptionAtHost bool = false
-
-@description('Optional. See Add a FIPS-enabled node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.')
-param enableFIPS bool = false
-
-@description('Optional. Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools).')
-param enableNodePublicIP bool = false
-
-@description('Optional. Whether to enable UltraSSD.')
-param enableUltraSSD bool = false
-
-@description('Optional. GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.')
-@allowed([
- 'MIG1g'
- 'MIG2g'
- 'MIG3g'
- 'MIG4g'
- 'MIG7g'
- ''
-])
-param gpuInstanceProfile string = ''
-
-@description('Optional. Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.')
-param kubeletDiskType string = ''
-
-@description('Optional. The maximum number of nodes for auto-scaling.')
-param maxCount int = -1
-
-@description('Optional. The maximum number of pods that can run on a node.')
-param maxPods int = -1
-
-@description('Optional. The minimum number of nodes for auto-scaling.')
-param minCount int = -1
-
-@description('Optional. A cluster must have at least one "System" Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: /azure/aks/use-system-pools.')
-param mode string = ''
-
-@description('Optional. The node labels to be persisted across all nodes in agent pool.')
-param nodeLabels object = {}
-
-@description('Optional. ResourceId of the node PublicIPPrefix.')
-param nodePublicIpPrefixId string = ''
-
-@description('Optional. The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.')
-param nodeTaints array = []
-
-@description('Optional. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).')
-param orchestratorVersion string = ''
-
-@description('Optional. OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.')
-param osDiskSizeGB int = 0
-
-@description('Optional. The default is "Ephemeral" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to "Managed". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os).')
-@allowed([
- 'Ephemeral'
- 'Managed'
- ''
-])
-param osDiskType string = ''
-
-@description('Optional. Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows.')
-@allowed([
- 'AzureLinux'
- 'CBLMariner'
- 'Ubuntu'
- 'Windows2019'
- 'Windows2022'
- ''
-])
-param osSku string = ''
-
-@description('Optional. The operating system type. The default is Linux.')
-@allowed([
- 'Linux'
- 'Windows'
-])
-param osType string = 'Linux'
-
-@description('Optional. Subnet ID for the pod IPs. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.')
-param podSubnetId string = ''
-
-@description('Optional. The ID for the Proximity Placement Group.')
-param proximityPlacementGroupResourceId string = ''
-
-@description('Optional. Describes how VMs are added to or removed from Agent Pools. See billing states (https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing).')
-@allowed([
- 'Deallocate'
- 'Delete'
-])
-param scaleDownMode string = 'Delete'
-
-@description('Optional. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see spot VMs.')
-@allowed([
- 'Deallocate'
- 'Delete'
-])
-param scaleSetEvictionPolicy string = 'Delete'
-
-@description('Optional. The Virtual Machine Scale Set priority.')
-@allowed([
- 'Regular'
- 'Spot'
- ''
-])
-param scaleSetPriority string = ''
-
-@description('Optional. Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see spot VMs pricing (https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#pricing).')
-param spotMaxPrice int = -1
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. The type of Agent Pool.')
-param type string = ''
-
-@description('Optional. This can either be set to an integer (e.g. "5") or a percentage (e.g. "50%"). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: /azure/aks/upgrade-cluster#customize-node-surge-upgrade.')
-param maxSurge string = ''
-
-@description('Optional. VM size. VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: /azure/aks/quotas-skus-regions.')
-param vmSize string = 'Standard_D2s_v3'
-
-@description('Optional. Node Subnet ID. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.')
-param vnetSubnetId string = ''
-
-@description('Optional. Determines the type of workload a node can run.')
-param workloadRuntime string = ''
-
-var creationData = {
- sourceResourceId: !empty(sourceResourceId) ? sourceResourceId : null
-}
-
-var upgradeSettings = {
- maxSurge: maxSurge
-}
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource managedCluster 'Microsoft.ContainerService/managedClusters@2023-07-02-preview' existing = {
- name: managedClusterName
-}
-
-resource agentPool 'Microsoft.ContainerService/managedClusters/agentPools@2023-07-02-preview' = {
- name: name
- parent: managedCluster
- properties: {
- availabilityZones: availabilityZones
- count: count
- creationData: !empty(sourceResourceId) ? creationData : null
- enableAutoScaling: enableAutoScaling
- enableEncryptionAtHost: enableEncryptionAtHost
- enableFIPS: enableFIPS
- enableNodePublicIP: enableNodePublicIP
- enableUltraSSD: enableUltraSSD
- gpuInstanceProfile: !empty(gpuInstanceProfile) ? any(gpuInstanceProfile) : null
- kubeletDiskType: kubeletDiskType
- maxCount: maxCount != -1 ? maxCount : null
- maxPods: maxPods != -1 ? maxPods : null
- minCount: minCount != -1 ? minCount : null
- mode: !empty(mode) ? mode : null
- nodeLabels: nodeLabels
- nodePublicIPPrefixID: !empty(nodePublicIpPrefixId) ? nodePublicIpPrefixId : null
- nodeTaints: nodeTaints
- orchestratorVersion: orchestratorVersion
- osDiskSizeGB: osDiskSizeGB != -1 ? osDiskSizeGB : null
- osDiskType: !empty(osDiskType) ? any(osDiskType) : null
- osSKU: !empty(osSku) ? any(osSku) : null
- osType: osType
- podSubnetID: !empty(podSubnetId) ? podSubnetId : null
- proximityPlacementGroupID: !empty(proximityPlacementGroupResourceId) ? proximityPlacementGroupResourceId : null
- scaleDownMode: scaleDownMode
- scaleSetEvictionPolicy: scaleSetEvictionPolicy
- scaleSetPriority: !empty(scaleSetPriority) ? any(scaleSetPriority) : null
- spotMaxPrice: spotMaxPrice
- tags: tags
- type: type
- upgradeSettings: upgradeSettings
- vmSize: vmSize
- vnetSubnetID: vnetSubnetId
- workloadRuntime: workloadRuntime
- }
-}
-
-@description('The name of the agent pool.')
-output name string = agentPool.name
-
-@description('The resource ID of the agent pool.')
-output resourceId string = agentPool.id
-
-@description('The resource group the agent pool was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/container-service/managed-cluster/agent-pool/main.json b/modules/container-service/managed-cluster/agent-pool/main.json
deleted file mode 100644
index cf0f53629b..0000000000
--- a/modules/container-service/managed-cluster/agent-pool/main.json
+++ /dev/null
@@ -1,411 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13811832596066396545"
- },
- "name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools",
- "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "managedClusterName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent managed cluster. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the agent pool."
- }
- },
- "availabilityZones": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is \"VirtualMachineScaleSets\"."
- }
- },
- "count": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 0,
- "maxValue": 1000,
- "metadata": {
- "description": "Optional. Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1."
- }
- },
- "sourceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This is the ARM ID of the source object to be used to create the target object."
- }
- },
- "enableAutoScaling": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable auto-scaler."
- }
- },
- "enableEncryptionAtHost": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. This is only supported on certain VM sizes and in certain Azure regions. For more information, see: /azure/aks/enable-host-encryption. For security reasons, this setting should be enabled."
- }
- },
- "enableFIPS": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. See Add a FIPS-enabled node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details."
- }
- },
- "enableNodePublicIP": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools)."
- }
- },
- "enableUltraSSD": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable UltraSSD."
- }
- },
- "gpuInstanceProfile": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "MIG1g",
- "MIG2g",
- "MIG3g",
- "MIG4g",
- "MIG7g",
- ""
- ],
- "metadata": {
- "description": "Optional. GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU."
- }
- },
- "kubeletDiskType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage."
- }
- },
- "maxCount": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The maximum number of nodes for auto-scaling."
- }
- },
- "maxPods": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The maximum number of pods that can run on a node."
- }
- },
- "minCount": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The minimum number of nodes for auto-scaling."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. A cluster must have at least one \"System\" Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: /azure/aks/use-system-pools."
- }
- },
- "nodeLabels": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The node labels to be persisted across all nodes in agent pool."
- }
- },
- "nodePublicIpPrefixId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ResourceId of the node PublicIPPrefix."
- }
- },
- "nodeTaints": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule."
- }
- },
- "orchestratorVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#upgrade-a-node-pool)."
- }
- },
- "osDiskSizeGB": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified."
- }
- },
- "osDiskType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Ephemeral",
- "Managed",
- ""
- ],
- "metadata": {
- "description": "Optional. The default is \"Ephemeral\" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to \"Managed\". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os)."
- }
- },
- "osSku": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "AzureLinux",
- "CBLMariner",
- "Ubuntu",
- "Windows2019",
- "Windows2022",
- ""
- ],
- "metadata": {
- "description": "Optional. Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows."
- }
- },
- "osType": {
- "type": "string",
- "defaultValue": "Linux",
- "allowedValues": [
- "Linux",
- "Windows"
- ],
- "metadata": {
- "description": "Optional. The operating system type. The default is Linux."
- }
- },
- "podSubnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Subnet ID for the pod IPs. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}."
- }
- },
- "proximityPlacementGroupResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The ID for the Proximity Placement Group."
- }
- },
- "scaleDownMode": {
- "type": "string",
- "defaultValue": "Delete",
- "allowedValues": [
- "Deallocate",
- "Delete"
- ],
- "metadata": {
- "description": "Optional. Describes how VMs are added to or removed from Agent Pools. See billing states (https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing)."
- }
- },
- "scaleSetEvictionPolicy": {
- "type": "string",
- "defaultValue": "Delete",
- "allowedValues": [
- "Deallocate",
- "Delete"
- ],
- "metadata": {
- "description": "Optional. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see spot VMs."
- }
- },
- "scaleSetPriority": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Regular",
- "Spot",
- ""
- ],
- "metadata": {
- "description": "Optional. The Virtual Machine Scale Set priority."
- }
- },
- "spotMaxPrice": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see spot VMs pricing (https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#pricing)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "type": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The type of Agent Pool."
- }
- },
- "maxSurge": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This can either be set to an integer (e.g. \"5\") or a percentage (e.g. \"50%\"). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: /azure/aks/upgrade-cluster#customize-node-surge-upgrade."
- }
- },
- "vmSize": {
- "type": "string",
- "defaultValue": "Standard_D2s_v3",
- "metadata": {
- "description": "Optional. VM size. VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: /azure/aks/quotas-skus-regions."
- }
- },
- "vnetSubnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Node Subnet ID. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}."
- }
- },
- "workloadRuntime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Determines the type of workload a node can run."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "creationData": {
- "sourceResourceId": "[if(not(empty(parameters('sourceResourceId'))), parameters('sourceResourceId'), null())]"
- },
- "upgradeSettings": {
- "maxSurge": "[parameters('maxSurge')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "managedCluster": {
- "existing": true,
- "type": "Microsoft.ContainerService/managedClusters",
- "apiVersion": "2023-07-02-preview",
- "name": "[parameters('managedClusterName')]"
- },
- "agentPool": {
- "type": "Microsoft.ContainerService/managedClusters/agentPools",
- "apiVersion": "2023-07-02-preview",
- "name": "[format('{0}/{1}', parameters('managedClusterName'), parameters('name'))]",
- "properties": {
- "availabilityZones": "[parameters('availabilityZones')]",
- "count": "[parameters('count')]",
- "creationData": "[if(not(empty(parameters('sourceResourceId'))), variables('creationData'), null())]",
- "enableAutoScaling": "[parameters('enableAutoScaling')]",
- "enableEncryptionAtHost": "[parameters('enableEncryptionAtHost')]",
- "enableFIPS": "[parameters('enableFIPS')]",
- "enableNodePublicIP": "[parameters('enableNodePublicIP')]",
- "enableUltraSSD": "[parameters('enableUltraSSD')]",
- "gpuInstanceProfile": "[if(not(empty(parameters('gpuInstanceProfile'))), parameters('gpuInstanceProfile'), null())]",
- "kubeletDiskType": "[parameters('kubeletDiskType')]",
- "maxCount": "[if(not(equals(parameters('maxCount'), -1)), parameters('maxCount'), null())]",
- "maxPods": "[if(not(equals(parameters('maxPods'), -1)), parameters('maxPods'), null())]",
- "minCount": "[if(not(equals(parameters('minCount'), -1)), parameters('minCount'), null())]",
- "mode": "[if(not(empty(parameters('mode'))), parameters('mode'), null())]",
- "nodeLabels": "[parameters('nodeLabels')]",
- "nodePublicIPPrefixID": "[if(not(empty(parameters('nodePublicIpPrefixId'))), parameters('nodePublicIpPrefixId'), null())]",
- "nodeTaints": "[parameters('nodeTaints')]",
- "orchestratorVersion": "[parameters('orchestratorVersion')]",
- "osDiskSizeGB": "[if(not(equals(parameters('osDiskSizeGB'), -1)), parameters('osDiskSizeGB'), null())]",
- "osDiskType": "[if(not(empty(parameters('osDiskType'))), parameters('osDiskType'), null())]",
- "osSKU": "[if(not(empty(parameters('osSku'))), parameters('osSku'), null())]",
- "osType": "[parameters('osType')]",
- "podSubnetID": "[if(not(empty(parameters('podSubnetId'))), parameters('podSubnetId'), null())]",
- "proximityPlacementGroupID": "[if(not(empty(parameters('proximityPlacementGroupResourceId'))), parameters('proximityPlacementGroupResourceId'), null())]",
- "scaleDownMode": "[parameters('scaleDownMode')]",
- "scaleSetEvictionPolicy": "[parameters('scaleSetEvictionPolicy')]",
- "scaleSetPriority": "[if(not(empty(parameters('scaleSetPriority'))), parameters('scaleSetPriority'), null())]",
- "spotMaxPrice": "[parameters('spotMaxPrice')]",
- "tags": "[parameters('tags')]",
- "type": "[parameters('type')]",
- "upgradeSettings": "[variables('upgradeSettings')]",
- "vmSize": "[parameters('vmSize')]",
- "vnetSubnetID": "[parameters('vnetSubnetId')]",
- "workloadRuntime": "[parameters('workloadRuntime')]"
- },
- "dependsOn": [
- "managedCluster"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the agent pool."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the agent pool."
- },
- "value": "[resourceId('Microsoft.ContainerService/managedClusters/agentPools', parameters('managedClusterName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the agent pool was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-service/managed-cluster/agent-pool/version.json b/modules/container-service/managed-cluster/agent-pool/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/container-service/managed-cluster/agent-pool/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/container-service/managed-cluster/main.bicep b/modules/container-service/managed-cluster/main.bicep
deleted file mode 100644
index bd9f8294c5..0000000000
--- a/modules/container-service/managed-cluster/main.bicep
+++ /dev/null
@@ -1,840 +0,0 @@
-metadata name = 'Azure Kubernetes Service (AKS) Managed Clusters'
-metadata description = 'This module deploys an Azure Kubernetes Service (AKS) Managed Cluster.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Specifies the name of the AKS cluster.')
-param name string
-
-@description('Optional. Specifies the location of AKS cluster. It picks up Resource Group\'s location by default.')
-param location string = resourceGroup().location
-
-@description('Optional. Specifies the DNS prefix specified when creating the managed cluster.')
-param dnsPrefix string = name
-
-@description('Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Network dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin.')
-@allowed([
- ''
- 'azure'
- 'cilium'
-])
-param networkDataplane string = ''
-
-@description('Optional. Specifies the network plugin used for building Kubernetes network.')
-@allowed([
- ''
- 'azure'
- 'kubenet'
-])
-param networkPlugin string = ''
-
-@description('Optional. Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin.')
-@allowed([
- ''
- 'overlay'
-])
-param networkPluginMode string = ''
-
-@description('Optional. Specifies the network policy used for building Kubernetes network. - calico or azure.')
-@allowed([
- ''
- 'azure'
- 'calico'
-])
-param networkPolicy string = ''
-
-@description('Optional. Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used.')
-param podCidr string = ''
-
-@description('Optional. A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.')
-param serviceCidr string = ''
-
-@description('Optional. Specifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.')
-param dnsServiceIP string = ''
-
-@description('Optional. Specifies the sku of the load balancer used by the virtual machine scale sets used by nodepools.')
-@allowed([
- 'basic'
- 'standard'
-])
-param loadBalancerSku string = 'standard'
-
-@description('Optional. Outbound IP Count for the Load balancer.')
-param managedOutboundIPCount int = 0
-
-@description('Optional. Specifies outbound (egress) routing method. - loadBalancer or userDefinedRouting.')
-@allowed([
- 'loadBalancer'
- 'userDefinedRouting'
-])
-param outboundType string = 'loadBalancer'
-
-@description('Optional. Tier of a managed cluster SKU. - Free or Standard.')
-@allowed([
- 'Free'
- 'Premium'
- 'Standard'
-])
-param skuTier string = 'Free'
-
-@description('Optional. Version of Kubernetes specified when creating the managed cluster.')
-param kubernetesVersion string = ''
-
-@description('Optional. Specifies the administrator username of Linux virtual machines.')
-param adminUsername string = 'azureuser'
-
-@description('Optional. Specifies the SSH RSA public key string for the Linux nodes.')
-param sshPublicKey string = ''
-
-@description('Conditional. Information about a service principal identity for the cluster to use for manipulating Azure APIs. Required if no managed identities are assigned to the cluster.')
-param aksServicePrincipalProfile object = {}
-
-@description('Optional. The client AAD application ID.')
-param aadProfileClientAppID string = ''
-
-@description('Optional. The server AAD application ID.')
-param aadProfileServerAppID string = ''
-
-@description('Optional. The server AAD application secret.')
-#disable-next-line secure-secrets-in-params // Not a secret
-param aadProfileServerAppSecret string = ''
-
-@description('Optional. Specifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication.')
-param aadProfileTenantId string = subscription().tenantId
-
-@description('Optional. Specifies the AAD group object IDs that will have admin role of the cluster.')
-param aadProfileAdminGroupObjectIDs array = []
-
-@description('Optional. Specifies whether to enable managed AAD integration.')
-param aadProfileManaged bool = true
-
-@description('Optional. Whether to enable Kubernetes Role-Based Access Control.')
-param enableRBAC bool = true
-
-@description('Optional. Specifies whether to enable Azure RBAC for Kubernetes authorization.')
-param aadProfileEnableAzureRBAC bool = enableRBAC
-
-@description('Optional. If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled.')
-param disableLocalAccounts bool = false
-
-@description('Optional. Name of the resource group containing agent pool nodes.')
-param nodeResourceGroup string = '${resourceGroup().name}_aks_${name}_nodes'
-
-@description('Optional. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer.')
-param authorizedIPRanges array = []
-
-@description('Optional. Whether to disable run command for the cluster or not.')
-param disableRunCommand bool = false
-
-@description('Optional. Specifies whether to create the cluster as a private cluster or not.')
-param enablePrivateCluster bool = false
-
-@description('Optional. Whether to create additional public FQDN for private cluster or not.')
-param enablePrivateClusterPublicFQDN bool = false
-
-@description('Optional. Private DNS Zone configuration. Set to \'system\' and AKS will create a private DNS zone in the node resource group. Set to \'\' to disable private DNS Zone creation and use public DNS. Supply the resource ID here of an existing Private DNS zone to use an existing zone.')
-param privateDNSZone string = ''
-
-@description('Required. Properties of the primary agent pool.')
-param primaryAgentPoolProfile array
-
-@description('Optional. Define one or more secondary/additional agent pools.')
-param agentPools array = []
-
-@description('Optional. Specifies whether the httpApplicationRouting add-on is enabled or not.')
-param httpApplicationRoutingEnabled bool = false
-
-@description('Optional. Specifies whether the webApplicationRoutingEnabled add-on is enabled or not.')
-param webApplicationRoutingEnabled bool = false
-
-@description('Optional. Specifies the resource ID of connected DNS zone. It will be ignored if `webApplicationRoutingEnabled` is set to `false`.')
-param dnsZoneResourceId string = ''
-
-@description('Optional. Specifies whether assing the DNS zone contributor role to the cluster service principal. It will be ignored if `webApplicationRoutingEnabled` is set to `false` or `dnsZoneResourceId` not provided.')
-param enableDnsZoneContributorRoleAssignment bool = true
-
-@description('Optional. Specifies whether the ingressApplicationGateway (AGIC) add-on is enabled or not.')
-param ingressApplicationGatewayEnabled bool = false
-
-@description('Conditional. Specifies the resource ID of connected application gateway. Required if `ingressApplicationGatewayEnabled` is set to `true`.')
-param appGatewayResourceId string = ''
-
-@description('Optional. Specifies whether the aciConnectorLinux add-on is enabled or not.')
-param aciConnectorLinuxEnabled bool = false
-
-@description('Optional. Specifies whether the azurepolicy add-on is enabled or not. For security reasons, this setting should be enabled.')
-param azurePolicyEnabled bool = true
-
-@description('Optional. Specifies whether the openServiceMesh add-on is enabled or not.')
-param openServiceMeshEnabled bool = false
-
-@description('Optional. Specifies the azure policy version to use.')
-param azurePolicyVersion string = 'v2'
-
-@description('Optional. Specifies whether the kubeDashboard add-on is enabled or not.')
-param kubeDashboardEnabled bool = false
-
-@description('Optional. Specifies whether the KeyvaultSecretsProvider add-on is enabled or not.')
-#disable-next-line secure-secrets-in-params // Not a secret
-param enableKeyvaultSecretsProvider bool = false
-
-@allowed([
- 'false'
- 'true'
-])
-@description('Optional. Specifies whether the KeyvaultSecretsProvider add-on uses secret rotation.')
-#disable-next-line secure-secrets-in-params // Not a secret
-param enableSecretRotation string = 'false'
-
-@description('Optional. Specifies the scan interval of the auto-scaler of the AKS cluster.')
-param autoScalerProfileScanInterval string = '10s'
-
-@description('Optional. Specifies the scale down delay after add of the auto-scaler of the AKS cluster.')
-param autoScalerProfileScaleDownDelayAfterAdd string = '10m'
-
-@description('Optional. Specifies the scale down delay after delete of the auto-scaler of the AKS cluster.')
-param autoScalerProfileScaleDownDelayAfterDelete string = '20s'
-
-@description('Optional. Specifies scale down delay after failure of the auto-scaler of the AKS cluster.')
-param autoScalerProfileScaleDownDelayAfterFailure string = '3m'
-
-@description('Optional. Specifies the scale down unneeded time of the auto-scaler of the AKS cluster.')
-param autoScalerProfileScaleDownUnneededTime string = '10m'
-
-@description('Optional. Specifies the scale down unready time of the auto-scaler of the AKS cluster.')
-param autoScalerProfileScaleDownUnreadyTime string = '20m'
-
-@description('Optional. Specifies the utilization threshold of the auto-scaler of the AKS cluster.')
-param autoScalerProfileUtilizationThreshold string = '0.5'
-
-@description('Optional. Specifies the max graceful termination time interval in seconds for the auto-scaler of the AKS cluster.')
-param autoScalerProfileMaxGracefulTerminationSec string = '600'
-
-@allowed([
- 'false'
- 'true'
-])
-@description('Optional. Specifies the balance of similar node groups for the auto-scaler of the AKS cluster.')
-param autoScalerProfileBalanceSimilarNodeGroups string = 'false'
-
-@allowed([
- 'least-waste'
- 'most-pods'
- 'priority'
- 'random'
-])
-@description('Optional. Specifies the expand strategy for the auto-scaler of the AKS cluster.')
-param autoScalerProfileExpander string = 'random'
-
-@description('Optional. Specifies the maximum empty bulk delete for the auto-scaler of the AKS cluster.')
-param autoScalerProfileMaxEmptyBulkDelete string = '10'
-
-@description('Optional. Specifies the maximum node provisioning time for the auto-scaler of the AKS cluster. Values must be an integer followed by an "m". No unit of time other than minutes (m) is supported.')
-param autoScalerProfileMaxNodeProvisionTime string = '15m'
-
-@description('Optional. Specifies the mximum total unready percentage for the auto-scaler of the AKS cluster. The maximum is 100 and the minimum is 0.')
-param autoScalerProfileMaxTotalUnreadyPercentage string = '45'
-
-@description('Optional. For scenarios like burst/batch scale where you do not want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they are a certain age. Values must be an integer followed by a unit ("s" for seconds, "m" for minutes, "h" for hours, etc).')
-param autoScalerProfileNewPodScaleUpDelay string = '0s'
-
-@description('Optional. Specifies the OK total unready count for the auto-scaler of the AKS cluster.')
-param autoScalerProfileOkTotalUnreadyCount string = '3'
-
-@allowed([
- 'false'
- 'true'
-])
-@description('Optional. Specifies if nodes with local storage should be skipped for the auto-scaler of the AKS cluster.')
-param autoScalerProfileSkipNodesWithLocalStorage string = 'true'
-
-@allowed([
- 'false'
- 'true'
-])
-@description('Optional. Specifies if nodes with system pods should be skipped for the auto-scaler of the AKS cluster.')
-param autoScalerProfileSkipNodesWithSystemPods string = 'true'
-
-@allowed([
- 'node-image'
- 'none'
- 'patch'
- 'rapid'
- 'stable'
- ''
-])
-@description('Optional. Auto-upgrade channel on the AKS cluster.')
-param autoUpgradeProfileUpgradeChannel string = ''
-
-@description('Optional. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing.')
-param podIdentityProfileAllowNetworkPluginKubenet bool = false
-
-@description('Optional. Whether the pod identity addon is enabled.')
-param podIdentityProfileEnable bool = false
-
-@description('Optional. The pod identities to use in the cluster.')
-param podIdentityProfileUserAssignedIdentities array = []
-
-@description('Optional. The pod identity exceptions to allow.')
-param podIdentityProfileUserAssignedIdentityExceptions array = []
-
-@description('Optional. Whether the The OIDC issuer profile of the Managed Cluster is enabled.')
-param enableOidcIssuerProfile bool = false
-
-@description('Optional. Whether to enable Workload Identity. Requires OIDC issuer profile to be enabled.')
-param enableWorkloadIdentity bool = false
-
-@description('Optional. Whether to enable Azure Defender.')
-param enableAzureDefender bool = false
-
-@description('Optional. Whether to enable Kubernetes pod security policy. Requires enabling the pod security policy feature flag on the subscription.')
-param enablePodSecurityPolicy bool = false
-
-@description('Optional. Whether the AzureBlob CSI Driver for the storage profile is enabled.')
-param enableStorageProfileBlobCSIDriver bool = false
-
-@description('Optional. Whether the AzureDisk CSI Driver for the storage profile is enabled.')
-param enableStorageProfileDiskCSIDriver bool = false
-
-@description('Optional. Whether the AzureFile CSI Driver for the storage profile is enabled.')
-param enableStorageProfileFileCSIDriver bool = false
-
-@description('Optional. Whether the snapshot controller for the storage profile is enabled.')
-param enableStorageProfileSnapshotController bool = false
-
-@allowed([
- 'AKSLongTermSupport'
- 'KubernetesOfficial'
-])
-@description('Optional. The support plan for the Managed Cluster.')
-param supportPlan string = 'KubernetesOfficial'
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Specifies whether the OMS agent is enabled.')
-param omsAgentEnabled bool = true
-
-@description('Optional. Resource ID of the monitoring log analytics workspace.')
-param monitoringWorkspaceId string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. The resource ID of the disc encryption set to apply to the cluster. For security reasons, this value should be provided.')
-param diskEncryptionSetID string = ''
-
-@description('Optional. Configuration settings that are sensitive, as name-value pairs for configuring this extension.')
-@secure()
-param fluxConfigurationProtectedSettings object = {}
-
-@description('Optional. Settings and configurations for the flux extension.')
-param fluxExtension object = {}
-
-@description('Optional. Configurations for provisioning the cluster with HTTP proxy servers.')
-param httpProxyConfig object = {}
-
-@description('Optional. Identities associated with the cluster.')
-param identityProfile object = {}
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? 'SystemAssigned' : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var linuxProfile = {
- adminUsername: adminUsername
- ssh: {
- publicKeys: [
- {
- keyData: sshPublicKey
- }
- ]
- }
-}
-
-var lbProfile = {
- managedOutboundIPs: {
- count: managedOutboundIPCount
- }
- effectiveOutboundIPs: []
-}
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- 'Azure Kubernetes Fleet Manager Contributor Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '63bb64ad-9799-4770-b5c3-24ed299a07bf')
- 'Azure Kubernetes Fleet Manager RBAC Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '434fb43a-c01c-447e-9f67-c3ad923cfaba')
- 'Azure Kubernetes Fleet Manager RBAC Cluster Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18ab4d3d-a1bf-4477-8ad9-8359bc988f69')
- 'Azure Kubernetes Fleet Manager RBAC Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '30b27cfc-9c84-438e-b0ce-70e35255df80')
- 'Azure Kubernetes Fleet Manager RBAC Writer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5af6afb3-c06c-4fa4-8848-71a8aee05683')
- 'Azure Kubernetes Service Cluster Admin Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0ab0b1a8-8aac-4efd-b8c2-3ee1fb270be8')
- 'Azure Kubernetes Service Cluster Monitoring User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1afdec4b-e479-420e-99e7-f82237c7c5e6')
- 'Azure Kubernetes Service Cluster User Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4abbcc35-e782-43d8-92c5-2d3f1bd2253f')
- 'Azure Kubernetes Service Contributor Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8')
- 'Azure Kubernetes Service RBAC Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3498e952-d568-435e-9b2c-8d77e338d7f7')
- 'Azure Kubernetes Service RBAC Cluster Admin': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b1ff04bb-8a4e-4dc4-8eb5-8693973ce19b')
- 'Azure Kubernetes Service RBAC Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f6c6a51-bcf8-42ba-9220-52d62157d7db')
- 'Azure Kubernetes Service RBAC Writer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a7ffa36f-339b-4b5c-8bdf-e2c188b2c0eb')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Kubernetes Agentless Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a2ae44-610b-4500-93be-660a0c5f5ca6')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource managedCluster 'Microsoft.ContainerService/managedClusters@2023-07-02-preview' = {
- name: name
- location: location
- tags: tags
- identity: identity
- sku: {
- name: 'Base'
- tier: skuTier
- }
- properties: {
- httpProxyConfig: !empty(httpProxyConfig) ? httpProxyConfig : null
- identityProfile: !empty(identityProfile) ? identityProfile : null
- diskEncryptionSetID: !empty(diskEncryptionSetID) ? diskEncryptionSetID : null
- kubernetesVersion: (empty(kubernetesVersion) ? null : kubernetesVersion)
- dnsPrefix: dnsPrefix
- agentPoolProfiles: primaryAgentPoolProfile
- linuxProfile: (empty(sshPublicKey) ? null : linuxProfile)
- servicePrincipalProfile: (empty(aksServicePrincipalProfile) ? null : aksServicePrincipalProfile)
- ingressProfile: {
- webAppRouting: {
- enabled: webApplicationRoutingEnabled
- dnsZoneResourceIds: !empty(dnsZoneResourceId) ? [
- dnsZoneResourceId
- ] : null
- }
- }
- addonProfiles: {
- httpApplicationRouting: {
- enabled: httpApplicationRoutingEnabled
- }
- ingressApplicationGateway: {
- enabled: ingressApplicationGatewayEnabled && !empty(appGatewayResourceId)
- config: ingressApplicationGatewayEnabled && !empty(appGatewayResourceId) ? {
- applicationGatewayId: !empty(appGatewayResourceId) ? any(appGatewayResourceId) : null
- effectiveApplicationGatewayId: !empty(appGatewayResourceId) ? any(appGatewayResourceId) : null
- } : null
- }
- omsagent: {
- enabled: omsAgentEnabled && !empty(monitoringWorkspaceId)
- config: omsAgentEnabled && !empty(monitoringWorkspaceId) ? {
- logAnalyticsWorkspaceResourceID: !empty(monitoringWorkspaceId) ? any(monitoringWorkspaceId) : null
- } : null
- }
- aciConnectorLinux: {
- enabled: aciConnectorLinuxEnabled
- }
- azurepolicy: {
- enabled: azurePolicyEnabled
- config: azurePolicyEnabled ? {
- version: azurePolicyVersion
- } : null
- }
- openServiceMesh: {
- enabled: openServiceMeshEnabled
- config: openServiceMeshEnabled ? {} : null
- }
- kubeDashboard: {
- enabled: kubeDashboardEnabled
- }
- azureKeyvaultSecretsProvider: {
- enabled: enableKeyvaultSecretsProvider
- config: enableKeyvaultSecretsProvider ? {
- enableSecretRotation: enableSecretRotation
- } : null
- }
- }
- oidcIssuerProfile: enableOidcIssuerProfile ? {
- enabled: enableOidcIssuerProfile
- } : null
- enableRBAC: enableRBAC
- disableLocalAccounts: disableLocalAccounts
- nodeResourceGroup: nodeResourceGroup
- enablePodSecurityPolicy: enablePodSecurityPolicy
- networkProfile: {
- networkDataplane: !empty(networkDataplane) ? any(networkDataplane) : null
- networkPlugin: !empty(networkPlugin) ? any(networkPlugin) : null
- networkPluginMode: !empty(networkPluginMode) ? any(networkPluginMode) : null
- networkPolicy: !empty(networkPolicy) ? any(networkPolicy) : null
- podCidr: !empty(podCidr) ? podCidr : null
- serviceCidr: !empty(serviceCidr) ? serviceCidr : null
- dnsServiceIP: !empty(dnsServiceIP) ? dnsServiceIP : null
- outboundType: outboundType
- loadBalancerSku: loadBalancerSku
- loadBalancerProfile: managedOutboundIPCount != 0 ? lbProfile : null
- }
- aadProfile: {
- clientAppID: aadProfileClientAppID
- serverAppID: aadProfileServerAppID
- serverAppSecret: aadProfileServerAppSecret
- managed: aadProfileManaged
- enableAzureRBAC: aadProfileEnableAzureRBAC
- adminGroupObjectIDs: aadProfileAdminGroupObjectIDs
- tenantID: aadProfileTenantId
- }
- autoScalerProfile: {
- 'balance-similar-node-groups': autoScalerProfileBalanceSimilarNodeGroups
- expander: autoScalerProfileExpander
- 'max-empty-bulk-delete': autoScalerProfileMaxEmptyBulkDelete
- 'max-graceful-termination-sec': autoScalerProfileMaxGracefulTerminationSec
- 'max-node-provision-time': autoScalerProfileMaxNodeProvisionTime
- 'max-total-unready-percentage': autoScalerProfileMaxTotalUnreadyPercentage
- 'new-pod-scale-up-delay': autoScalerProfileNewPodScaleUpDelay
- 'ok-total-unready-count': autoScalerProfileOkTotalUnreadyCount
- 'scale-down-delay-after-add': autoScalerProfileScaleDownDelayAfterAdd
- 'scale-down-delay-after-delete': autoScalerProfileScaleDownDelayAfterDelete
- 'scale-down-delay-after-failure': autoScalerProfileScaleDownDelayAfterFailure
- 'scale-down-unneeded-time': autoScalerProfileScaleDownUnneededTime
- 'scale-down-unready-time': autoScalerProfileScaleDownUnreadyTime
- 'scale-down-utilization-threshold': autoScalerProfileUtilizationThreshold
- 'scan-interval': autoScalerProfileScanInterval
- 'skip-nodes-with-local-storage': autoScalerProfileSkipNodesWithLocalStorage
- 'skip-nodes-with-system-pods': autoScalerProfileSkipNodesWithSystemPods
- }
- autoUpgradeProfile: {
- upgradeChannel: !empty(autoUpgradeProfileUpgradeChannel) ? autoUpgradeProfileUpgradeChannel : null
- }
- apiServerAccessProfile: {
- authorizedIPRanges: authorizedIPRanges
- disableRunCommand: disableRunCommand
- enablePrivateCluster: enablePrivateCluster
- enablePrivateClusterPublicFQDN: enablePrivateClusterPublicFQDN
- privateDNSZone: privateDNSZone
- }
- podIdentityProfile: {
- allowNetworkPluginKubenet: podIdentityProfileAllowNetworkPluginKubenet
- enabled: podIdentityProfileEnable
- userAssignedIdentities: podIdentityProfileUserAssignedIdentities
- userAssignedIdentityExceptions: podIdentityProfileUserAssignedIdentityExceptions
- }
- securityProfile: {
- azureKeyVaultKms: !empty(customerManagedKey) ? {
- enabled: true
- keyId: !empty(customerManagedKey.?keyVersion ?? '') ? '${cMKKeyVault::cMKKey.properties.keyUri}/${customerManagedKey!.keyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- keyVaultNetworkAccess: customerManagedKey!.keyVaultNetworkAccess
- keyVaultResourceId: customerManagedKey!.keyVaultNetworkAccess == 'Private' ? cMKKeyVault.id : null
- } : null
- defender: enableAzureDefender ? {
- securityMonitoring: {
- enabled: enableAzureDefender
- }
- logAnalyticsWorkspaceResourceId: !empty(monitoringWorkspaceId) ? monitoringWorkspaceId : null
- } : null
- workloadIdentity: enableWorkloadIdentity ? {
- enabled: enableWorkloadIdentity
- } : null
- }
- storageProfile: {
- blobCSIDriver: {
- enabled: enableStorageProfileBlobCSIDriver
- }
- diskCSIDriver: {
- enabled: enableStorageProfileDiskCSIDriver
- }
- fileCSIDriver: {
- enabled: enableStorageProfileFileCSIDriver
- }
- snapshotController: {
- enabled: enableStorageProfileSnapshotController
- }
- }
- supportPlan: supportPlan
- }
-}
-
-module managedCluster_agentPools 'agent-pool/main.bicep' = [for (agentPool, index) in agentPools: {
- name: '${uniqueString(deployment().name, location)}-ManagedCluster-AgentPool-${index}'
- params: {
- managedClusterName: managedCluster.name
- name: agentPool.name
- availabilityZones: contains(agentPool, 'availabilityZones') ? agentPool.availabilityZones : []
- count: contains(agentPool, 'count') ? agentPool.count : 1
- sourceResourceId: contains(agentPool, 'sourceResourceId') ? agentPool.sourceResourceId : ''
- enableAutoScaling: contains(agentPool, 'enableAutoScaling') ? agentPool.enableAutoScaling : false
- enableEncryptionAtHost: contains(agentPool, 'enableEncryptionAtHost') ? agentPool.enableEncryptionAtHost : false
- enableFIPS: contains(agentPool, 'enableFIPS') ? agentPool.enableFIPS : false
- enableNodePublicIP: contains(agentPool, 'enableNodePublicIP') ? agentPool.enableNodePublicIP : false
- enableUltraSSD: contains(agentPool, 'enableUltraSSD') ? agentPool.enableUltraSSD : false
- gpuInstanceProfile: contains(agentPool, 'gpuInstanceProfile') ? agentPool.gpuInstanceProfile : ''
- kubeletDiskType: contains(agentPool, 'kubeletDiskType') ? agentPool.kubeletDiskType : ''
- maxCount: contains(agentPool, 'maxCount') ? agentPool.maxCount : -1
- maxPods: contains(agentPool, 'maxPods') ? agentPool.maxPods : -1
- minCount: contains(agentPool, 'minCount') ? agentPool.minCount : -1
- mode: contains(agentPool, 'mode') ? agentPool.mode : ''
- nodeLabels: contains(agentPool, 'nodeLabels') ? agentPool.nodeLabels : {}
- nodePublicIpPrefixId: contains(agentPool, 'nodePublicIpPrefixId') ? agentPool.nodePublicIpPrefixId : ''
- nodeTaints: contains(agentPool, 'nodeTaints') ? agentPool.nodeTaints : []
- orchestratorVersion: contains(agentPool, 'orchestratorVersion') ? agentPool.orchestratorVersion : kubernetesVersion
- osDiskSizeGB: contains(agentPool, 'osDiskSizeGB') ? agentPool.osDiskSizeGB : -1
- osDiskType: contains(agentPool, 'osDiskType') ? agentPool.osDiskType : ''
- osSku: contains(agentPool, 'osSku') ? agentPool.osSku : ''
- osType: contains(agentPool, 'osType') ? agentPool.osType : 'Linux'
- podSubnetId: contains(agentPool, 'podSubnetId') ? agentPool.podSubnetId : ''
- proximityPlacementGroupResourceId: contains(agentPool, 'proximityPlacementGroupResourceId') ? agentPool.proximityPlacementGroupResourceId : ''
- scaleDownMode: contains(agentPool, 'scaleDownMode') ? agentPool.scaleDownMode : 'Delete'
- scaleSetEvictionPolicy: contains(agentPool, 'scaleSetEvictionPolicy') ? agentPool.scaleSetEvictionPolicy : 'Delete'
- scaleSetPriority: contains(agentPool, 'scaleSetPriority') ? agentPool.scaleSetPriority : ''
- spotMaxPrice: contains(agentPool, 'spotMaxPrice') ? agentPool.spotMaxPrice : -1
- tags: agentPool.?tags ?? tags
- type: contains(agentPool, 'type') ? agentPool.type : ''
- maxSurge: contains(agentPool, 'maxSurge') ? agentPool.maxSurge : ''
- vmSize: contains(agentPool, 'vmSize') ? agentPool.vmSize : 'Standard_D2s_v3'
- vnetSubnetId: contains(agentPool, 'vnetSubnetId') ? agentPool.vnetSubnetId : ''
- workloadRuntime: contains(agentPool, 'workloadRuntime') ? agentPool.workloadRuntime : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module managedCluster_extension '../../kubernetes-configuration/extension/main.bicep' = if (!empty(fluxExtension)) {
- name: '${uniqueString(deployment().name, location)}-ManagedCluster-FluxExtension'
- params: {
- clusterName: managedCluster.name
- configurationProtectedSettings: !empty(fluxConfigurationProtectedSettings) ? fluxConfigurationProtectedSettings : {}
- configurationSettings: contains(fluxExtension, 'configurationSettings') ? fluxExtension.configurationSettings : {}
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- extensionType: 'microsoft.flux'
- fluxConfigurations: fluxExtension.configurations
- location: location
- name: 'flux'
- releaseNamespace: 'flux-system'
- releaseTrain: contains(fluxExtension, 'releaseTrain') ? fluxExtension.releaseTrain : 'Stable'
- version: contains(fluxExtension, 'version') ? fluxExtension.version : ''
- }
-}
-
-resource managedCluster_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: managedCluster
-}
-
-resource managedCluster_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: managedCluster
-}]
-
-resource managedCluster_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(managedCluster.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: managedCluster
-}]
-
-resource dnsZone 'Microsoft.Network/dnsZones@2018-05-01' existing = if (dnsZoneResourceId != null && webApplicationRoutingEnabled) {
- name: last(split((!empty(dnsZoneResourceId) ? dnsZoneResourceId : '/dummmyZone'), '/'))!
-}
-
-resource dnsZone_roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = if (enableDnsZoneContributorRoleAssignment == true && dnsZoneResourceId != null && webApplicationRoutingEnabled) {
- name: guid(dnsZoneResourceId, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314'), 'DNS Zone Contributor')
- properties: {
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314') // 'DNS Zone Contributor'
- principalId: managedCluster.properties.ingressProfile.webAppRouting.identity.objectId
- principalType: 'ServicePrincipal'
- }
- scope: dnsZone
-}
-
-@description('The resource ID of the managed cluster.')
-output resourceId string = managedCluster.id
-
-@description('The resource group the managed cluster was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the managed cluster.')
-output name string = managedCluster.name
-
-@description('The control plane FQDN of the managed cluster.')
-output controlPlaneFQDN string = enablePrivateCluster ? managedCluster.properties.privateFQDN : managedCluster.properties.fqdn
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(managedCluster.identity, 'principalId') ? managedCluster.identity.principalId : ''
-
-@description('The Object ID of the AKS identity.')
-output kubeletidentityObjectId string = contains(managedCluster.properties, 'identityProfile') ? contains(managedCluster.properties.identityProfile, 'kubeletidentity') ? managedCluster.properties.identityProfile.kubeletidentity.objectId : '' : ''
-
-@description('The Object ID of the OMS agent identity.')
-output omsagentIdentityObjectId string = contains(managedCluster.properties, 'addonProfiles') ? contains(managedCluster.properties.addonProfiles, 'omsagent') ? contains(managedCluster.properties.addonProfiles.omsagent, 'identity') ? managedCluster.properties.addonProfiles.omsagent.identity.objectId : '' : '' : ''
-
-@description('The Object ID of the Key Vault Secrets Provider identity.')
-output keyvaultIdentityObjectId string = contains(managedCluster.properties, 'addonProfiles') ? contains(managedCluster.properties.addonProfiles, 'azureKeyvaultSecretsProvider') ? contains(managedCluster.properties.addonProfiles.azureKeyvaultSecretsProvider, 'identity') ? managedCluster.properties.addonProfiles.azureKeyvaultSecretsProvider.identity.objectId : '' : '' : ''
-
-@description('The Client ID of the Key Vault Secrets Provider identity.')
-output keyvaultIdentityClientId string = contains(managedCluster.properties, 'addonProfiles') ? contains(managedCluster.properties.addonProfiles, 'azureKeyvaultSecretsProvider') ? contains(managedCluster.properties.addonProfiles.azureKeyvaultSecretsProvider, 'identity') ? managedCluster.properties.addonProfiles.azureKeyvaultSecretsProvider.identity.clientId : '' : '' : ''
-
-@description('The location the resource was deployed into.')
-output location string = managedCluster.location
-
-@description('The OIDC token issuer URL.')
-output oidcIssuerUrl string = enableOidcIssuerProfile ? managedCluster.properties.oidcIssuerProfile.issuerURL : ''
-
-@description('The addonProfiles of the Kubernetes cluster.')
-output addonProfiles object = contains(managedCluster.properties, 'addonProfiles') ? managedCluster.properties.addonProfiles : {}
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Required. Network access of key vault. The possible values are Public and Private. Public means the key vault allows public access from all networks. Private means the key vault disables public access and enables private link. The default value is Public.')
- keyVaultNetworkAccess: ('Private' | 'Public')
-}?
diff --git a/modules/container-service/managed-cluster/main.json b/modules/container-service/managed-cluster/main.json
deleted file mode 100644
index ae0399022d..0000000000
--- a/modules/container-service/managed-cluster/main.json
+++ /dev/null
@@ -1,2242 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8572950365871080651"
- },
- "name": "Azure Kubernetes Service (AKS) Managed Clusters",
- "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "keyVaultNetworkAccess": {
- "type": "string",
- "allowedValues": [
- "Private",
- "Public"
- ],
- "metadata": {
- "description": "Required. Network access of key vault. The possible values are Public and Private. Public means the key vault allows public access from all networks. Private means the key vault disables public access and enables private link. The default value is Public."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies the name of the AKS cluster."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Specifies the location of AKS cluster. It picks up Resource Group's location by default."
- }
- },
- "dnsPrefix": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. Specifies the DNS prefix specified when creating the managed cluster."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both."
- }
- },
- "networkDataplane": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "azure",
- "cilium"
- ],
- "metadata": {
- "description": "Optional. Network dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin."
- }
- },
- "networkPlugin": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "azure",
- "kubenet"
- ],
- "metadata": {
- "description": "Optional. Specifies the network plugin used for building Kubernetes network."
- }
- },
- "networkPluginMode": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "overlay"
- ],
- "metadata": {
- "description": "Optional. Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin."
- }
- },
- "networkPolicy": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "azure",
- "calico"
- ],
- "metadata": {
- "description": "Optional. Specifies the network policy used for building Kubernetes network. - calico or azure."
- }
- },
- "podCidr": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used."
- }
- },
- "serviceCidr": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges."
- }
- },
- "dnsServiceIP": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr."
- }
- },
- "loadBalancerSku": {
- "type": "string",
- "defaultValue": "standard",
- "allowedValues": [
- "basic",
- "standard"
- ],
- "metadata": {
- "description": "Optional. Specifies the sku of the load balancer used by the virtual machine scale sets used by nodepools."
- }
- },
- "managedOutboundIPCount": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Outbound IP Count for the Load balancer."
- }
- },
- "outboundType": {
- "type": "string",
- "defaultValue": "loadBalancer",
- "allowedValues": [
- "loadBalancer",
- "userDefinedRouting"
- ],
- "metadata": {
- "description": "Optional. Specifies outbound (egress) routing method. - loadBalancer or userDefinedRouting."
- }
- },
- "skuTier": {
- "type": "string",
- "defaultValue": "Free",
- "allowedValues": [
- "Free",
- "Premium",
- "Standard"
- ],
- "metadata": {
- "description": "Optional. Tier of a managed cluster SKU. - Free or Standard."
- }
- },
- "kubernetesVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Version of Kubernetes specified when creating the managed cluster."
- }
- },
- "adminUsername": {
- "type": "string",
- "defaultValue": "azureuser",
- "metadata": {
- "description": "Optional. Specifies the administrator username of Linux virtual machines."
- }
- },
- "sshPublicKey": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the SSH RSA public key string for the Linux nodes."
- }
- },
- "aksServicePrincipalProfile": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Conditional. Information about a service principal identity for the cluster to use for manipulating Azure APIs. Required if no managed identities are assigned to the cluster."
- }
- },
- "aadProfileClientAppID": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The client AAD application ID."
- }
- },
- "aadProfileServerAppID": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The server AAD application ID."
- }
- },
- "aadProfileServerAppSecret": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The server AAD application secret."
- }
- },
- "aadProfileTenantId": {
- "type": "string",
- "defaultValue": "[subscription().tenantId]",
- "metadata": {
- "description": "Optional. Specifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication."
- }
- },
- "aadProfileAdminGroupObjectIDs": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specifies the AAD group object IDs that will have admin role of the cluster."
- }
- },
- "aadProfileManaged": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether to enable managed AAD integration."
- }
- },
- "enableRBAC": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Whether to enable Kubernetes Role-Based Access Control."
- }
- },
- "aadProfileEnableAzureRBAC": {
- "type": "bool",
- "defaultValue": "[parameters('enableRBAC')]",
- "metadata": {
- "description": "Optional. Specifies whether to enable Azure RBAC for Kubernetes authorization."
- }
- },
- "disableLocalAccounts": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled."
- }
- },
- "nodeResourceGroup": {
- "type": "string",
- "defaultValue": "[format('{0}_aks_{1}_nodes', resourceGroup().name, parameters('name'))]",
- "metadata": {
- "description": "Optional. Name of the resource group containing agent pool nodes."
- }
- },
- "authorizedIPRanges": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer."
- }
- },
- "disableRunCommand": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to disable run command for the cluster or not."
- }
- },
- "enablePrivateCluster": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether to create the cluster as a private cluster or not."
- }
- },
- "enablePrivateClusterPublicFQDN": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to create additional public FQDN for private cluster or not."
- }
- },
- "privateDNSZone": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Private DNS Zone configuration. Set to 'system' and AKS will create a private DNS zone in the node resource group. Set to '' to disable private DNS Zone creation and use public DNS. Supply the resource ID here of an existing Private DNS zone to use an existing zone."
- }
- },
- "primaryAgentPoolProfile": {
- "type": "array",
- "metadata": {
- "description": "Required. Properties of the primary agent pool."
- }
- },
- "agentPools": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Define one or more secondary/additional agent pools."
- }
- },
- "httpApplicationRoutingEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the httpApplicationRouting add-on is enabled or not."
- }
- },
- "webApplicationRoutingEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the webApplicationRoutingEnabled add-on is enabled or not."
- }
- },
- "dnsZoneResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Specifies the resource ID of connected DNS zone. It will be ignored if `webApplicationRoutingEnabled` is set to `false`."
- }
- },
- "enableDnsZoneContributorRoleAssignment": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether assing the DNS zone contributor role to the cluster service principal. It will be ignored if `webApplicationRoutingEnabled` is set to `false` or `dnsZoneResourceId` not provided."
- }
- },
- "ingressApplicationGatewayEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the ingressApplicationGateway (AGIC) add-on is enabled or not."
- }
- },
- "appGatewayResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Specifies the resource ID of connected application gateway. Required if `ingressApplicationGatewayEnabled` is set to `true`."
- }
- },
- "aciConnectorLinuxEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the aciConnectorLinux add-on is enabled or not."
- }
- },
- "azurePolicyEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether the azurepolicy add-on is enabled or not. For security reasons, this setting should be enabled."
- }
- },
- "openServiceMeshEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the openServiceMesh add-on is enabled or not."
- }
- },
- "azurePolicyVersion": {
- "type": "string",
- "defaultValue": "v2",
- "metadata": {
- "description": "Optional. Specifies the azure policy version to use."
- }
- },
- "kubeDashboardEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the kubeDashboard add-on is enabled or not."
- }
- },
- "enableKeyvaultSecretsProvider": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether the KeyvaultSecretsProvider add-on is enabled or not."
- }
- },
- "enableSecretRotation": {
- "type": "string",
- "defaultValue": "false",
- "allowedValues": [
- "false",
- "true"
- ],
- "metadata": {
- "description": "Optional. Specifies whether the KeyvaultSecretsProvider add-on uses secret rotation."
- }
- },
- "autoScalerProfileScanInterval": {
- "type": "string",
- "defaultValue": "10s",
- "metadata": {
- "description": "Optional. Specifies the scan interval of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileScaleDownDelayAfterAdd": {
- "type": "string",
- "defaultValue": "10m",
- "metadata": {
- "description": "Optional. Specifies the scale down delay after add of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileScaleDownDelayAfterDelete": {
- "type": "string",
- "defaultValue": "20s",
- "metadata": {
- "description": "Optional. Specifies the scale down delay after delete of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileScaleDownDelayAfterFailure": {
- "type": "string",
- "defaultValue": "3m",
- "metadata": {
- "description": "Optional. Specifies scale down delay after failure of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileScaleDownUnneededTime": {
- "type": "string",
- "defaultValue": "10m",
- "metadata": {
- "description": "Optional. Specifies the scale down unneeded time of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileScaleDownUnreadyTime": {
- "type": "string",
- "defaultValue": "20m",
- "metadata": {
- "description": "Optional. Specifies the scale down unready time of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileUtilizationThreshold": {
- "type": "string",
- "defaultValue": "0.5",
- "metadata": {
- "description": "Optional. Specifies the utilization threshold of the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileMaxGracefulTerminationSec": {
- "type": "string",
- "defaultValue": "600",
- "metadata": {
- "description": "Optional. Specifies the max graceful termination time interval in seconds for the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileBalanceSimilarNodeGroups": {
- "type": "string",
- "defaultValue": "false",
- "allowedValues": [
- "false",
- "true"
- ],
- "metadata": {
- "description": "Optional. Specifies the balance of similar node groups for the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileExpander": {
- "type": "string",
- "defaultValue": "random",
- "allowedValues": [
- "least-waste",
- "most-pods",
- "priority",
- "random"
- ],
- "metadata": {
- "description": "Optional. Specifies the expand strategy for the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileMaxEmptyBulkDelete": {
- "type": "string",
- "defaultValue": "10",
- "metadata": {
- "description": "Optional. Specifies the maximum empty bulk delete for the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileMaxNodeProvisionTime": {
- "type": "string",
- "defaultValue": "15m",
- "metadata": {
- "description": "Optional. Specifies the maximum node provisioning time for the auto-scaler of the AKS cluster. Values must be an integer followed by an \"m\". No unit of time other than minutes (m) is supported."
- }
- },
- "autoScalerProfileMaxTotalUnreadyPercentage": {
- "type": "string",
- "defaultValue": "45",
- "metadata": {
- "description": "Optional. Specifies the mximum total unready percentage for the auto-scaler of the AKS cluster. The maximum is 100 and the minimum is 0."
- }
- },
- "autoScalerProfileNewPodScaleUpDelay": {
- "type": "string",
- "defaultValue": "0s",
- "metadata": {
- "description": "Optional. For scenarios like burst/batch scale where you do not want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they are a certain age. Values must be an integer followed by a unit (\"s\" for seconds, \"m\" for minutes, \"h\" for hours, etc)."
- }
- },
- "autoScalerProfileOkTotalUnreadyCount": {
- "type": "string",
- "defaultValue": "3",
- "metadata": {
- "description": "Optional. Specifies the OK total unready count for the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileSkipNodesWithLocalStorage": {
- "type": "string",
- "defaultValue": "true",
- "allowedValues": [
- "false",
- "true"
- ],
- "metadata": {
- "description": "Optional. Specifies if nodes with local storage should be skipped for the auto-scaler of the AKS cluster."
- }
- },
- "autoScalerProfileSkipNodesWithSystemPods": {
- "type": "string",
- "defaultValue": "true",
- "allowedValues": [
- "false",
- "true"
- ],
- "metadata": {
- "description": "Optional. Specifies if nodes with system pods should be skipped for the auto-scaler of the AKS cluster."
- }
- },
- "autoUpgradeProfileUpgradeChannel": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "node-image",
- "none",
- "patch",
- "rapid",
- "stable",
- ""
- ],
- "metadata": {
- "description": "Optional. Auto-upgrade channel on the AKS cluster."
- }
- },
- "podIdentityProfileAllowNetworkPluginKubenet": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing."
- }
- },
- "podIdentityProfileEnable": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether the pod identity addon is enabled."
- }
- },
- "podIdentityProfileUserAssignedIdentities": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The pod identities to use in the cluster."
- }
- },
- "podIdentityProfileUserAssignedIdentityExceptions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The pod identity exceptions to allow."
- }
- },
- "enableOidcIssuerProfile": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether the The OIDC issuer profile of the Managed Cluster is enabled."
- }
- },
- "enableWorkloadIdentity": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable Workload Identity. Requires OIDC issuer profile to be enabled."
- }
- },
- "enableAzureDefender": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable Azure Defender."
- }
- },
- "enablePodSecurityPolicy": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable Kubernetes pod security policy. Requires enabling the pod security policy feature flag on the subscription."
- }
- },
- "enableStorageProfileBlobCSIDriver": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether the AzureBlob CSI Driver for the storage profile is enabled."
- }
- },
- "enableStorageProfileDiskCSIDriver": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether the AzureDisk CSI Driver for the storage profile is enabled."
- }
- },
- "enableStorageProfileFileCSIDriver": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether the AzureFile CSI Driver for the storage profile is enabled."
- }
- },
- "enableStorageProfileSnapshotController": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether the snapshot controller for the storage profile is enabled."
- }
- },
- "supportPlan": {
- "type": "string",
- "defaultValue": "KubernetesOfficial",
- "allowedValues": [
- "AKSLongTermSupport",
- "KubernetesOfficial"
- ],
- "metadata": {
- "description": "Optional. The support plan for the Managed Cluster."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "omsAgentEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies whether the OMS agent is enabled."
- }
- },
- "monitoringWorkspaceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the monitoring log analytics workspace."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "diskEncryptionSetID": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the disc encryption set to apply to the cluster. For security reasons, this value should be provided."
- }
- },
- "fluxConfigurationProtectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configuration settings that are sensitive, as name-value pairs for configuring this extension."
- }
- },
- "fluxExtension": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Settings and configurations for the flux extension."
- }
- },
- "httpProxyConfig": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configurations for provisioning the cluster with HTTP proxy servers."
- }
- },
- "identityProfile": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Identities associated with the cluster."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), 'SystemAssigned', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "linuxProfile": {
- "adminUsername": "[parameters('adminUsername')]",
- "ssh": {
- "publicKeys": [
- {
- "keyData": "[parameters('sshPublicKey')]"
- }
- ]
- }
- },
- "lbProfile": {
- "managedOutboundIPs": {
- "count": "[parameters('managedOutboundIPCount')]"
- },
- "effectiveOutboundIPs": []
- },
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Azure Kubernetes Fleet Manager Contributor Role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '63bb64ad-9799-4770-b5c3-24ed299a07bf')]",
- "Azure Kubernetes Fleet Manager RBAC Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '434fb43a-c01c-447e-9f67-c3ad923cfaba')]",
- "Azure Kubernetes Fleet Manager RBAC Cluster Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18ab4d3d-a1bf-4477-8ad9-8359bc988f69')]",
- "Azure Kubernetes Fleet Manager RBAC Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '30b27cfc-9c84-438e-b0ce-70e35255df80')]",
- "Azure Kubernetes Fleet Manager RBAC Writer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5af6afb3-c06c-4fa4-8848-71a8aee05683')]",
- "Azure Kubernetes Service Cluster Admin Role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0ab0b1a8-8aac-4efd-b8c2-3ee1fb270be8')]",
- "Azure Kubernetes Service Cluster Monitoring User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1afdec4b-e479-420e-99e7-f82237c7c5e6')]",
- "Azure Kubernetes Service Cluster User Role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4abbcc35-e782-43d8-92c5-2d3f1bd2253f')]",
- "Azure Kubernetes Service Contributor Role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8')]",
- "Azure Kubernetes Service RBAC Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3498e952-d568-435e-9b2c-8d77e338d7f7')]",
- "Azure Kubernetes Service RBAC Cluster Admin": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b1ff04bb-8a4e-4dc4-8eb5-8693973ce19b')]",
- "Azure Kubernetes Service RBAC Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f6c6a51-bcf8-42ba-9220-52d62157d7db')]",
- "Azure Kubernetes Service RBAC Writer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a7ffa36f-339b-4b5c-8bdf-e2c188b2c0eb')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Kubernetes Agentless Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a2ae44-610b-4500-93be-660a0c5f5ca6')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "managedCluster": {
- "type": "Microsoft.ContainerService/managedClusters",
- "apiVersion": "2023-07-02-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "sku": {
- "name": "Base",
- "tier": "[parameters('skuTier')]"
- },
- "properties": {
- "httpProxyConfig": "[if(not(empty(parameters('httpProxyConfig'))), parameters('httpProxyConfig'), null())]",
- "identityProfile": "[if(not(empty(parameters('identityProfile'))), parameters('identityProfile'), null())]",
- "diskEncryptionSetID": "[if(not(empty(parameters('diskEncryptionSetID'))), parameters('diskEncryptionSetID'), null())]",
- "kubernetesVersion": "[if(empty(parameters('kubernetesVersion')), null(), parameters('kubernetesVersion'))]",
- "dnsPrefix": "[parameters('dnsPrefix')]",
- "agentPoolProfiles": "[parameters('primaryAgentPoolProfile')]",
- "linuxProfile": "[if(empty(parameters('sshPublicKey')), null(), variables('linuxProfile'))]",
- "servicePrincipalProfile": "[if(empty(parameters('aksServicePrincipalProfile')), null(), parameters('aksServicePrincipalProfile'))]",
- "ingressProfile": {
- "webAppRouting": {
- "enabled": "[parameters('webApplicationRoutingEnabled')]",
- "dnsZoneResourceIds": "[if(not(empty(parameters('dnsZoneResourceId'))), createArray(parameters('dnsZoneResourceId')), null())]"
- }
- },
- "addonProfiles": {
- "httpApplicationRouting": {
- "enabled": "[parameters('httpApplicationRoutingEnabled')]"
- },
- "ingressApplicationGateway": {
- "enabled": "[and(parameters('ingressApplicationGatewayEnabled'), not(empty(parameters('appGatewayResourceId'))))]",
- "config": "[if(and(parameters('ingressApplicationGatewayEnabled'), not(empty(parameters('appGatewayResourceId')))), createObject('applicationGatewayId', if(not(empty(parameters('appGatewayResourceId'))), parameters('appGatewayResourceId'), null()), 'effectiveApplicationGatewayId', if(not(empty(parameters('appGatewayResourceId'))), parameters('appGatewayResourceId'), null())), null())]"
- },
- "omsagent": {
- "enabled": "[and(parameters('omsAgentEnabled'), not(empty(parameters('monitoringWorkspaceId'))))]",
- "config": "[if(and(parameters('omsAgentEnabled'), not(empty(parameters('monitoringWorkspaceId')))), createObject('logAnalyticsWorkspaceResourceID', if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), null())), null())]"
- },
- "aciConnectorLinux": {
- "enabled": "[parameters('aciConnectorLinuxEnabled')]"
- },
- "azurepolicy": {
- "enabled": "[parameters('azurePolicyEnabled')]",
- "config": "[if(parameters('azurePolicyEnabled'), createObject('version', parameters('azurePolicyVersion')), null())]"
- },
- "openServiceMesh": {
- "enabled": "[parameters('openServiceMeshEnabled')]",
- "config": "[if(parameters('openServiceMeshEnabled'), createObject(), null())]"
- },
- "kubeDashboard": {
- "enabled": "[parameters('kubeDashboardEnabled')]"
- },
- "azureKeyvaultSecretsProvider": {
- "enabled": "[parameters('enableKeyvaultSecretsProvider')]",
- "config": "[if(parameters('enableKeyvaultSecretsProvider'), createObject('enableSecretRotation', parameters('enableSecretRotation')), null())]"
- }
- },
- "oidcIssuerProfile": "[if(parameters('enableOidcIssuerProfile'), createObject('enabled', parameters('enableOidcIssuerProfile')), null())]",
- "enableRBAC": "[parameters('enableRBAC')]",
- "disableLocalAccounts": "[parameters('disableLocalAccounts')]",
- "nodeResourceGroup": "[parameters('nodeResourceGroup')]",
- "enablePodSecurityPolicy": "[parameters('enablePodSecurityPolicy')]",
- "networkProfile": {
- "networkDataplane": "[if(not(empty(parameters('networkDataplane'))), parameters('networkDataplane'), null())]",
- "networkPlugin": "[if(not(empty(parameters('networkPlugin'))), parameters('networkPlugin'), null())]",
- "networkPluginMode": "[if(not(empty(parameters('networkPluginMode'))), parameters('networkPluginMode'), null())]",
- "networkPolicy": "[if(not(empty(parameters('networkPolicy'))), parameters('networkPolicy'), null())]",
- "podCidr": "[if(not(empty(parameters('podCidr'))), parameters('podCidr'), null())]",
- "serviceCidr": "[if(not(empty(parameters('serviceCidr'))), parameters('serviceCidr'), null())]",
- "dnsServiceIP": "[if(not(empty(parameters('dnsServiceIP'))), parameters('dnsServiceIP'), null())]",
- "outboundType": "[parameters('outboundType')]",
- "loadBalancerSku": "[parameters('loadBalancerSku')]",
- "loadBalancerProfile": "[if(not(equals(parameters('managedOutboundIPCount'), 0)), variables('lbProfile'), null())]"
- },
- "aadProfile": {
- "clientAppID": "[parameters('aadProfileClientAppID')]",
- "serverAppID": "[parameters('aadProfileServerAppID')]",
- "serverAppSecret": "[parameters('aadProfileServerAppSecret')]",
- "managed": "[parameters('aadProfileManaged')]",
- "enableAzureRBAC": "[parameters('aadProfileEnableAzureRBAC')]",
- "adminGroupObjectIDs": "[parameters('aadProfileAdminGroupObjectIDs')]",
- "tenantID": "[parameters('aadProfileTenantId')]"
- },
- "autoScalerProfile": {
- "balance-similar-node-groups": "[parameters('autoScalerProfileBalanceSimilarNodeGroups')]",
- "expander": "[parameters('autoScalerProfileExpander')]",
- "max-empty-bulk-delete": "[parameters('autoScalerProfileMaxEmptyBulkDelete')]",
- "max-graceful-termination-sec": "[parameters('autoScalerProfileMaxGracefulTerminationSec')]",
- "max-node-provision-time": "[parameters('autoScalerProfileMaxNodeProvisionTime')]",
- "max-total-unready-percentage": "[parameters('autoScalerProfileMaxTotalUnreadyPercentage')]",
- "new-pod-scale-up-delay": "[parameters('autoScalerProfileNewPodScaleUpDelay')]",
- "ok-total-unready-count": "[parameters('autoScalerProfileOkTotalUnreadyCount')]",
- "scale-down-delay-after-add": "[parameters('autoScalerProfileScaleDownDelayAfterAdd')]",
- "scale-down-delay-after-delete": "[parameters('autoScalerProfileScaleDownDelayAfterDelete')]",
- "scale-down-delay-after-failure": "[parameters('autoScalerProfileScaleDownDelayAfterFailure')]",
- "scale-down-unneeded-time": "[parameters('autoScalerProfileScaleDownUnneededTime')]",
- "scale-down-unready-time": "[parameters('autoScalerProfileScaleDownUnreadyTime')]",
- "scale-down-utilization-threshold": "[parameters('autoScalerProfileUtilizationThreshold')]",
- "scan-interval": "[parameters('autoScalerProfileScanInterval')]",
- "skip-nodes-with-local-storage": "[parameters('autoScalerProfileSkipNodesWithLocalStorage')]",
- "skip-nodes-with-system-pods": "[parameters('autoScalerProfileSkipNodesWithSystemPods')]"
- },
- "autoUpgradeProfile": {
- "upgradeChannel": "[if(not(empty(parameters('autoUpgradeProfileUpgradeChannel'))), parameters('autoUpgradeProfileUpgradeChannel'), null())]"
- },
- "apiServerAccessProfile": {
- "authorizedIPRanges": "[parameters('authorizedIPRanges')]",
- "disableRunCommand": "[parameters('disableRunCommand')]",
- "enablePrivateCluster": "[parameters('enablePrivateCluster')]",
- "enablePrivateClusterPublicFQDN": "[parameters('enablePrivateClusterPublicFQDN')]",
- "privateDNSZone": "[parameters('privateDNSZone')]"
- },
- "podIdentityProfile": {
- "allowNetworkPluginKubenet": "[parameters('podIdentityProfileAllowNetworkPluginKubenet')]",
- "enabled": "[parameters('podIdentityProfileEnable')]",
- "userAssignedIdentities": "[parameters('podIdentityProfileUserAssignedIdentities')]",
- "userAssignedIdentityExceptions": "[parameters('podIdentityProfileUserAssignedIdentityExceptions')]"
- },
- "securityProfile": {
- "azureKeyVaultKms": "[if(not(empty(parameters('customerManagedKey'))), createObject('enabled', true(), 'keyId', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('customerManagedKey').keyVersion), reference('cMKKeyVault::cMKKey').keyUriWithVersion), 'keyVaultNetworkAccess', parameters('customerManagedKey').keyVaultNetworkAccess, 'keyVaultResourceId', if(equals(parameters('customerManagedKey').keyVaultNetworkAccess, 'Private'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]), 'Microsoft.KeyVault/vaults', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))), null())), null())]",
- "defender": "[if(parameters('enableAzureDefender'), createObject('securityMonitoring', createObject('enabled', parameters('enableAzureDefender')), 'logAnalyticsWorkspaceResourceId', if(not(empty(parameters('monitoringWorkspaceId'))), parameters('monitoringWorkspaceId'), null())), null())]",
- "workloadIdentity": "[if(parameters('enableWorkloadIdentity'), createObject('enabled', parameters('enableWorkloadIdentity')), null())]"
- },
- "storageProfile": {
- "blobCSIDriver": {
- "enabled": "[parameters('enableStorageProfileBlobCSIDriver')]"
- },
- "diskCSIDriver": {
- "enabled": "[parameters('enableStorageProfileDiskCSIDriver')]"
- },
- "fileCSIDriver": {
- "enabled": "[parameters('enableStorageProfileFileCSIDriver')]"
- },
- "snapshotController": {
- "enabled": "[parameters('enableStorageProfileSnapshotController')]"
- }
- },
- "supportPlan": "[parameters('supportPlan')]"
- },
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "managedCluster_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "managedCluster"
- ]
- },
- "managedCluster_diagnosticSettings": {
- "copy": {
- "name": "managedCluster_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "managedCluster"
- ]
- },
- "managedCluster_roleAssignments": {
- "copy": {
- "name": "managedCluster_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.ContainerService/managedClusters', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "managedCluster"
- ]
- },
- "dnsZone": {
- "condition": "[and(not(equals(parameters('dnsZoneResourceId'), null())), parameters('webApplicationRoutingEnabled'))]",
- "existing": true,
- "type": "Microsoft.Network/dnsZones",
- "apiVersion": "2018-05-01",
- "name": "[last(split(if(not(empty(parameters('dnsZoneResourceId'))), parameters('dnsZoneResourceId'), '/dummmyZone'), '/'))]"
- },
- "dnsZone_roleAssignment": {
- "condition": "[and(and(equals(parameters('enableDnsZoneContributorRoleAssignment'), true()), not(equals(parameters('dnsZoneResourceId'), null()))), parameters('webApplicationRoutingEnabled'))]",
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/dnsZones/{0}', last(split(if(not(empty(parameters('dnsZoneResourceId'))), parameters('dnsZoneResourceId'), '/dummmyZone'), '/')))]",
- "name": "[guid(parameters('dnsZoneResourceId'), subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314'), 'DNS Zone Contributor')]",
- "properties": {
- "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "principalId": "[reference('managedCluster').ingressProfile.webAppRouting.identity.objectId]",
- "principalType": "ServicePrincipal"
- },
- "dependsOn": [
- "dnsZone",
- "managedCluster"
- ]
- },
- "managedCluster_agentPools": {
- "copy": {
- "name": "managedCluster_agentPools",
- "count": "[length(parameters('agentPools'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ManagedCluster-AgentPool-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "managedClusterName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('agentPools')[copyIndex()].name]"
- },
- "availabilityZones": "[if(contains(parameters('agentPools')[copyIndex()], 'availabilityZones'), createObject('value', parameters('agentPools')[copyIndex()].availabilityZones), createObject('value', createArray()))]",
- "count": "[if(contains(parameters('agentPools')[copyIndex()], 'count'), createObject('value', parameters('agentPools')[copyIndex()].count), createObject('value', 1))]",
- "sourceResourceId": "[if(contains(parameters('agentPools')[copyIndex()], 'sourceResourceId'), createObject('value', parameters('agentPools')[copyIndex()].sourceResourceId), createObject('value', ''))]",
- "enableAutoScaling": "[if(contains(parameters('agentPools')[copyIndex()], 'enableAutoScaling'), createObject('value', parameters('agentPools')[copyIndex()].enableAutoScaling), createObject('value', false()))]",
- "enableEncryptionAtHost": "[if(contains(parameters('agentPools')[copyIndex()], 'enableEncryptionAtHost'), createObject('value', parameters('agentPools')[copyIndex()].enableEncryptionAtHost), createObject('value', false()))]",
- "enableFIPS": "[if(contains(parameters('agentPools')[copyIndex()], 'enableFIPS'), createObject('value', parameters('agentPools')[copyIndex()].enableFIPS), createObject('value', false()))]",
- "enableNodePublicIP": "[if(contains(parameters('agentPools')[copyIndex()], 'enableNodePublicIP'), createObject('value', parameters('agentPools')[copyIndex()].enableNodePublicIP), createObject('value', false()))]",
- "enableUltraSSD": "[if(contains(parameters('agentPools')[copyIndex()], 'enableUltraSSD'), createObject('value', parameters('agentPools')[copyIndex()].enableUltraSSD), createObject('value', false()))]",
- "gpuInstanceProfile": "[if(contains(parameters('agentPools')[copyIndex()], 'gpuInstanceProfile'), createObject('value', parameters('agentPools')[copyIndex()].gpuInstanceProfile), createObject('value', ''))]",
- "kubeletDiskType": "[if(contains(parameters('agentPools')[copyIndex()], 'kubeletDiskType'), createObject('value', parameters('agentPools')[copyIndex()].kubeletDiskType), createObject('value', ''))]",
- "maxCount": "[if(contains(parameters('agentPools')[copyIndex()], 'maxCount'), createObject('value', parameters('agentPools')[copyIndex()].maxCount), createObject('value', -1))]",
- "maxPods": "[if(contains(parameters('agentPools')[copyIndex()], 'maxPods'), createObject('value', parameters('agentPools')[copyIndex()].maxPods), createObject('value', -1))]",
- "minCount": "[if(contains(parameters('agentPools')[copyIndex()], 'minCount'), createObject('value', parameters('agentPools')[copyIndex()].minCount), createObject('value', -1))]",
- "mode": "[if(contains(parameters('agentPools')[copyIndex()], 'mode'), createObject('value', parameters('agentPools')[copyIndex()].mode), createObject('value', ''))]",
- "nodeLabels": "[if(contains(parameters('agentPools')[copyIndex()], 'nodeLabels'), createObject('value', parameters('agentPools')[copyIndex()].nodeLabels), createObject('value', createObject()))]",
- "nodePublicIpPrefixId": "[if(contains(parameters('agentPools')[copyIndex()], 'nodePublicIpPrefixId'), createObject('value', parameters('agentPools')[copyIndex()].nodePublicIpPrefixId), createObject('value', ''))]",
- "nodeTaints": "[if(contains(parameters('agentPools')[copyIndex()], 'nodeTaints'), createObject('value', parameters('agentPools')[copyIndex()].nodeTaints), createObject('value', createArray()))]",
- "orchestratorVersion": "[if(contains(parameters('agentPools')[copyIndex()], 'orchestratorVersion'), createObject('value', parameters('agentPools')[copyIndex()].orchestratorVersion), createObject('value', parameters('kubernetesVersion')))]",
- "osDiskSizeGB": "[if(contains(parameters('agentPools')[copyIndex()], 'osDiskSizeGB'), createObject('value', parameters('agentPools')[copyIndex()].osDiskSizeGB), createObject('value', -1))]",
- "osDiskType": "[if(contains(parameters('agentPools')[copyIndex()], 'osDiskType'), createObject('value', parameters('agentPools')[copyIndex()].osDiskType), createObject('value', ''))]",
- "osSku": "[if(contains(parameters('agentPools')[copyIndex()], 'osSku'), createObject('value', parameters('agentPools')[copyIndex()].osSku), createObject('value', ''))]",
- "osType": "[if(contains(parameters('agentPools')[copyIndex()], 'osType'), createObject('value', parameters('agentPools')[copyIndex()].osType), createObject('value', 'Linux'))]",
- "podSubnetId": "[if(contains(parameters('agentPools')[copyIndex()], 'podSubnetId'), createObject('value', parameters('agentPools')[copyIndex()].podSubnetId), createObject('value', ''))]",
- "proximityPlacementGroupResourceId": "[if(contains(parameters('agentPools')[copyIndex()], 'proximityPlacementGroupResourceId'), createObject('value', parameters('agentPools')[copyIndex()].proximityPlacementGroupResourceId), createObject('value', ''))]",
- "scaleDownMode": "[if(contains(parameters('agentPools')[copyIndex()], 'scaleDownMode'), createObject('value', parameters('agentPools')[copyIndex()].scaleDownMode), createObject('value', 'Delete'))]",
- "scaleSetEvictionPolicy": "[if(contains(parameters('agentPools')[copyIndex()], 'scaleSetEvictionPolicy'), createObject('value', parameters('agentPools')[copyIndex()].scaleSetEvictionPolicy), createObject('value', 'Delete'))]",
- "scaleSetPriority": "[if(contains(parameters('agentPools')[copyIndex()], 'scaleSetPriority'), createObject('value', parameters('agentPools')[copyIndex()].scaleSetPriority), createObject('value', ''))]",
- "spotMaxPrice": "[if(contains(parameters('agentPools')[copyIndex()], 'spotMaxPrice'), createObject('value', parameters('agentPools')[copyIndex()].spotMaxPrice), createObject('value', -1))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('agentPools')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "type": "[if(contains(parameters('agentPools')[copyIndex()], 'type'), createObject('value', parameters('agentPools')[copyIndex()].type), createObject('value', ''))]",
- "maxSurge": "[if(contains(parameters('agentPools')[copyIndex()], 'maxSurge'), createObject('value', parameters('agentPools')[copyIndex()].maxSurge), createObject('value', ''))]",
- "vmSize": "[if(contains(parameters('agentPools')[copyIndex()], 'vmSize'), createObject('value', parameters('agentPools')[copyIndex()].vmSize), createObject('value', 'Standard_D2s_v3'))]",
- "vnetSubnetId": "[if(contains(parameters('agentPools')[copyIndex()], 'vnetSubnetId'), createObject('value', parameters('agentPools')[copyIndex()].vnetSubnetId), createObject('value', ''))]",
- "workloadRuntime": "[if(contains(parameters('agentPools')[copyIndex()], 'workloadRuntime'), createObject('value', parameters('agentPools')[copyIndex()].workloadRuntime), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13811832596066396545"
- },
- "name": "Azure Kubernetes Service (AKS) Managed Cluster Agent Pools",
- "description": "This module deploys an Azure Kubernetes Service (AKS) Managed Cluster Agent Pool.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "managedClusterName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent managed cluster. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the agent pool."
- }
- },
- "availabilityZones": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is \"VirtualMachineScaleSets\"."
- }
- },
- "count": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 0,
- "maxValue": 1000,
- "metadata": {
- "description": "Optional. Desired Number of agents (VMs) specified to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1."
- }
- },
- "sourceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This is the ARM ID of the source object to be used to create the target object."
- }
- },
- "enableAutoScaling": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable auto-scaler."
- }
- },
- "enableEncryptionAtHost": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. This is only supported on certain VM sizes and in certain Azure regions. For more information, see: /azure/aks/enable-host-encryption. For security reasons, this setting should be enabled."
- }
- },
- "enableFIPS": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. See Add a FIPS-enabled node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details."
- }
- },
- "enableNodePublicIP": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools)."
- }
- },
- "enableUltraSSD": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to enable UltraSSD."
- }
- },
- "gpuInstanceProfile": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "MIG1g",
- "MIG2g",
- "MIG3g",
- "MIG4g",
- "MIG7g",
- ""
- ],
- "metadata": {
- "description": "Optional. GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU."
- }
- },
- "kubeletDiskType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage."
- }
- },
- "maxCount": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The maximum number of nodes for auto-scaling."
- }
- },
- "maxPods": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The maximum number of pods that can run on a node."
- }
- },
- "minCount": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The minimum number of nodes for auto-scaling."
- }
- },
- "mode": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. A cluster must have at least one \"System\" Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: /azure/aks/use-system-pools."
- }
- },
- "nodeLabels": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The node labels to be persisted across all nodes in agent pool."
- }
- },
- "nodePublicIpPrefixId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ResourceId of the node PublicIPPrefix."
- }
- },
- "nodeTaints": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule."
- }
- },
- "orchestratorVersion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see upgrading a node pool (https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#upgrade-a-node-pool)."
- }
- },
- "osDiskSizeGB": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified."
- }
- },
- "osDiskType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Ephemeral",
- "Managed",
- ""
- ],
- "metadata": {
- "description": "Optional. The default is \"Ephemeral\" if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to \"Managed\". May not be changed after creation. For more information see Ephemeral OS (https://learn.microsoft.com/en-us/azure/aks/cluster-configuration#ephemeral-os)."
- }
- },
- "osSku": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "AzureLinux",
- "CBLMariner",
- "Ubuntu",
- "Windows2019",
- "Windows2022",
- ""
- ],
- "metadata": {
- "description": "Optional. Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows."
- }
- },
- "osType": {
- "type": "string",
- "defaultValue": "Linux",
- "allowedValues": [
- "Linux",
- "Windows"
- ],
- "metadata": {
- "description": "Optional. The operating system type. The default is Linux."
- }
- },
- "podSubnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Subnet ID for the pod IPs. If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}."
- }
- },
- "proximityPlacementGroupResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The ID for the Proximity Placement Group."
- }
- },
- "scaleDownMode": {
- "type": "string",
- "defaultValue": "Delete",
- "allowedValues": [
- "Deallocate",
- "Delete"
- ],
- "metadata": {
- "description": "Optional. Describes how VMs are added to or removed from Agent Pools. See billing states (https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing)."
- }
- },
- "scaleSetEvictionPolicy": {
- "type": "string",
- "defaultValue": "Delete",
- "allowedValues": [
- "Deallocate",
- "Delete"
- ],
- "metadata": {
- "description": "Optional. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see spot VMs."
- }
- },
- "scaleSetPriority": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Regular",
- "Spot",
- ""
- ],
- "metadata": {
- "description": "Optional. The Virtual Machine Scale Set priority."
- }
- },
- "spotMaxPrice": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see spot VMs pricing (https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#pricing)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "type": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The type of Agent Pool."
- }
- },
- "maxSurge": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. This can either be set to an integer (e.g. \"5\") or a percentage (e.g. \"50%\"). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: /azure/aks/upgrade-cluster#customize-node-surge-upgrade."
- }
- },
- "vmSize": {
- "type": "string",
- "defaultValue": "Standard_D2s_v3",
- "metadata": {
- "description": "Optional. VM size. VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: /azure/aks/quotas-skus-regions."
- }
- },
- "vnetSubnetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Node Subnet ID. If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}."
- }
- },
- "workloadRuntime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Determines the type of workload a node can run."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "creationData": {
- "sourceResourceId": "[if(not(empty(parameters('sourceResourceId'))), parameters('sourceResourceId'), null())]"
- },
- "upgradeSettings": {
- "maxSurge": "[parameters('maxSurge')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "managedCluster": {
- "existing": true,
- "type": "Microsoft.ContainerService/managedClusters",
- "apiVersion": "2023-07-02-preview",
- "name": "[parameters('managedClusterName')]"
- },
- "agentPool": {
- "type": "Microsoft.ContainerService/managedClusters/agentPools",
- "apiVersion": "2023-07-02-preview",
- "name": "[format('{0}/{1}', parameters('managedClusterName'), parameters('name'))]",
- "properties": {
- "availabilityZones": "[parameters('availabilityZones')]",
- "count": "[parameters('count')]",
- "creationData": "[if(not(empty(parameters('sourceResourceId'))), variables('creationData'), null())]",
- "enableAutoScaling": "[parameters('enableAutoScaling')]",
- "enableEncryptionAtHost": "[parameters('enableEncryptionAtHost')]",
- "enableFIPS": "[parameters('enableFIPS')]",
- "enableNodePublicIP": "[parameters('enableNodePublicIP')]",
- "enableUltraSSD": "[parameters('enableUltraSSD')]",
- "gpuInstanceProfile": "[if(not(empty(parameters('gpuInstanceProfile'))), parameters('gpuInstanceProfile'), null())]",
- "kubeletDiskType": "[parameters('kubeletDiskType')]",
- "maxCount": "[if(not(equals(parameters('maxCount'), -1)), parameters('maxCount'), null())]",
- "maxPods": "[if(not(equals(parameters('maxPods'), -1)), parameters('maxPods'), null())]",
- "minCount": "[if(not(equals(parameters('minCount'), -1)), parameters('minCount'), null())]",
- "mode": "[if(not(empty(parameters('mode'))), parameters('mode'), null())]",
- "nodeLabels": "[parameters('nodeLabels')]",
- "nodePublicIPPrefixID": "[if(not(empty(parameters('nodePublicIpPrefixId'))), parameters('nodePublicIpPrefixId'), null())]",
- "nodeTaints": "[parameters('nodeTaints')]",
- "orchestratorVersion": "[parameters('orchestratorVersion')]",
- "osDiskSizeGB": "[if(not(equals(parameters('osDiskSizeGB'), -1)), parameters('osDiskSizeGB'), null())]",
- "osDiskType": "[if(not(empty(parameters('osDiskType'))), parameters('osDiskType'), null())]",
- "osSKU": "[if(not(empty(parameters('osSku'))), parameters('osSku'), null())]",
- "osType": "[parameters('osType')]",
- "podSubnetID": "[if(not(empty(parameters('podSubnetId'))), parameters('podSubnetId'), null())]",
- "proximityPlacementGroupID": "[if(not(empty(parameters('proximityPlacementGroupResourceId'))), parameters('proximityPlacementGroupResourceId'), null())]",
- "scaleDownMode": "[parameters('scaleDownMode')]",
- "scaleSetEvictionPolicy": "[parameters('scaleSetEvictionPolicy')]",
- "scaleSetPriority": "[if(not(empty(parameters('scaleSetPriority'))), parameters('scaleSetPriority'), null())]",
- "spotMaxPrice": "[parameters('spotMaxPrice')]",
- "tags": "[parameters('tags')]",
- "type": "[parameters('type')]",
- "upgradeSettings": "[variables('upgradeSettings')]",
- "vmSize": "[parameters('vmSize')]",
- "vnetSubnetID": "[parameters('vnetSubnetId')]",
- "workloadRuntime": "[parameters('workloadRuntime')]"
- },
- "dependsOn": [
- "managedCluster"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the agent pool."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the agent pool."
- },
- "value": "[resourceId('Microsoft.ContainerService/managedClusters/agentPools', parameters('managedClusterName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the agent pool was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "managedCluster"
- ]
- },
- "managedCluster_extension": {
- "condition": "[not(empty(parameters('fluxExtension')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ManagedCluster-FluxExtension', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "clusterName": {
- "value": "[parameters('name')]"
- },
- "configurationProtectedSettings": "[if(not(empty(parameters('fluxConfigurationProtectedSettings'))), createObject('value', parameters('fluxConfigurationProtectedSettings')), createObject('value', createObject()))]",
- "configurationSettings": "[if(contains(parameters('fluxExtension'), 'configurationSettings'), createObject('value', parameters('fluxExtension').configurationSettings), createObject('value', createObject()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "extensionType": {
- "value": "microsoft.flux"
- },
- "fluxConfigurations": {
- "value": "[parameters('fluxExtension').configurations]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "name": {
- "value": "flux"
- },
- "releaseNamespace": {
- "value": "flux-system"
- },
- "releaseTrain": "[if(contains(parameters('fluxExtension'), 'releaseTrain'), createObject('value', parameters('fluxExtension').releaseTrain), createObject('value', 'Stable'))]",
- "version": "[if(contains(parameters('fluxExtension'), 'version'), createObject('value', parameters('fluxExtension').version), createObject('value', ''))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "548642834195454661"
- },
- "name": "Kubernetes Configuration Extensions",
- "description": "This module deploys a Kubernetes Configuration Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Flux Configuration."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "clusterName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AKS cluster that should be configured."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "configurationProtectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configuration settings that are sensitive, as name-value pairs for configuring this extension."
- }
- },
- "configurationSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configuration settings, as name-value pairs for configuring this extension."
- }
- },
- "extensionType": {
- "type": "string",
- "metadata": {
- "description": "Required. Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher."
- }
- },
- "releaseTrain": {
- "type": "string",
- "defaultValue": "Stable",
- "metadata": {
- "description": "Optional. ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is \"true\"."
- }
- },
- "releaseNamespace": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created."
- }
- },
- "targetNamespace": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Version of the extension for this extension, if it is \"pinned\" to a specific version."
- }
- },
- "fluxConfigurations": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of flux configuraitons."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KubernetesConfiguration/extensions",
- "apiVersion": "2022-03-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('clusterName'))]",
- "name": "[parameters('name')]",
- "properties": {
- "autoUpgradeMinorVersion": "[if(not(empty(parameters('version'))), false(), true())]",
- "configurationProtectedSettings": "[if(not(empty(parameters('configurationProtectedSettings'))), parameters('configurationProtectedSettings'), createObject())]",
- "configurationSettings": "[if(not(empty(parameters('configurationSettings'))), parameters('configurationSettings'), createObject())]",
- "extensionType": "[parameters('extensionType')]",
- "releaseTrain": "[if(not(empty(parameters('releaseTrain'))), parameters('releaseTrain'), null())]",
- "scope": {
- "cluster": "[if(not(empty(parameters('releaseNamespace'))), createObject('releaseNamespace', parameters('releaseNamespace')), null())]",
- "namespace": "[if(not(empty(parameters('targetNamespace'))), createObject('targetNamespace', parameters('targetNamespace')), null())]"
- },
- "version": "[if(not(empty(parameters('version'))), parameters('version'), null())]"
- }
- },
- {
- "copy": {
- "name": "fluxConfiguration",
- "count": "[length(parameters('fluxConfigurations'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ManagedCluster-FluxConfiguration{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "[parameters('enableDefaultTelemetry')]"
- },
- "clusterName": {
- "value": "[parameters('clusterName')]"
- },
- "scope": {
- "value": "[parameters('fluxConfigurations')[copyIndex()].scope]"
- },
- "namespace": {
- "value": "[parameters('fluxConfigurations')[copyIndex()].namespace]"
- },
- "sourceKind": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'gitRepository'), createObject('value', 'GitRepository'), createObject('value', 'Bucket'))]",
- "name": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'name'), createObject('value', parameters('fluxConfigurations')[copyIndex()].name), createObject('value', toLower(format('{0}-fluxconfiguration{1}', parameters('clusterName'), copyIndex()))))]",
- "bucket": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'bucket'), createObject('value', parameters('fluxConfigurations')[copyIndex()].bucket), createObject('value', createObject()))]",
- "configurationProtectedSettings": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'configurationProtectedSettings'), createObject('value', parameters('fluxConfigurations')[copyIndex()].configurationProtectedSettings), createObject('value', createObject()))]",
- "gitRepository": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'gitRepository'), createObject('value', parameters('fluxConfigurations')[copyIndex()].gitRepository), createObject('value', createObject()))]",
- "kustomizations": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'kustomizations'), createObject('value', parameters('fluxConfigurations')[copyIndex()].kustomizations), createObject('value', createObject()))]",
- "suspend": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'suspend'), createObject('value', parameters('fluxConfigurations')[copyIndex()].suspend), createObject('value', false()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10031296768791737313"
- },
- "name": "Kubernetes Configuration Flux Configurations",
- "description": "This module deploys a Kubernetes Configuration Flux Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Flux Configuration."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "clusterName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AKS cluster that should be configured."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "bucket": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters to reconcile to the GitRepository source kind type."
- }
- },
- "configurationProtectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key-value pairs of protected configuration settings for the configuration."
- }
- },
- "gitRepository": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters to reconcile to the GitRepository source kind type."
- }
- },
- "kustomizations": {
- "type": "object",
- "metadata": {
- "description": "Required. Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster."
- }
- },
- "namespace": {
- "type": "string",
- "metadata": {
- "description": "Required. The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only."
- }
- },
- "scope": {
- "type": "string",
- "allowedValues": [
- "cluster",
- "namespace"
- ],
- "metadata": {
- "description": "Required. Scope at which the configuration will be installed."
- }
- },
- "sourceKind": {
- "type": "string",
- "allowedValues": [
- "Bucket",
- "GitRepository"
- ],
- "metadata": {
- "description": "Required. Source Kind to pull the configuration data from."
- }
- },
- "suspend": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether this configuration should suspend its reconciliation of its kustomizations and sources."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KubernetesConfiguration/fluxConfigurations",
- "apiVersion": "2023-05-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('clusterName'))]",
- "name": "[parameters('name')]",
- "properties": {
- "bucket": "[if(not(empty(parameters('bucket'))), parameters('bucket'), null())]",
- "configurationProtectedSettings": "[if(not(empty(parameters('configurationProtectedSettings'))), parameters('configurationProtectedSettings'), createObject())]",
- "gitRepository": "[if(not(empty(parameters('gitRepository'))), parameters('gitRepository'), null())]",
- "kustomizations": "[parameters('kustomizations')]",
- "namespace": "[parameters('namespace')]",
- "scope": "[parameters('scope')]",
- "sourceKind": "[parameters('sourceKind')]",
- "suspend": "[parameters('suspend')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the flux configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the flux configuration."
- },
- "value": "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/fluxConfigurations', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the flux configuration was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/extensions', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/extensions', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the extension was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "managedCluster"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the managed cluster."
- },
- "value": "[resourceId('Microsoft.ContainerService/managedClusters', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the managed cluster was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the managed cluster."
- },
- "value": "[parameters('name')]"
- },
- "controlPlaneFQDN": {
- "type": "string",
- "metadata": {
- "description": "The control plane FQDN of the managed cluster."
- },
- "value": "[if(parameters('enablePrivateCluster'), reference('managedCluster').privateFQDN, reference('managedCluster').fqdn)]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('managedCluster', '2023-07-02-preview', 'full').identity, 'principalId')), reference('managedCluster', '2023-07-02-preview', 'full').identity.principalId, '')]"
- },
- "kubeletidentityObjectId": {
- "type": "string",
- "metadata": {
- "description": "The Object ID of the AKS identity."
- },
- "value": "[if(contains(reference('managedCluster'), 'identityProfile'), if(contains(reference('managedCluster').identityProfile, 'kubeletidentity'), reference('managedCluster').identityProfile.kubeletidentity.objectId, ''), '')]"
- },
- "omsagentIdentityObjectId": {
- "type": "string",
- "metadata": {
- "description": "The Object ID of the OMS agent identity."
- },
- "value": "[if(contains(reference('managedCluster'), 'addonProfiles'), if(contains(reference('managedCluster').addonProfiles, 'omsagent'), if(contains(reference('managedCluster').addonProfiles.omsagent, 'identity'), reference('managedCluster').addonProfiles.omsagent.identity.objectId, ''), ''), '')]"
- },
- "keyvaultIdentityObjectId": {
- "type": "string",
- "metadata": {
- "description": "The Object ID of the Key Vault Secrets Provider identity."
- },
- "value": "[if(contains(reference('managedCluster'), 'addonProfiles'), if(contains(reference('managedCluster').addonProfiles, 'azureKeyvaultSecretsProvider'), if(contains(reference('managedCluster').addonProfiles.azureKeyvaultSecretsProvider, 'identity'), reference('managedCluster').addonProfiles.azureKeyvaultSecretsProvider.identity.objectId, ''), ''), '')]"
- },
- "keyvaultIdentityClientId": {
- "type": "string",
- "metadata": {
- "description": "The Client ID of the Key Vault Secrets Provider identity."
- },
- "value": "[if(contains(reference('managedCluster'), 'addonProfiles'), if(contains(reference('managedCluster').addonProfiles, 'azureKeyvaultSecretsProvider'), if(contains(reference('managedCluster').addonProfiles.azureKeyvaultSecretsProvider, 'identity'), reference('managedCluster').addonProfiles.azureKeyvaultSecretsProvider.identity.clientId, ''), ''), '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('managedCluster', '2023-07-02-preview', 'full').location]"
- },
- "oidcIssuerUrl": {
- "type": "string",
- "metadata": {
- "description": "The OIDC token issuer URL."
- },
- "value": "[if(parameters('enableOidcIssuerProfile'), reference('managedCluster').oidcIssuerProfile.issuerURL, '')]"
- },
- "addonProfiles": {
- "type": "object",
- "metadata": {
- "description": "The addonProfiles of the Kubernetes cluster."
- },
- "value": "[if(contains(reference('managedCluster'), 'addonProfiles'), reference('managedCluster').addonProfiles, createObject())]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/container-service/managed-cluster/tests/e2e/azure/dependencies.bicep b/modules/container-service/managed-cluster/tests/e2e/azure/dependencies.bicep
deleted file mode 100644
index 40834512ba..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/azure/dependencies.bicep
+++ /dev/null
@@ -1,187 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Kubelet Identity Managed Identity to create.')
-param managedIdentityKubeletIdentityName string
-
-@description('Required. The name of the Disk Encryption Set to create.')
-param diskEncryptionSetName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Proximity Placement Group to create.')
-param proximityPlacementGroupName string
-
-@description('Required. The name of the DNS Zone to create.')
-param dnsZoneName string
-
-@description('Required. The name of the log analytics workspace to create.')
-param logAnalyticsWorkspaceName string
-
-var addressPrefix = '10.1.0.0/22'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: map(range(0, 3), i => {
- name: 'subnet-${i}'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 24, i)
- }
- })
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-11-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by nodepool vmss
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-
- resource kmskey 'keys@2022-07-01' = {
- name: 'kmsEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2022-07-02' = {
- name: diskEncryptionSetName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- activeKey: {
- sourceVault: {
- id: keyVault.id
- }
- keyUrl: keyVault::key.properties.keyUriWithVersion
- }
- encryptionType: 'EncryptionAtRestWithCustomerKey'
- }
-}
-
-resource keyPermissionsKeyVaultCryptoUser 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Crypto-User-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // KeyVault-Crypto-User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: diskEncryptionSet.identity.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') // Key Vault Crypto Service Encryption User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource proximityPlacementGroup 'Microsoft.Compute/proximityPlacementGroups@2022-03-01' = {
- name: proximityPlacementGroupName
- location: location
-}
-
-resource dnsZone 'Microsoft.Network/dnsZones@2018-05-01' = {
- name: dnsZoneName
- location: 'global'
-}
-
-resource managedIdentityKubeletIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityKubeletIdentityName
- location: location
-}
-
-resource roleAssignmentKubeletIdentity 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentityKubeletIdentity.id}-ManagedIdentityOperator-RoleAssignment')
- scope: managedIdentityKubeletIdentity
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f1a07417-d97a-45cb-824c-7a7467783830') // Managed Identity Operator Role used for Kubelet identity.
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Kubelet Identity Managed Identity.')
-output managedIdentityKubeletIdentityResourceId string = managedIdentityKubeletIdentity.id
-
-@description('The resource ID of the created Disk Encryption Set.')
-output diskEncryptionSetResourceId string = diskEncryptionSet.id
-
-@description('The resource ID of the created Proximity Placement Group.')
-output proximityPlacementGroupResourceId string = proximityPlacementGroup.id
-
-@description('The resource ID of the created DNS Zone.')
-output dnsZoneResourceId string = dnsZone.id
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Virtual Network System Agent Pool Subnet.')
-output systemPoolSubnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Virtual Network Agent Pool 1 Subnet.')
-output agentPool1SubnetResourceId string = virtualNetwork.properties.subnets[1].id
-
-@description('The resource ID of the created Virtual Network Agent Pool 2 Subnet.')
-output agentPool2SubnetResourceId string = virtualNetwork.properties.subnets[2].id
diff --git a/modules/container-service/managed-cluster/tests/e2e/azure/main.test.bicep b/modules/container-service/managed-cluster/tests/e2e/azure/main.test.bicep
deleted file mode 100644
index c5cc686316..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/azure/main.test.bicep
+++ /dev/null
@@ -1,282 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${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 = 'csmaz'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- managedIdentityKubeletIdentityName: 'dep-${namePrefix}-msiki-${serviceShort}'
- diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}'
- proximityPlacementGroupName: 'dep-${namePrefix}-ppg-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- dnsZoneName: 'dep-${namePrefix}-dns-${serviceShort}.com'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- primaryAgentPoolProfile: [
- {
- availabilityZones: [
- '3'
- ]
- count: 1
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- mode: 'System'
- name: 'systempool'
- osDiskSizeGB: 0
- osType: 'Linux'
- serviceCidr: ''
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: nestedDependencies.outputs.systemPoolSubnetResourceId
- }
- ]
- agentPools: [
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool1'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: nestedDependencies.outputs.agentPool1SubnetResourceId
- proximityPlacementGroupResourceId: nestedDependencies.outputs.proximityPlacementGroupResourceId
- }
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool2'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: nestedDependencies.outputs.agentPool2SubnetResourceId
- }
- ]
- autoUpgradeProfileUpgradeChannel: 'stable'
- enableWorkloadIdentity: true
- enableOidcIssuerProfile: true
- networkPlugin: 'azure'
- networkDataplane: 'azure'
- networkPluginMode: 'overlay'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- diskEncryptionSetID: nestedDependencies.outputs.diskEncryptionSetResourceId
- openServiceMeshEnabled: true
- enableStorageProfileBlobCSIDriver: true
- enableStorageProfileDiskCSIDriver: true
- enableStorageProfileFileCSIDriver: true
- enableStorageProfileSnapshotController: true
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- identityProfile: {
- kubeletidentity: {
- resourceId: nestedDependencies.outputs.managedIdentityKubeletIdentityResourceId
- }
- }
- omsAgentEnabled: true
- monitoringWorkspaceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- enableAzureDefender: true
- enableKeyvaultSecretsProvider: true
- enablePodSecurityPolicy: false
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultNetworkAccess: 'Public'
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- fluxExtension: {
- configurationSettings: {
- 'helm-controller.enabled': 'true'
- 'source-controller.enabled': 'true'
- 'kustomize-controller.enabled': 'true'
- 'notification-controller.enabled': 'true'
- 'image-automation-controller.enabled': 'false'
- 'image-reflector-controller.enabled': 'false'
- }
- configurations: [
- {
- namespace: 'flux-system'
- scope: 'cluster'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/mspnp/aks-baseline'
- }
- }
- {
- namespace: 'flux-system-helm'
- scope: 'cluster'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/Azure/gitops-flux2-kustomize-helm-mt'
- }
- kustomizations: {
- infra: {
- path: './infrastructure'
- dependsOn: []
- timeoutInSeconds: 600
- syncIntervalInSeconds: 600
- validation: 'none'
- prune: true
- }
- apps: {
- path: './apps/staging'
- dependsOn: [
- 'infra'
- ]
- timeoutInSeconds: 600
- syncIntervalInSeconds: 600
- retryIntervalInSeconds: 120
- prune: true
- }
- }
- }
- ]
- }
- }
-}
diff --git a/modules/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep b/modules/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 833719b5e2..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${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 = 'csmmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- enableDefaultTelemetry: enableDefaultTelemetry
- managedIdentities: {
- systemAssigned: true
- }
- primaryAgentPoolProfile: [
- {
- name: 'systempool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- mode: 'System'
- }
- ]
- }
-}
diff --git a/modules/container-service/managed-cluster/tests/e2e/kubenet/dependencies.bicep b/modules/container-service/managed-cluster/tests/e2e/kubenet/dependencies.bicep
deleted file mode 100644
index bcd58414ee..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/kubenet/dependencies.bicep
+++ /dev/null
@@ -1,27 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the DNS Zone to create.')
-param dnsZoneName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource dnsZone 'Microsoft.Network/dnsZones@2018-05-01' = {
- name: dnsZoneName
- location: 'global'
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created DNS Zone.')
-output dnsZoneResourceId string = dnsZone.id
diff --git a/modules/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep b/modules/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep
deleted file mode 100644
index cede954b18..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep
+++ /dev/null
@@ -1,180 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${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 = 'csmkube'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- dnsZoneName: 'dep-${namePrefix}-dns-${serviceShort}.com'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- primaryAgentPoolProfile: [
- {
- availabilityZones: [
- '3'
- ]
- count: 1
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- mode: 'System'
- name: 'systempool'
- osDiskSizeGB: 0
- osType: 'Linux'
- serviceCidr: ''
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- ]
- agentPools: [
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool1'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool2'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- ]
- networkPlugin: 'kubenet'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/container-service/managed-cluster/tests/e2e/priv/dependencies.bicep b/modules/container-service/managed-cluster/tests/e2e/priv/dependencies.bicep
deleted file mode 100644
index 3a7d3e9d62..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/priv/dependencies.bicep
+++ /dev/null
@@ -1,91 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The Private DNS Zone Name to create for Private AKS Cluster.')
-param privateDnsZoneName string
-
-@description('Required. The Name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: privateDnsZoneName
- location: 'global'
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: map(range(0, 2), i => {
- name: 'subnet-${i}'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 24, i)
- }
- })
- }
-}
-
-resource privateDNSZoneVNetLink 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = {
- name: 'pDnsLink-${virtualNetworkName}-${privateDnsZoneName}'
- location: 'global'
- parent: privateDnsZone
- properties: {
- registrationEnabled: true
- virtualNetwork: {
- id: virtualNetwork.id
- }
- }
-}
-
-resource msiVnetRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(resourceGroup().id, 'NetworkContributor', managedIdentity.id)
- scope: virtualNetwork
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7') // Network Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource msiPrivDnsZoneRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(resourceGroup().id, 'PrivateDNSZoneContributor', managedIdentity.id)
- scope: privateDnsZone
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f') // Private DNS Zone Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the private DNS Zone created.')
-output privateDnsZoneResourceId string = privateDnsZone.id
-
-@description('The resource ID of the VirtualNetwork created.')
-output vNetResourceId string = virtualNetwork.id
-
-@description('The resource ID of the created Virtual Network System Agent Pool Subnet.')
-output systemPoolSubnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Virtual Network Agent Pool 1 Subnet.')
-output agentPoolSubnetResourceId string = virtualNetwork.properties.subnets[1].id
diff --git a/modules/container-service/managed-cluster/tests/e2e/priv/main.test.bicep b/modules/container-service/managed-cluster/tests/e2e/priv/main.test.bicep
deleted file mode 100644
index 078372cab4..0000000000
--- a/modules/container-service/managed-cluster/tests/e2e/priv/main.test.bicep
+++ /dev/null
@@ -1,171 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${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 = 'csmpriv'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- privateDnsZoneName: 'privatelink.${location}.azmk8s.io'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- enablePrivateCluster: true
- primaryAgentPoolProfile: [
- {
- availabilityZones: [
- '3'
- ]
- count: 1
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- mode: 'System'
- name: 'systempool'
- osDiskSizeGB: 0
- osType: 'Linux'
- serviceCidr: ''
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: nestedDependencies.outputs.systemPoolSubnetResourceId
- }
- ]
- agentPools: [
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool1'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: nestedDependencies.outputs.agentPoolSubnetResourceId
- }
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool2'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- ]
- networkPlugin: 'azure'
- skuTier: 'Standard'
- dnsServiceIP: '10.10.200.10'
- serviceCidr: '10.10.200.0/24'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- privateDNSZone: nestedDependencies.outputs.privateDnsZoneResourceId
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/container-service/managed-cluster/version.json b/modules/container-service/managed-cluster/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/container-service/managed-cluster/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/data-factory/factory/README.md b/modules/data-factory/factory/README.md
index dd0ad74ada..9f746c1358 100644
--- a/modules/data-factory/factory/README.md
+++ b/modules/data-factory/factory/README.md
@@ -1,1381 +1,7 @@
-# Data Factories `[Microsoft.DataFactory/factories]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Azure Factory to create. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`gitAccountName`](#parameter-gitaccountname) | string | The account name. |
-| [`gitCollaborationBranch`](#parameter-gitcollaborationbranch) | string | The collaboration branch name. Default is 'main'. |
-| [`gitConfigureLater`](#parameter-gitconfigurelater) | bool | Boolean to define whether or not to configure git during template deployment. |
-| [`gitDisablePublish`](#parameter-gitdisablepublish) | bool | Disable manual publish operation in ADF studio to favor automated publish. |
-| [`gitHostName`](#parameter-githostname) | string | The GitHub Enterprise Server host (prefixed with 'https://'). Only relevant for 'FactoryGitHubConfiguration'. |
-| [`gitProjectName`](#parameter-gitprojectname) | string | The project name. Only relevant for 'FactoryVSTSConfiguration'. |
-| [`gitRepositoryName`](#parameter-gitrepositoryname) | string | The repository name. |
-| [`gitRepoType`](#parameter-gitrepotype) | string | Repository type - can be 'FactoryVSTSConfiguration' or 'FactoryGitHubConfiguration'. Default is 'FactoryVSTSConfiguration'. |
-| [`gitRootFolder`](#parameter-gitrootfolder) | string | The root folder path name. Default is '/'. |
-| [`globalParameters`](#parameter-globalparameters) | object | List of Global Parameters for the factory. |
-| [`integrationRuntimes`](#parameter-integrationruntimes) | array | An array of objects for the configuration of an Integration Runtime. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`managedPrivateEndpoints`](#parameter-managedprivateendpoints) | array | An array of managed private endpoints objects created in the Data Factory managed virtual network. |
-| [`managedVirtualNetworkName`](#parameter-managedvirtualnetworkname) | string | The name of the Managed Virtual Network. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration Details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the Azure Factory to create.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `gitAccountName`
-
-The account name.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `gitCollaborationBranch`
-
-The collaboration branch name. Default is 'main'.
-
-- Required: No
-- Type: string
-- Default: `'main'`
-
-### Parameter: `gitConfigureLater`
-
-Boolean to define whether or not to configure git during template deployment.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `gitDisablePublish`
-
-Disable manual publish operation in ADF studio to favor automated publish.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `gitHostName`
-
-The GitHub Enterprise Server host (prefixed with 'https://'). Only relevant for 'FactoryGitHubConfiguration'.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `gitProjectName`
-
-The project name. Only relevant for 'FactoryVSTSConfiguration'.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `gitRepositoryName`
-
-The repository name.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `gitRepoType`
-
-Repository type - can be 'FactoryVSTSConfiguration' or 'FactoryGitHubConfiguration'. Default is 'FactoryVSTSConfiguration'.
-
-- Required: No
-- Type: string
-- Default: `'FactoryVSTSConfiguration'`
-
-### Parameter: `gitRootFolder`
-
-The root folder path name. Default is '/'.
-
-- Required: No
-- Type: string
-- Default: `'/'`
-
-### Parameter: `globalParameters`
-
-List of Global Parameters for the factory.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `integrationRuntimes`
-
-An array of objects for the configuration of an Integration Runtime.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `managedPrivateEndpoints`
-
-An array of managed private endpoints objects created in the Data Factory managed virtual network.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `managedVirtualNetworkName`
-
-The name of the Managed Virtual Network.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `privateEndpoints`
-
-Configuration Details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The Name of the Azure Data Factory instance. |
-| `resourceGroupName` | string | The name of the Resource Group with the Data factory. |
-| `resourceId` | string | The Resource ID of the Data factory. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
-
-## Notes
-
-### Parameter Usage: `managedPrivateEndpoints`
-
-To use Managed Private Endpoints the following dependencies must be deployed:
-
-- The `managedVirtualNetworkName` property must be set to allow provisioning of a managed virtual network in Azure Data Factory.
-- Destination private link resource must be created before and permissions allow requesting a private link connection to that resource.
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/data-factory/factory/integration-runtime/README.md b/modules/data-factory/factory/integration-runtime/README.md
deleted file mode 100644
index 1db7d93a4e..0000000000
--- a/modules/data-factory/factory/integration-runtime/README.md
+++ /dev/null
@@ -1,138 +0,0 @@
-# Data Factory Integration RunTimes `[Microsoft.DataFactory/factories/integrationRuntimes]`
-
-This module deploys a Data Factory Managed or Self-Hosted Integration Runtime.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DataFactory/factories/integrationRuntimes` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/integrationRuntimes) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Integration Runtime. |
-| [`type`](#parameter-type) | string | The type of Integration Runtime. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dataFactoryName`](#parameter-datafactoryname) | string | The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`managedVirtualNetworkName`](#parameter-managedvirtualnetworkname) | string | The name of the Managed Virtual Network if using type "Managed" . |
-| [`typeProperties`](#parameter-typeproperties) | object | Integration Runtime type properties. Required if type is "Managed". |
-
-### Parameter: `name`
-
-The name of the Integration Runtime.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `type`
-
-The type of Integration Runtime.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Managed'
- 'SelfHosted'
- ]
- ```
-
-### Parameter: `dataFactoryName`
-
-The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `managedVirtualNetworkName`
-
-The name of the Managed Virtual Network if using type "Managed" .
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `typeProperties`
-
-Integration Runtime type properties. Required if type is "Managed".
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the Integration Runtime. |
-| `resourceGroupName` | string | The name of the Resource Group the Integration Runtime was created in. |
-| `resourceId` | string | The resource ID of the Integration Runtime. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `typeProperties`
-
-
diff --git a/modules/data-factory/factory/integration-runtime/main.bicep b/modules/data-factory/factory/integration-runtime/main.bicep
deleted file mode 100644
index 2f92186588..0000000000
--- a/modules/data-factory/factory/integration-runtime/main.bicep
+++ /dev/null
@@ -1,67 +0,0 @@
-metadata name = 'Data Factory Integration RunTimes'
-metadata description = 'This module deploys a Data Factory Managed or Self-Hosted Integration Runtime.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment.')
-param dataFactoryName string
-
-@description('Required. The name of the Integration Runtime.')
-param name string
-
-@allowed([
- 'Managed'
- 'SelfHosted'
-])
-@description('Required. The type of Integration Runtime.')
-param type string
-
-@description('Optional. The name of the Managed Virtual Network if using type "Managed" .')
-param managedVirtualNetworkName string = ''
-
-@description('Optional. Integration Runtime type properties. Required if type is "Managed".')
-param typeProperties object = {}
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-var managedVirtualNetworkVar = {
- referenceName: type == 'Managed' ? managedVirtualNetworkName : null
- type: type == 'Managed' ? 'ManagedVirtualNetworkReference' : null
-}
-
-resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' existing = {
- name: dataFactoryName
-}
-
-resource integrationRuntime 'Microsoft.DataFactory/factories/integrationRuntimes@2018-06-01' = {
- name: name
- parent: dataFactory
- properties: type == 'Managed' ? {
- type: type
- managedVirtualNetwork: managedVirtualNetworkVar
- typeProperties: typeProperties
- } : {
- type: type
- }
-}
-
-@description('The name of the Resource Group the Integration Runtime was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Integration Runtime.')
-output name string = integrationRuntime.name
-
-@description('The resource ID of the Integration Runtime.')
-output resourceId string = integrationRuntime.id
diff --git a/modules/data-factory/factory/integration-runtime/main.json b/modules/data-factory/factory/integration-runtime/main.json
deleted file mode 100644
index 1622eb4e06..0000000000
--- a/modules/data-factory/factory/integration-runtime/main.json
+++ /dev/null
@@ -1,110 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2407789138740487733"
- },
- "name": "Data Factory Integration RunTimes",
- "description": "This module deploys a Data Factory Managed or Self-Hosted Integration Runtime.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Integration Runtime."
- }
- },
- "type": {
- "type": "string",
- "allowedValues": [
- "Managed",
- "SelfHosted"
- ],
- "metadata": {
- "description": "Required. The type of Integration Runtime."
- }
- },
- "managedVirtualNetworkName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the Managed Virtual Network if using type \"Managed\" ."
- }
- },
- "typeProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Integration Runtime type properties. Required if type is \"Managed\"."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "managedVirtualNetworkVar": {
- "referenceName": "[if(equals(parameters('type'), 'Managed'), parameters('managedVirtualNetworkName'), null())]",
- "type": "[if(equals(parameters('type'), 'Managed'), 'ManagedVirtualNetworkReference', null())]"
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/integrationRuntimes",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}', parameters('dataFactoryName'), parameters('name'))]",
- "properties": "[if(equals(parameters('type'), 'Managed'), createObject('type', parameters('type'), 'managedVirtualNetwork', variables('managedVirtualNetworkVar'), 'typeProperties', parameters('typeProperties')), createObject('type', parameters('type')))]"
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Integration Runtime was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Integration Runtime."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Integration Runtime."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/integrationRuntimes', parameters('dataFactoryName'), parameters('name'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/data-factory/factory/integration-runtime/version.json b/modules/data-factory/factory/integration-runtime/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/data-factory/factory/integration-runtime/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/data-factory/factory/main.bicep b/modules/data-factory/factory/main.bicep
deleted file mode 100644
index f0718db857..0000000000
--- a/modules/data-factory/factory/main.bicep
+++ /dev/null
@@ -1,430 +0,0 @@
-metadata name = 'Data Factories'
-metadata description = 'This module deploys a Data Factory.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Azure Factory to create.')
-param name string
-
-@description('Optional. The name of the Managed Virtual Network.')
-param managedVirtualNetworkName string = ''
-
-@description('Optional. An array of managed private endpoints objects created in the Data Factory managed virtual network.')
-param managedPrivateEndpoints array = []
-
-@description('Optional. An array of objects for the configuration of an Integration Runtime.')
-param integrationRuntimes array = []
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. Boolean to define whether or not to configure git during template deployment.')
-param gitConfigureLater bool = true
-
-@description('Optional. Repository type - can be \'FactoryVSTSConfiguration\' or \'FactoryGitHubConfiguration\'. Default is \'FactoryVSTSConfiguration\'.')
-param gitRepoType string = 'FactoryVSTSConfiguration'
-
-@description('Optional. The account name.')
-param gitAccountName string = ''
-
-@description('Optional. The project name. Only relevant for \'FactoryVSTSConfiguration\'.')
-param gitProjectName string = ''
-
-@description('Optional. The repository name.')
-param gitRepositoryName string = ''
-
-@description('Optional. The collaboration branch name. Default is \'main\'.')
-param gitCollaborationBranch string = 'main'
-
-@description('Optional. Disable manual publish operation in ADF studio to favor automated publish.')
-param gitDisablePublish bool = false
-
-@description('Optional. The root folder path name. Default is \'/\'.')
-param gitRootFolder string = '/'
-
-@description('Optional. The GitHub Enterprise Server host (prefixed with \'https://\'). Only relevant for \'FactoryGitHubConfiguration\'.')
-param gitHostName string = ''
-
-@description('Optional. List of Global Parameters for the factory.')
-param globalParameters object = {}
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Configuration Details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Data Factory Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '673868aa-7521-48a0-acc6-0f60742d39f5')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' = {
- name: name
- location: location
- tags: tags
- identity: identity
- properties: {
- repoConfiguration: bool(gitConfigureLater) ? null : union({
- type: gitRepoType
- hostName: gitHostName
- accountName: gitAccountName
- repositoryName: gitRepositoryName
- collaborationBranch: gitCollaborationBranch
- rootFolder: gitRootFolder
- disablePublish: gitDisablePublish
- }, (gitRepoType == 'FactoryVSTSConfiguration' ? {
- projectName: gitProjectName
- } : {}), {})
- globalParameters: !empty(globalParameters) ? globalParameters : null
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) ? 'Disabled' : null)
- encryption: !empty(customerManagedKey) ? {
- identity: !empty(customerManagedKey.?userAssignedIdentityResourceId) ? {
- userAssignedIdentity: cMKUserAssignedIdentity.id
- } : null
- keyName: customerManagedKey!.keyName
- keyVersion: !empty(customerManagedKey.?keyVersion ?? '') ? customerManagedKey!.keyVersion : last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- vaultBaseUrl: cMKKeyVault.properties.vaultUri
- } : null
- }
-}
-
-module dataFactory_managedVirtualNetwork 'managed-virtual-network/main.bicep' = if (!empty(managedVirtualNetworkName)) {
- name: '${uniqueString(deployment().name, location)}-DataFactory-ManagedVNet'
- params: {
- name: managedVirtualNetworkName
- dataFactoryName: dataFactory.name
- managedPrivateEndpoints: managedPrivateEndpoints
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module dataFactory_integrationRuntimes 'integration-runtime/main.bicep' = [for (integrationRuntime, index) in integrationRuntimes: {
- name: '${uniqueString(deployment().name, location)}-DataFactory-IntegrationRuntime-${index}'
- params: {
- dataFactoryName: dataFactory.name
- name: integrationRuntime.name
- type: integrationRuntime.type
- managedVirtualNetworkName: contains(integrationRuntime, 'managedVirtualNetworkName') ? integrationRuntime.managedVirtualNetworkName : ''
- typeProperties: contains(integrationRuntime, 'typeProperties') ? integrationRuntime.typeProperties : {}
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- dataFactory_managedVirtualNetwork
- ]
-}]
-
-resource dataFactory_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: dataFactory
-}
-
-resource dataFactory_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: dataFactory
-}]
-
-resource dataFactory_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(dataFactory.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: dataFactory
-}]
-
-module dataFactory_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-dataFactory-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'dataFactory'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(dataFactory.id, '/'))}-${privateEndpoint.?service ?? 'dataFactory'}-${index}'
- serviceResourceId: dataFactory.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The Name of the Azure Data Factory instance.')
-output name string = dataFactory.name
-
-@description('The Resource ID of the Data factory.')
-output resourceId string = dataFactory.id
-
-@description('The name of the Resource Group with the Data factory.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(dataFactory.identity, 'principalId') ? dataFactory.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = dataFactory.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/data-factory/factory/main.json b/modules/data-factory/factory/main.json
deleted file mode 100644
index 2c237602dc..0000000000
--- a/modules/data-factory/factory/main.json
+++ /dev/null
@@ -1,1811 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13040115678809105758"
- },
- "name": "Data Factories",
- "description": "This module deploys a Data Factory.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Azure Factory to create."
- }
- },
- "managedVirtualNetworkName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the Managed Virtual Network."
- }
- },
- "managedPrivateEndpoints": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of managed private endpoints objects created in the Data Factory managed virtual network."
- }
- },
- "integrationRuntimes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of objects for the configuration of an Integration Runtime."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- },
- "gitConfigureLater": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Boolean to define whether or not to configure git during template deployment."
- }
- },
- "gitRepoType": {
- "type": "string",
- "defaultValue": "FactoryVSTSConfiguration",
- "metadata": {
- "description": "Optional. Repository type - can be 'FactoryVSTSConfiguration' or 'FactoryGitHubConfiguration'. Default is 'FactoryVSTSConfiguration'."
- }
- },
- "gitAccountName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The account name."
- }
- },
- "gitProjectName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The project name. Only relevant for 'FactoryVSTSConfiguration'."
- }
- },
- "gitRepositoryName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The repository name."
- }
- },
- "gitCollaborationBranch": {
- "type": "string",
- "defaultValue": "main",
- "metadata": {
- "description": "Optional. The collaboration branch name. Default is 'main'."
- }
- },
- "gitDisablePublish": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Disable manual publish operation in ADF studio to favor automated publish."
- }
- },
- "gitRootFolder": {
- "type": "string",
- "defaultValue": "/",
- "metadata": {
- "description": "Optional. The root folder path name. Default is '/'."
- }
- },
- "gitHostName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The GitHub Enterprise Server host (prefixed with 'https://'). Only relevant for 'FactoryGitHubConfiguration'."
- }
- },
- "globalParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. List of Global Parameters for the factory."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration Details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Data Factory Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '673868aa-7521-48a0-acc6-0f60742d39f5')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "dataFactory": {
- "type": "Microsoft.DataFactory/factories",
- "apiVersion": "2018-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "repoConfiguration": "[if(bool(parameters('gitConfigureLater')), null(), union(createObject('type', parameters('gitRepoType'), 'hostName', parameters('gitHostName'), 'accountName', parameters('gitAccountName'), 'repositoryName', parameters('gitRepositoryName'), 'collaborationBranch', parameters('gitCollaborationBranch'), 'rootFolder', parameters('gitRootFolder'), 'disablePublish', parameters('gitDisablePublish')), if(equals(parameters('gitRepoType'), 'FactoryVSTSConfiguration'), createObject('projectName', parameters('gitProjectName')), createObject()), createObject()))]",
- "globalParameters": "[if(not(empty(parameters('globalParameters'))), parameters('globalParameters'), null())]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(not(empty(parameters('privateEndpoints'))), 'Disabled', null()))]",
- "encryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('identity', if(not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'))), createObject('userAssignedIdentity', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/')))), null()), 'keyName', parameters('customerManagedKey').keyName, 'keyVersion', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), parameters('customerManagedKey').keyVersion, last(split(reference('cMKKeyVault::cMKKey').keyUriWithVersion, '/'))), 'vaultBaseUrl', reference('cMKKeyVault').vaultUri), null())]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "dataFactory_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DataFactory/factories/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "dataFactory"
- ]
- },
- "dataFactory_diagnosticSettings": {
- "copy": {
- "name": "dataFactory_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DataFactory/factories/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "dataFactory"
- ]
- },
- "dataFactory_roleAssignments": {
- "copy": {
- "name": "dataFactory_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DataFactory/factories/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DataFactory/factories', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "dataFactory"
- ]
- },
- "dataFactory_managedVirtualNetwork": {
- "condition": "[not(empty(parameters('managedVirtualNetworkName')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-DataFactory-ManagedVNet', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('managedVirtualNetworkName')]"
- },
- "dataFactoryName": {
- "value": "[parameters('name')]"
- },
- "managedPrivateEndpoints": {
- "value": "[parameters('managedPrivateEndpoints')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7086724603457879213"
- },
- "name": "Data Factory Managed Virtual Networks",
- "description": "This module deploys a Data Factory Managed Virtual Network.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Managed Virtual Network."
- }
- },
- "managedPrivateEndpoints": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of managed private endpoints objects created in the Data Factory managed virtual network."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/managedVirtualNetworks",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}', parameters('dataFactoryName'), parameters('name'))]",
- "properties": {}
- },
- {
- "copy": {
- "name": "managedVirtualNetwork_managedPrivateEndpoint",
- "count": "[length(parameters('managedPrivateEndpoints'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-managedPrivateEndpoint-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "dataFactoryName": {
- "value": "[parameters('dataFactoryName')]"
- },
- "managedVirtualNetworkName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].name]"
- },
- "fqdns": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].fqdns]"
- },
- "groupId": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].groupId]"
- },
- "privateLinkResourceId": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].privateLinkResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6951739479886220769"
- },
- "name": "Data Factory Managed Virtual Network Managed PrivateEndpoints",
- "description": "This module deploys a Data Factory Managed Virtual Network Managed Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent data factory. Required if the template is used in a standalone deployment."
- }
- },
- "managedVirtualNetworkName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent managed virtual network."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The managed private endpoint resource name."
- }
- },
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The groupId to which the managed private endpoint is created."
- }
- },
- "fqdns": {
- "type": "array",
- "metadata": {
- "description": "Required. Fully qualified domain names."
- }
- },
- "privateLinkResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ARM resource ID of the resource to which the managed private endpoint is created."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}/{2}', parameters('dataFactoryName'), parameters('managedVirtualNetworkName'), parameters('name'))]",
- "properties": {
- "fqdns": "[parameters('fqdns')]",
- "groupId": "[parameters('groupId')]",
- "privateLinkResourceId": "[parameters('privateLinkResourceId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed managed private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed managed private endpoint."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints', parameters('dataFactoryName'), parameters('managedVirtualNetworkName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed managed private endpoint."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Managed Virtual Network was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Managed Virtual Network."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Managed Virtual Network."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/managedVirtualNetworks', parameters('dataFactoryName'), parameters('name'))]"
- }
- }
- }
- },
- "dependsOn": [
- "dataFactory"
- ]
- },
- "dataFactory_integrationRuntimes": {
- "copy": {
- "name": "dataFactory_integrationRuntimes",
- "count": "[length(parameters('integrationRuntimes'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-DataFactory-IntegrationRuntime-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "dataFactoryName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('integrationRuntimes')[copyIndex()].name]"
- },
- "type": {
- "value": "[parameters('integrationRuntimes')[copyIndex()].type]"
- },
- "managedVirtualNetworkName": "[if(contains(parameters('integrationRuntimes')[copyIndex()], 'managedVirtualNetworkName'), createObject('value', parameters('integrationRuntimes')[copyIndex()].managedVirtualNetworkName), createObject('value', ''))]",
- "typeProperties": "[if(contains(parameters('integrationRuntimes')[copyIndex()], 'typeProperties'), createObject('value', parameters('integrationRuntimes')[copyIndex()].typeProperties), createObject('value', createObject()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10377382264693749693"
- },
- "name": "Data Factory Integration RunTimes",
- "description": "This module deploys a Data Factory Managed or Self-Hosted Integration Runtime.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Integration Runtime."
- }
- },
- "type": {
- "type": "string",
- "allowedValues": [
- "Managed",
- "SelfHosted"
- ],
- "metadata": {
- "description": "Required. The type of Integration Runtime."
- }
- },
- "managedVirtualNetworkName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the Managed Virtual Network if using type \"Managed\" ."
- }
- },
- "typeProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Integration Runtime type properties. Required if type is \"Managed\"."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "managedVirtualNetworkVar": {
- "referenceName": "[if(equals(parameters('type'), 'Managed'), parameters('managedVirtualNetworkName'), null())]",
- "type": "[if(equals(parameters('type'), 'Managed'), 'ManagedVirtualNetworkReference', null())]"
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/integrationRuntimes",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}', parameters('dataFactoryName'), parameters('name'))]",
- "properties": "[if(equals(parameters('type'), 'Managed'), createObject('type', parameters('type'), 'managedVirtualNetwork', variables('managedVirtualNetworkVar'), 'typeProperties', parameters('typeProperties')), createObject('type', parameters('type')))]"
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Integration Runtime was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Integration Runtime."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Integration Runtime."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/integrationRuntimes', parameters('dataFactoryName'), parameters('name'))]"
- }
- }
- }
- },
- "dependsOn": [
- "dataFactory",
- "dataFactory_managedVirtualNetwork"
- ]
- },
- "dataFactory_privateEndpoints": {
- "copy": {
- "name": "dataFactory_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-dataFactory-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'dataFactory')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.DataFactory/factories', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'dataFactory'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.DataFactory/factories', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "dataFactory"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the Azure Data Factory instance."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The Resource ID of the Data factory."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group with the Data factory."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('dataFactory', '2018-06-01', 'full').identity, 'principalId')), reference('dataFactory', '2018-06-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('dataFactory', '2018-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/data-factory/factory/managed-virtual-network/README.md b/modules/data-factory/factory/managed-virtual-network/README.md
deleted file mode 100644
index a22063ff97..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/README.md
+++ /dev/null
@@ -1,133 +0,0 @@
-# Data Factory Managed Virtual Networks `[Microsoft.DataFactory/factories/managedVirtualNetworks]`
-
-This module deploys a Data Factory Managed Virtual Network.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DataFactory/factories/managedVirtualNetworks` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/managedVirtualNetworks) |
-| `Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/managedVirtualNetworks/managedPrivateEndpoints) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Managed Virtual Network. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dataFactoryName`](#parameter-datafactoryname) | string | The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`managedPrivateEndpoints`](#parameter-managedprivateendpoints) | array | An array of managed private endpoints objects created in the Data Factory managed virtual network. |
-
-### Parameter: `name`
-
-The name of the Managed Virtual Network.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `dataFactoryName`
-
-The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `managedPrivateEndpoints`
-
-An array of managed private endpoints objects created in the Data Factory managed virtual network.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the Managed Virtual Network. |
-| `resourceGroupName` | string | The name of the Resource Group the Managed Virtual Network was created in. |
-| `resourceId` | string | The resource ID of the Managed Virtual Network. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `managedPrivateEndpoints`
-
-To use Managed Private Endpoints the following dependencies must be deployed:
-
-- Destination private link resource must be created before and permissions allow requesting a private link connection to that resource.
-
-
diff --git a/modules/data-factory/factory/managed-virtual-network/main.bicep b/modules/data-factory/factory/managed-virtual-network/main.bicep
deleted file mode 100644
index 61e71c1ea7..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/main.bicep
+++ /dev/null
@@ -1,61 +0,0 @@
-metadata name = 'Data Factory Managed Virtual Networks'
-metadata description = 'This module deploys a Data Factory Managed Virtual Network.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment.')
-param dataFactoryName string
-
-@description('Required. The name of the Managed Virtual Network.')
-param name string
-
-@description('Optional. An array of managed private endpoints objects created in the Data Factory managed virtual network.')
-param managedPrivateEndpoints array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' existing = {
- name: dataFactoryName
-}
-
-resource managedVirtualNetwork 'Microsoft.DataFactory/factories/managedVirtualNetworks@2018-06-01' = {
- name: name
- parent: dataFactory
- properties: {}
-}
-
-module managedVirtualNetwork_managedPrivateEndpoint 'managed-private-endpoint/main.bicep' = [for (managedPrivateEndpoint, index) in managedPrivateEndpoints: {
- name: '${deployment().name}-managedPrivateEndpoint-${index}'
- params: {
- dataFactoryName: dataFactoryName
- managedVirtualNetworkName: name
- name: managedPrivateEndpoint.name
- fqdns: managedPrivateEndpoint.fqdns
- groupId: managedPrivateEndpoint.groupId
- privateLinkResourceId: managedPrivateEndpoint.privateLinkResourceId
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the Resource Group the Managed Virtual Network was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Managed Virtual Network.')
-output name string = managedVirtualNetwork.name
-
-@description('The resource ID of the Managed Virtual Network.')
-output resourceId string = managedVirtualNetwork.id
diff --git a/modules/data-factory/factory/managed-virtual-network/main.json b/modules/data-factory/factory/managed-virtual-network/main.json
deleted file mode 100644
index 96dc5dd33b..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/main.json
+++ /dev/null
@@ -1,236 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14273608975905052502"
- },
- "name": "Data Factory Managed Virtual Networks",
- "description": "This module deploys a Data Factory Managed Virtual Network.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Azure Data Factory. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Managed Virtual Network."
- }
- },
- "managedPrivateEndpoints": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of managed private endpoints objects created in the Data Factory managed virtual network."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/managedVirtualNetworks",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}', parameters('dataFactoryName'), parameters('name'))]",
- "properties": {}
- },
- {
- "copy": {
- "name": "managedVirtualNetwork_managedPrivateEndpoint",
- "count": "[length(parameters('managedPrivateEndpoints'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-managedPrivateEndpoint-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "dataFactoryName": {
- "value": "[parameters('dataFactoryName')]"
- },
- "managedVirtualNetworkName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].name]"
- },
- "fqdns": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].fqdns]"
- },
- "groupId": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].groupId]"
- },
- "privateLinkResourceId": {
- "value": "[parameters('managedPrivateEndpoints')[copyIndex()].privateLinkResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1490870890954327678"
- },
- "name": "Data Factory Managed Virtual Network Managed PrivateEndpoints",
- "description": "This module deploys a Data Factory Managed Virtual Network Managed Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent data factory. Required if the template is used in a standalone deployment."
- }
- },
- "managedVirtualNetworkName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent managed virtual network."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The managed private endpoint resource name."
- }
- },
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The groupId to which the managed private endpoint is created."
- }
- },
- "fqdns": {
- "type": "array",
- "metadata": {
- "description": "Required. Fully qualified domain names."
- }
- },
- "privateLinkResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ARM resource ID of the resource to which the managed private endpoint is created."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}/{2}', parameters('dataFactoryName'), parameters('managedVirtualNetworkName'), parameters('name'))]",
- "properties": {
- "fqdns": "[parameters('fqdns')]",
- "groupId": "[parameters('groupId')]",
- "privateLinkResourceId": "[parameters('privateLinkResourceId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed managed private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed managed private endpoint."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints', parameters('dataFactoryName'), parameters('managedVirtualNetworkName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed managed private endpoint."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Managed Virtual Network was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Managed Virtual Network."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Managed Virtual Network."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/managedVirtualNetworks', parameters('dataFactoryName'), parameters('name'))]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/README.md b/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/README.md
deleted file mode 100644
index dbffcad961..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/README.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# Data Factory Managed Virtual Network Managed PrivateEndpoints `[Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints]`
-
-This module deploys a Data Factory Managed Virtual Network Managed Private Endpoint.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/managedVirtualNetworks/managedPrivateEndpoints) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`fqdns`](#parameter-fqdns) | array | Fully qualified domain names. |
-| [`groupId`](#parameter-groupid) | string | The groupId to which the managed private endpoint is created. |
-| [`managedVirtualNetworkName`](#parameter-managedvirtualnetworkname) | string | The name of the parent managed virtual network. |
-| [`name`](#parameter-name) | string | The managed private endpoint resource name. |
-| [`privateLinkResourceId`](#parameter-privatelinkresourceid) | string | The ARM resource ID of the resource to which the managed private endpoint is created. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dataFactoryName`](#parameter-datafactoryname) | string | The name of the parent data factory. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `fqdns`
-
-Fully qualified domain names.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `groupId`
-
-The groupId to which the managed private endpoint is created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `managedVirtualNetworkName`
-
-The name of the parent managed virtual network.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The managed private endpoint resource name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateLinkResourceId`
-
-The ARM resource ID of the resource to which the managed private endpoint is created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `dataFactoryName`
-
-The name of the parent data factory. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed managed private endpoint. |
-| `resourceGroupName` | string | The resource group of the deployed managed private endpoint. |
-| `resourceId` | string | The resource ID of the deployed managed private endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/main.bicep b/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/main.bicep
deleted file mode 100644
index f3e0b958b9..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/main.bicep
+++ /dev/null
@@ -1,63 +0,0 @@
-metadata name = 'Data Factory Managed Virtual Network Managed PrivateEndpoints'
-metadata description = 'This module deploys a Data Factory Managed Virtual Network Managed Private Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent data factory. Required if the template is used in a standalone deployment.')
-param dataFactoryName string
-
-@description('Required. The name of the parent managed virtual network.')
-param managedVirtualNetworkName string
-
-@description('Required. The managed private endpoint resource name.')
-param name string
-
-@description('Required. The groupId to which the managed private endpoint is created.')
-param groupId string
-
-@description('Required. Fully qualified domain names.')
-param fqdns array
-
-@description('Required. The ARM resource ID of the resource to which the managed private endpoint is created.')
-param privateLinkResourceId string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource datafactory 'Microsoft.DataFactory/factories@2018-06-01' existing = {
- name: dataFactoryName
-
- resource managedVirtualNetwork 'managedVirtualNetworks@2018-06-01' existing = {
- name: managedVirtualNetworkName
- }
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource managedPrivateEndpoint 'Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints@2018-06-01' = {
- name: name
- parent: datafactory::managedVirtualNetwork
- properties: {
- fqdns: fqdns
- groupId: groupId
- privateLinkResourceId: privateLinkResourceId
- }
-}
-
-@description('The name of the deployed managed private endpoint.')
-output name string = managedPrivateEndpoint.name
-
-@description('The resource ID of the deployed managed private endpoint.')
-output resourceId string = managedPrivateEndpoint.id
-
-@description('The resource group of the deployed managed private endpoint.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/main.json b/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/main.json
deleted file mode 100644
index 96606099ca..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/main.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "1490870890954327678"
- },
- "name": "Data Factory Managed Virtual Network Managed PrivateEndpoints",
- "description": "This module deploys a Data Factory Managed Virtual Network Managed Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "dataFactoryName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent data factory. Required if the template is used in a standalone deployment."
- }
- },
- "managedVirtualNetworkName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the parent managed virtual network."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The managed private endpoint resource name."
- }
- },
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The groupId to which the managed private endpoint is created."
- }
- },
- "fqdns": {
- "type": "array",
- "metadata": {
- "description": "Required. Fully qualified domain names."
- }
- },
- "privateLinkResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ARM resource ID of the resource to which the managed private endpoint is created."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints",
- "apiVersion": "2018-06-01",
- "name": "[format('{0}/{1}/{2}', parameters('dataFactoryName'), parameters('managedVirtualNetworkName'), parameters('name'))]",
- "properties": {
- "fqdns": "[parameters('fqdns')]",
- "groupId": "[parameters('groupId')]",
- "privateLinkResourceId": "[parameters('privateLinkResourceId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed managed private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed managed private endpoint."
- },
- "value": "[resourceId('Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints', parameters('dataFactoryName'), parameters('managedVirtualNetworkName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed managed private endpoint."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/version.json b/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/managed-private-endpoint/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/data-factory/factory/managed-virtual-network/version.json b/modules/data-factory/factory/managed-virtual-network/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/data-factory/factory/managed-virtual-network/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/data-factory/factory/tests/e2e/defaults/main.test.bicep b/modules/data-factory/factory/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index f4ffda85f6..0000000000
--- a/modules/data-factory/factory/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-datafactory.factories-${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 = 'dffmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/data-factory/factory/tests/e2e/max/dependencies.bicep b/modules/data-factory/factory/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a6ab43ad7a..0000000000
--- a/modules/data-factory/factory/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,135 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.datafactory.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetworkName}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- // Key Vault Crypto User
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- principalType: 'ServicePrincipal'
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = {
- name: storageAccountName
- location: location
- kind: 'StorageV2'
- sku: {
- name: 'Standard_LRS'
- }
- properties: {
- allowBlobPublicAccess: false
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The name of the created Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the created Storage Account.')
-output storageAccountName string = storageAccount.name
-
-@description('The Blob Endpoint of the created Storage Account.')
-output storageAccountBlobEndpoint string = storageAccount.properties.primaryEndpoints.blob
diff --git a/modules/data-factory/factory/tests/e2e/max/main.test.bicep b/modules/data-factory/factory/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 7134060c90..0000000000
--- a/modules/data-factory/factory/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,172 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-datafactory.factories-${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 = 'dffmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- gitConfigureLater: true
- globalParameters: {
- testParameter1: {
- type: 'String'
- value: 'testValue1'
- }
- }
- integrationRuntimes: [
- {
- managedVirtualNetworkName: 'default'
- name: 'AutoResolveIntegrationRuntime'
- type: 'Managed'
- typeProperties: {
- computeProperties: {
- location: 'AutoResolve'
- }
- }
- }
-
- {
- name: 'TestRuntime'
- type: 'SelfHosted'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedPrivateEndpoints: [
- {
- fqdns: [
- nestedDependencies.outputs.storageAccountBlobEndpoint
- ]
- groupId: 'blob'
- name: '${nestedDependencies.outputs.storageAccountName}-managed-privateEndpoint'
- privateLinkResourceId: nestedDependencies.outputs.storageAccountResourceId
- }
- ]
- managedVirtualNetworkName: 'default'
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- application: 'CARML'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/data-factory/factory/tests/e2e/waf-aligned/dependencies.bicep b/modules/data-factory/factory/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a6ab43ad7a..0000000000
--- a/modules/data-factory/factory/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,135 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.datafactory.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetworkName}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- // Key Vault Crypto User
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- principalType: 'ServicePrincipal'
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = {
- name: storageAccountName
- location: location
- kind: 'StorageV2'
- sku: {
- name: 'Standard_LRS'
- }
- properties: {
- allowBlobPublicAccess: false
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The URL of the created Key Vault.')
-output keyVaultUrl string = keyVault.properties.vaultUri
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The name of the created Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the created Storage Account.')
-output storageAccountName string = storageAccount.name
-
-@description('The Blob Endpoint of the created Storage Account.')
-output storageAccountBlobEndpoint string = storageAccount.properties.primaryEndpoints.blob
diff --git a/modules/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep b/modules/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 1a7cb59527..0000000000
--- a/modules/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,155 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-datafactory.factories-${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 = 'dffwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- gitConfigureLater: true
- globalParameters: {
- testParameter1: {
- type: 'String'
- value: 'testValue1'
- }
- }
- integrationRuntimes: [
- {
- managedVirtualNetworkName: 'default'
- name: 'AutoResolveIntegrationRuntime'
- type: 'Managed'
- typeProperties: {
- computeProperties: {
- location: 'AutoResolve'
- }
- }
- }
-
- {
- name: 'TestRuntime'
- type: 'SelfHosted'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedPrivateEndpoints: [
- {
- fqdns: [
- nestedDependencies.outputs.storageAccountBlobEndpoint
- ]
- groupId: 'blob'
- name: '${nestedDependencies.outputs.storageAccountName}-managed-privateEndpoint'
- privateLinkResourceId: nestedDependencies.outputs.storageAccountResourceId
- }
- ]
- managedVirtualNetworkName: 'default'
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- application: 'CARML'
- }
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/data-factory/factory/version.json b/modules/data-factory/factory/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/data-factory/factory/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/data-protection/backup-vault/README.md b/modules/data-protection/backup-vault/README.md
index 3744f13387..5a021dd769 100644
--- a/modules/data-protection/backup-vault/README.md
+++ b/modules/data-protection/backup-vault/README.md
@@ -1,969 +1,7 @@
-# Data Protection Backup Vaults `[Microsoft.DataProtection/backupVaults]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Backup Vault. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`azureMonitorAlertSettingsAlertsForAllJobFailures`](#parameter-azuremonitoralertsettingsalertsforalljobfailures) | string | Settings for Azure Monitor based alerts for job failures. |
-| [`backupPolicies`](#parameter-backuppolicies) | array | List of all backup policies. |
-| [`dataStoreType`](#parameter-datastoretype) | string | The datastore type to use. ArchiveStore does not support ZoneRedundancy. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`featureSettings`](#parameter-featuresettings) | object | Feature settings for the backup vault. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`securitySettings`](#parameter-securitysettings) | object | Security settings for the backup vault. |
-| [`tags`](#parameter-tags) | object | Tags of the Recovery Service Vault resource. |
-| [`type`](#parameter-type) | string | The vault redundancy level to use. |
-
-### Parameter: `name`
-
-Name of the Backup Vault.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `azureMonitorAlertSettingsAlertsForAllJobFailures`
-
-Settings for Azure Monitor based alerts for job failures.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `backupPolicies`
-
-List of all backup policies.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dataStoreType`
-
-The datastore type to use. ArchiveStore does not support ZoneRedundancy.
-
-- Required: No
-- Type: string
-- Default: `'VaultStore'`
-- Allowed:
- ```Bicep
- [
- 'ArchiveStore'
- 'OperationalStore'
- 'VaultStore'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `featureSettings`
-
-Feature settings for the backup vault.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `securitySettings`
-
-Security settings for the backup vault.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `tags`
-
-Tags of the Recovery Service Vault resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `type`
-
-The vault redundancy level to use.
-
-- Required: No
-- Type: string
-- Default: `'GeoRedundant'`
-- Allowed:
- ```Bicep
- [
- 'GeoRedundant'
- 'LocallyRedundant'
- 'ZoneRedundant'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The Name of the backup vault. |
-| `resourceGroupName` | string | The name of the resource group the recovery services vault was created in. |
-| `resourceId` | string | The resource ID of the backup vault. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `backupPolicies`
-
-Create backup policies in the backupvault.
-
-
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Azure Databricks access connector to create. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the Azure Databricks access connector to create.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed access connector. |
-| `resourceGroupName` | string | The resource group of the deployed access connector. |
-| `resourceId` | string | The resource ID of the deployed access connector. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/databricks/access-connector/main.bicep b/modules/databricks/access-connector/main.bicep
deleted file mode 100644
index 53ba92c2c2..0000000000
--- a/modules/databricks/access-connector/main.bicep
+++ /dev/null
@@ -1,140 +0,0 @@
-metadata name = 'Azure Databricks Access Connectors'
-metadata description = 'This module deploys an Azure Databricks Access Connector.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Azure Databricks access connector to create.')
-param name string
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource accessConnector 'Microsoft.Databricks/accessConnectors@2022-10-01-preview' = {
- name: name
- location: location
- tags: tags
- identity: identity
- properties: {}
-}
-
-resource accessConnector_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: accessConnector
-}
-
-resource accessConnector_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(accessConnector.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: accessConnector
-}]
-
-@description('The name of the deployed access connector.')
-output name string = accessConnector.name
-
-@description('The resource ID of the deployed access connector.')
-output resourceId string = accessConnector.id
-
-@description('The resource group of the deployed access connector.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(accessConnector.identity, 'principalId') ? accessConnector.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = accessConnector.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/databricks/access-connector/main.json b/modules/databricks/access-connector/main.json
deleted file mode 100644
index dce724ef4b..0000000000
--- a/modules/databricks/access-connector/main.json
+++ /dev/null
@@ -1,287 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3245638906962144809"
- },
- "name": "Azure Databricks Access Connectors",
- "description": "This module deploys an Azure Databricks Access Connector.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Azure Databricks access connector to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "accessConnector": {
- "type": "Microsoft.Databricks/accessConnectors",
- "apiVersion": "2022-10-01-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {}
- },
- "accessConnector_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Databricks/accessConnectors/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "accessConnector"
- ]
- },
- "accessConnector_roleAssignments": {
- "copy": {
- "name": "accessConnector_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Databricks/accessConnectors/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Databricks/accessConnectors', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "accessConnector"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed access connector."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed access connector."
- },
- "value": "[resourceId('Microsoft.Databricks/accessConnectors', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed access connector."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('accessConnector', '2022-10-01-preview', 'full').identity, 'principalId')), reference('accessConnector', '2022-10-01-preview', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('accessConnector', '2022-10-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/databricks/access-connector/tests/e2e/defaults/main.test.bicep b/modules/databricks/access-connector/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 17bf07d2fc..0000000000
--- a/modules/databricks/access-connector/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-databricks.accessconnectors-${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 = 'dacmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/databricks/access-connector/tests/e2e/max/dependencies.bicep b/modules/databricks/access-connector/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index b20bc53e8f..0000000000
--- a/modules/databricks/access-connector/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/databricks/access-connector/tests/e2e/max/main.test.bicep b/modules/databricks/access-connector/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 586cd17f0c..0000000000
--- a/modules/databricks/access-connector/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,90 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-databricks.accessconnectors-${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 = 'dacmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- location: resourceGroup.location
- }
-}]
diff --git a/modules/databricks/access-connector/tests/e2e/waf-aligned/dependencies.bicep b/modules/databricks/access-connector/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index b20bc53e8f..0000000000
--- a/modules/databricks/access-connector/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep b/modules/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 64b4f1b6ab..0000000000
--- a/modules/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-databricks.accessconnectors-${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 = 'dacwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- location: resourceGroup.location
- }
-}]
diff --git a/modules/databricks/access-connector/version.json b/modules/databricks/access-connector/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/databricks/access-connector/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/databricks/workspace/README.md b/modules/databricks/workspace/README.md
index a6502ad9f6..c102614656 100644
--- a/modules/databricks/workspace/README.md
+++ b/modules/databricks/workspace/README.md
@@ -1,1463 +1,7 @@
-# Azure Databricks Workspaces `[Microsoft.Databricks/workspaces]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Azure Databricks workspace to create. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`amlWorkspaceResourceId`](#parameter-amlworkspaceresourceid) | string | The resource ID of a Azure Machine Learning workspace to link with Databricks workspace. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition to use for the managed service. |
-| [`customerManagedKeyManagedDisk`](#parameter-customermanagedkeymanageddisk) | object | The customer managed key definition to use for the managed disk. |
-| [`customPrivateSubnetName`](#parameter-customprivatesubnetname) | string | The name of the Private Subnet within the Virtual Network. |
-| [`customPublicSubnetName`](#parameter-custompublicsubnetname) | string | The name of a Public Subnet within the Virtual Network. |
-| [`customVirtualNetworkResourceId`](#parameter-customvirtualnetworkresourceid) | string | The resource ID of a Virtual Network where this Databricks Cluster should be created. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disablePublicIp`](#parameter-disablepublicip) | bool | Disable Public IP. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`loadBalancerBackendPoolName`](#parameter-loadbalancerbackendpoolname) | string | Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP). |
-| [`loadBalancerResourceId`](#parameter-loadbalancerresourceid) | string | Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedResourceGroupResourceId`](#parameter-managedresourcegroupresourceid) | string | The managed resource group ID. It is created by the module as per the to-be resource ID you provide. |
-| [`natGatewayName`](#parameter-natgatewayname) | string | Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets. |
-| [`prepareEncryption`](#parameter-prepareencryption) | bool | Prepare the workspace for encryption. Enables the Managed Identity for managed storage account. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicIpName`](#parameter-publicipname) | string | Name of the Public IP for No Public IP workspace with managed vNet. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | The network access type for accessing workspace. Set value to disabled to access workspace only via private link. |
-| [`requiredNsgRules`](#parameter-requirednsgrules) | string | Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private endpoint. |
-| [`requireInfrastructureEncryption`](#parameter-requireinfrastructureencryption) | bool | A boolean indicating whether or not the DBFS root file system will be enabled with secondary layer of encryption with platform managed keys for data at rest. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`skuName`](#parameter-skuname) | string | The pricing tier of workspace. |
-| [`storageAccountName`](#parameter-storageaccountname) | string | Default DBFS storage account name. |
-| [`storageAccountSkuName`](#parameter-storageaccountskuname) | string | Storage account SKU name. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`vnetAddressPrefix`](#parameter-vnetaddressprefix) | string | Address prefix for Managed virtual network. |
-
-### Parameter: `name`
-
-The name of the Azure Databricks workspace to create.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `amlWorkspaceResourceId`
-
-The resource ID of a Azure Machine Learning workspace to link with Databricks workspace.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition to use for the managed service.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKeyManagedDisk`
-
-The customer managed key definition to use for the managed disk.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeymanageddiskkeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeymanageddiskkeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeymanageddiskkeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`rotationToLatestKeyVersionEnabled`](#parameter-customermanagedkeymanageddiskrotationtolatestkeyversionenabled) | bool | Indicate whether the latest key version should be automatically used for Managed Disk Encryption. Enabled by default. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeymanageddiskuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKeyManagedDisk.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKeyManagedDisk.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKeyManagedDisk.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKeyManagedDisk.rotationToLatestKeyVersionEnabled`
-
-Indicate whether the latest key version should be automatically used for Managed Disk Encryption. Enabled by default.
-
-- Required: No
-- Type: bool
-
-### Parameter: `customerManagedKeyManagedDisk.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `customPrivateSubnetName`
-
-The name of the Private Subnet within the Virtual Network.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `customPublicSubnetName`
-
-The name of a Public Subnet within the Virtual Network.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `customVirtualNetworkResourceId`
-
-The resource ID of a Virtual Network where this Databricks Cluster should be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disablePublicIp`
-
-Disable Public IP.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `loadBalancerBackendPoolName`
-
-Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `loadBalancerResourceId`
-
-Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedResourceGroupResourceId`
-
-The managed resource group ID. It is created by the module as per the to-be resource ID you provide.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `natGatewayName`
-
-Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `prepareEncryption`
-
-Prepare the workspace for encryption. Enables the Managed Identity for managed storage account.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicIpName`
-
-Name of the Public IP for No Public IP workspace with managed vNet.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `publicNetworkAccess`
-
- The network access type for accessing workspace. Set value to disabled to access workspace only via private link.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `requiredNsgRules`
-
-Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private endpoint.
-
-- Required: No
-- Type: string
-- Default: `'AllRules'`
-- Allowed:
- ```Bicep
- [
- 'AllRules'
- 'NoAzureDatabricksRules'
- ]
- ```
-
-### Parameter: `requireInfrastructureEncryption`
-
-A boolean indicating whether or not the DBFS root file system will be enabled with secondary layer of encryption with platform managed keys for data at rest.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `skuName`
-
-The pricing tier of workspace.
-
-- Required: No
-- Type: string
-- Default: `'premium'`
-- Allowed:
- ```Bicep
- [
- 'premium'
- 'standard'
- 'trial'
- ]
- ```
-
-### Parameter: `storageAccountName`
-
-Default DBFS storage account name.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `storageAccountSkuName`
-
-Storage account SKU name.
-
-- Required: No
-- Type: string
-- Default: `'Standard_GRS'`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `vnetAddressPrefix`
-
-Address prefix for Managed virtual network.
-
-- Required: No
-- Type: string
-- Default: `'10.139'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed databricks workspace. |
-| `resourceGroupName` | string | The resource group of the deployed databricks workspace. |
-| `resourceId` | string | The resource ID of the deployed databricks workspace. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
-
-## Notes
-
-### Parameter Usage: `customPublicSubnetName` and `customPrivateSubnetName`
-
-- Require Network Security Groups attached to the subnets (Note: Rule don't have to be set, they are set through the deployment)
-
-- The two subnets also need the delegation to service `Microsoft.Databricks/workspaces`
-
-### Parameter Usage: `parameters`
-
-- Include only those elements (e.g. amlWorkspaceId) as object if specified, otherwise remove it.
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/databricks/workspace/main.bicep b/modules/databricks/workspace/main.bicep
deleted file mode 100644
index 0d7e6cdb19..0000000000
--- a/modules/databricks/workspace/main.bicep
+++ /dev/null
@@ -1,487 +0,0 @@
-metadata name = 'Azure Databricks Workspaces'
-metadata description = 'This module deploys an Azure Databricks Workspace.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Azure Databricks workspace to create.')
-param name string
-
-@description('Optional. The managed resource group ID. It is created by the module as per the to-be resource ID you provide.')
-param managedResourceGroupResourceId string = ''
-
-@description('Optional. The pricing tier of workspace.')
-@allowed([
- 'trial'
- 'standard'
- 'premium'
-])
-param skuName string = 'premium'
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The resource ID of a Virtual Network where this Databricks Cluster should be created.')
-param customVirtualNetworkResourceId string = ''
-
-@description('Optional. The resource ID of a Azure Machine Learning workspace to link with Databricks workspace.')
-param amlWorkspaceResourceId string = ''
-
-@description('Optional. The name of the Private Subnet within the Virtual Network.')
-param customPrivateSubnetName string = ''
-
-@description('Optional. The name of a Public Subnet within the Virtual Network.')
-param customPublicSubnetName string = ''
-
-@description('Optional. Disable Public IP.')
-param disablePublicIp bool = false
-
-@description('Optional. The customer managed key definition to use for the managed service.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. The customer managed key definition to use for the managed disk.')
-param customerManagedKeyManagedDisk customerManagedKeyManagedDiskType
-
-@description('Optional. Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP).')
-param loadBalancerBackendPoolName string = ''
-
-@description('Optional. Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace.')
-param loadBalancerResourceId string = ''
-
-@description('Optional. Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets.')
-param natGatewayName string = ''
-
-@description('Optional. Prepare the workspace for encryption. Enables the Managed Identity for managed storage account.')
-param prepareEncryption bool = false
-
-@description('Optional. Name of the Public IP for No Public IP workspace with managed vNet.')
-param publicIpName string = ''
-
-@description('Optional. A boolean indicating whether or not the DBFS root file system will be enabled with secondary layer of encryption with platform managed keys for data at rest.')
-param requireInfrastructureEncryption bool = false
-
-@description('Optional. Default DBFS storage account name.')
-param storageAccountName string = ''
-
-@description('Optional. Storage account SKU name.')
-param storageAccountSkuName string = 'Standard_GRS'
-
-@description('Optional. Address prefix for Managed virtual network.')
-param vnetAddressPrefix string = '10.139'
-
-@description('Optional. The network access type for accessing workspace. Set value to disabled to access workspace only via private link.')
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-param publicNetworkAccess string = 'Enabled'
-
-@description('Optional. Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private endpoint.')
-@allowed([
- 'AllRules'
- 'NoAzureDatabricksRules'
-])
-param requiredNsgRules string = 'AllRules'
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKManagedDiskKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKeyManagedDisk.?keyVaultResourceId)) {
- name: last(split((customerManagedKeyManagedDisk.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKeyManagedDisk.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKeyManagedDisk.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKeyManagedDisk.?keyVaultResourceId) && !empty(customerManagedKeyManagedDisk.?keyName)) {
- name: customerManagedKeyManagedDisk.?keyName ?? 'dummyKey'
- }
-}
-
-resource workspace 'Microsoft.Databricks/workspaces@2023-02-01' = {
- name: name
- location: location
- tags: tags
- sku: {
- name: skuName
- }
- properties: {
- managedResourceGroupId: !empty(managedResourceGroupResourceId) ? managedResourceGroupResourceId : '${subscription().id}/resourceGroups/${name}-rg'
- parameters: union(
- // Always added parameters
- {
- enableNoPublicIp: {
- value: disablePublicIp
- }
- prepareEncryption: {
- value: prepareEncryption
- }
- vnetAddressPrefix: {
- value: vnetAddressPrefix
- }
- requireInfrastructureEncryption: {
- value: requireInfrastructureEncryption
- }
- },
- // Parameters only added if not empty
- !empty(customVirtualNetworkResourceId) ? {
- customVirtualNetworkId: {
- value: customVirtualNetworkResourceId
- }
- } : {},
- !empty(amlWorkspaceResourceId) ? {
- amlWorkspaceId: {
- value: amlWorkspaceResourceId
- }
- } : {},
- !empty(customPrivateSubnetName) ? {
- customPrivateSubnetName: {
- value: customPrivateSubnetName
- }
- } : {},
- !empty(customPublicSubnetName) ? {
- customPublicSubnetName: {
- value: customPublicSubnetName
- }
- } : {},
- !empty(loadBalancerBackendPoolName) ? {
- loadBalancerBackendPoolName: {
- value: loadBalancerBackendPoolName
- }
- } : {},
- !empty(loadBalancerResourceId) ? {
- loadBalancerId: {
- value: loadBalancerResourceId
- }
- } : {},
- !empty(natGatewayName) ? {
- natGatewayName: {
- value: natGatewayName
- }
- } : {},
- !empty(publicIpName) ? {
- publicIpName: {
- value: publicIpName
- }
- } : {},
- !empty(storageAccountName) ? {
- storageAccountName: {
- value: storageAccountName
- }
- } : {},
- !empty(storageAccountSkuName) ? {
- storageAccountSkuName: {
- value: storageAccountSkuName
- }
- } : {})
- publicNetworkAccess: publicNetworkAccess
- requiredNsgRules: requiredNsgRules
- encryption: !empty(customerManagedKey) || !empty(customerManagedKeyManagedDisk) ? {
- entities: {
- managedServices: !empty(customerManagedKey) ? {
- keySource: 'Microsoft.Keyvault'
- keyVaultProperties: {
- keyVaultUri: cMKKeyVault.properties.vaultUri
- keyName: customerManagedKey!.keyName
- keyVersion: !empty(customerManagedKey.?keyVersion ?? '') ? customerManagedKey!.keyVersion : last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- }
- } : null
- managedDisk: !empty(customerManagedKeyManagedDisk) ? {
- keySource: 'Microsoft.Keyvault'
- keyVaultProperties: {
- keyVaultUri: cMKManagedDiskKeyVault.properties.vaultUri
- keyName: customerManagedKeyManagedDisk!.keyName
- keyVersion: !empty(customerManagedKeyManagedDisk.?keyVersion ?? '') ? customerManagedKeyManagedDisk!.keyVersion : last(split(cMKManagedDiskKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- }
- rotationToLatestKeyVersionEnabled: customerManagedKeyManagedDisk.?rotationToLatestKeyVersionEnabled ?? true
- } : null
- }
- } : null
- }
-}
-
-resource workspace_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: workspace
-}
-
-// Note: Diagnostic Settings are only supported by the premium tier
-resource workspace_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: workspace
-}]
-
-resource workspace_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(workspace.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: workspace
-}]
-
-module workspace_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-workspace-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'databricks_ui_api'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(workspace.id, '/'))}-${privateEndpoint.?service ?? 'databricks_ui_api'}-${index}'
- serviceResourceId: workspace.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The name of the deployed databricks workspace.')
-output name string = workspace.name
-
-@description('The resource ID of the deployed databricks workspace.')
-output resourceId string = workspace.id
-
-@description('The resource group of the deployed databricks workspace.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = workspace.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
-
-type customerManagedKeyManagedDiskType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-
- @description('Optional. Indicate whether the latest key version should be automatically used for Managed Disk Encryption. Enabled by default.')
- rotationToLatestKeyVersionEnabled: bool?
-}?
diff --git a/modules/databricks/workspace/main.json b/modules/databricks/workspace/main.json
deleted file mode 100644
index 47a19aa465..0000000000
--- a/modules/databricks/workspace/main.json
+++ /dev/null
@@ -1,1439 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17678709403904494263"
- },
- "name": "Azure Databricks Workspaces",
- "description": "This module deploys an Azure Databricks Workspace.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyManagedDiskType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- },
- "rotationToLatestKeyVersionEnabled": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Indicate whether the latest key version should be automatically used for Managed Disk Encryption. Enabled by default."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Azure Databricks workspace to create."
- }
- },
- "managedResourceGroupResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The managed resource group ID. It is created by the module as per the to-be resource ID you provide."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "premium",
- "allowedValues": [
- "trial",
- "standard",
- "premium"
- ],
- "metadata": {
- "description": "Optional. The pricing tier of workspace."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "customVirtualNetworkResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of a Virtual Network where this Databricks Cluster should be created."
- }
- },
- "amlWorkspaceResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of a Azure Machine Learning workspace to link with Databricks workspace."
- }
- },
- "customPrivateSubnetName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the Private Subnet within the Virtual Network."
- }
- },
- "customPublicSubnetName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of a Public Subnet within the Virtual Network."
- }
- },
- "disablePublicIp": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Disable Public IP."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition to use for the managed service."
- }
- },
- "customerManagedKeyManagedDisk": {
- "$ref": "#/definitions/customerManagedKeyManagedDiskType",
- "metadata": {
- "description": "Optional. The customer managed key definition to use for the managed disk."
- }
- },
- "loadBalancerBackendPoolName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP)."
- }
- },
- "loadBalancerResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace."
- }
- },
- "natGatewayName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets."
- }
- },
- "prepareEncryption": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Prepare the workspace for encryption. Enables the Managed Identity for managed storage account."
- }
- },
- "publicIpName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Name of the Public IP for No Public IP workspace with managed vNet."
- }
- },
- "requireInfrastructureEncryption": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. A boolean indicating whether or not the DBFS root file system will be enabled with secondary layer of encryption with platform managed keys for data at rest."
- }
- },
- "storageAccountName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Default DBFS storage account name."
- }
- },
- "storageAccountSkuName": {
- "type": "string",
- "defaultValue": "Standard_GRS",
- "metadata": {
- "description": "Optional. Storage account SKU name."
- }
- },
- "vnetAddressPrefix": {
- "type": "string",
- "defaultValue": "10.139",
- "metadata": {
- "description": "Optional. Address prefix for Managed virtual network."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. \tThe network access type for accessing workspace. Set value to disabled to access workspace only via private link."
- }
- },
- "requiredNsgRules": {
- "type": "string",
- "defaultValue": "AllRules",
- "allowedValues": [
- "AllRules",
- "NoAzureDatabricksRules"
- ],
- "metadata": {
- "description": "Optional. Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private endpoint."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "cMKManagedDiskKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKManagedDiskKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKManagedDiskKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "workspace": {
- "type": "Microsoft.Databricks/workspaces",
- "apiVersion": "2023-02-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('skuName')]"
- },
- "properties": {
- "managedResourceGroupId": "[if(not(empty(parameters('managedResourceGroupResourceId'))), parameters('managedResourceGroupResourceId'), format('{0}/resourceGroups/{1}-rg', subscription().id, parameters('name')))]",
- "parameters": "[union(createObject('enableNoPublicIp', createObject('value', parameters('disablePublicIp')), 'prepareEncryption', createObject('value', parameters('prepareEncryption')), 'vnetAddressPrefix', createObject('value', parameters('vnetAddressPrefix')), 'requireInfrastructureEncryption', createObject('value', parameters('requireInfrastructureEncryption'))), if(not(empty(parameters('customVirtualNetworkResourceId'))), createObject('customVirtualNetworkId', createObject('value', parameters('customVirtualNetworkResourceId'))), createObject()), if(not(empty(parameters('amlWorkspaceResourceId'))), createObject('amlWorkspaceId', createObject('value', parameters('amlWorkspaceResourceId'))), createObject()), if(not(empty(parameters('customPrivateSubnetName'))), createObject('customPrivateSubnetName', createObject('value', parameters('customPrivateSubnetName'))), createObject()), if(not(empty(parameters('customPublicSubnetName'))), createObject('customPublicSubnetName', createObject('value', parameters('customPublicSubnetName'))), createObject()), if(not(empty(parameters('loadBalancerBackendPoolName'))), createObject('loadBalancerBackendPoolName', createObject('value', parameters('loadBalancerBackendPoolName'))), createObject()), if(not(empty(parameters('loadBalancerResourceId'))), createObject('loadBalancerId', createObject('value', parameters('loadBalancerResourceId'))), createObject()), if(not(empty(parameters('natGatewayName'))), createObject('natGatewayName', createObject('value', parameters('natGatewayName'))), createObject()), if(not(empty(parameters('publicIpName'))), createObject('publicIpName', createObject('value', parameters('publicIpName'))), createObject()), if(not(empty(parameters('storageAccountName'))), createObject('storageAccountName', createObject('value', parameters('storageAccountName'))), createObject()), if(not(empty(parameters('storageAccountSkuName'))), createObject('storageAccountSkuName', createObject('value', parameters('storageAccountSkuName'))), createObject()))]",
- "publicNetworkAccess": "[parameters('publicNetworkAccess')]",
- "requiredNsgRules": "[parameters('requiredNsgRules')]",
- "encryption": "[if(or(not(empty(parameters('customerManagedKey'))), not(empty(parameters('customerManagedKeyManagedDisk')))), createObject('entities', createObject('managedServices', if(not(empty(parameters('customerManagedKey'))), createObject('keySource', 'Microsoft.Keyvault', 'keyVaultProperties', createObject('keyVaultUri', reference('cMKKeyVault').vaultUri, 'keyName', parameters('customerManagedKey').keyName, 'keyVersion', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), parameters('customerManagedKey').keyVersion, last(split(reference('cMKKeyVault::cMKKey').keyUriWithVersion, '/'))))), null()), 'managedDisk', if(not(empty(parameters('customerManagedKeyManagedDisk'))), createObject('keySource', 'Microsoft.Keyvault', 'keyVaultProperties', createObject('keyVaultUri', reference('cMKManagedDiskKeyVault').vaultUri, 'keyName', parameters('customerManagedKeyManagedDisk').keyName, 'keyVersion', if(not(empty(coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'keyVersion'), ''))), parameters('customerManagedKeyManagedDisk').keyVersion, last(split(reference('cMKManagedDiskKeyVault::cMKKey').keyUriWithVersion, '/')))), 'rotationToLatestKeyVersionEnabled', coalesce(tryGet(parameters('customerManagedKeyManagedDisk'), 'rotationToLatestKeyVersionEnabled'), true())), null()))), null())]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKManagedDiskKeyVault"
- ]
- },
- "workspace_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Databricks/workspaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_diagnosticSettings": {
- "copy": {
- "name": "workspace_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Databricks/workspaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_roleAssignments": {
- "copy": {
- "name": "workspace_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Databricks/workspaces/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Databricks/workspaces', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_privateEndpoints": {
- "copy": {
- "name": "workspace_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-workspace-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'databricks_ui_api')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.Databricks/workspaces', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'databricks_ui_api'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.Databricks/workspaces', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "workspace"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed databricks workspace."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed databricks workspace."
- },
- "value": "[resourceId('Microsoft.Databricks/workspaces', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed databricks workspace."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('workspace', '2023-02-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/databricks/workspace/tests/e2e/defaults/main.test.bicep b/modules/databricks/workspace/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 8c3002937e..0000000000
--- a/modules/databricks/workspace/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-databricks.workspaces-${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 = 'dwmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/databricks/workspace/tests/e2e/max/dependencies.bicep b/modules/databricks/workspace/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 4c074d6ae8..0000000000
--- a/modules/databricks/workspace/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,368 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Key Vault for Disk Encryption to create.')
-param keyVaultDiskName string
-
-@description('Required. The name of the Azure Machine Learning Workspace to create.')
-param amlWorkspaceName string
-
-@description('Required. The name of the Load Balancer to create.')
-param loadBalancerName string
-
-@description('Required. The name of the Network Security Group to create.')
-param networkSecurityGroupName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Application Insights Instanec to create.')
-param applicationInsightsName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyVaultDisk 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultDiskName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKeyDisk'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Key-Vault-Crypto-User-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: '5167ea7a-355a-466f-ae8b-8ea60f718b35' // AzureDatabricks Enterprise Application Object Id
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource amlPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-Key-Vault-Contributor')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_ZRS'
- }
- kind: 'StorageV2'
- properties: {}
-}
-
-resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: applicationInsightsName
- location: location
- kind: 'web'
- properties: {
- Application_Type: 'web'
- }
-}
-
-resource machineLearningWorkspace 'Microsoft.MachineLearningServices/workspaces@2023-04-01' = {
- name: amlWorkspaceName
- location: location
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- storageAccount: storageAccount.id
- keyVault: keyVault.id
- applicationInsights: applicationInsights.id
- primaryUserAssignedIdentity: managedIdentity.id
- }
-}
-
-resource loadBalancer 'Microsoft.Network/loadBalancers@2023-04-01' = {
- name: loadBalancerName
- location: location
- properties: {
- backendAddressPools: [
- {
- name: 'default'
- }
- ]
- frontendIPConfigurations: [
- {
- name: 'privateIPConfig1'
- properties: {
- subnet: {
- id: virtualNetwork.properties.subnets[0].id
- }
- }
- }
- ]
- }
-}
-
-resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2023-04-01' = {
- name: networkSecurityGroupName
- location: location
- properties: {
- securityRules: [
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-worker-inbound'
- properties: {
- description: 'Required for worker nodes communication within a cluster.'
- protocol: '*'
- sourcePortRange: '*'
- destinationPortRange: '*'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'VirtualNetwork'
- access: 'Allow'
- priority: 100
- direction: 'Inbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-databricks-webapp'
- properties: {
- description: 'Required for workers communication with Databricks Webapp.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '443'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'AzureDatabricks'
- access: 'Allow'
- priority: 100
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-sql'
- properties: {
- description: 'Required for workers communication with Azure SQL services.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '3306'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'Sql'
- access: 'Allow'
- priority: 101
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-storage'
- properties: {
- description: 'Required for workers communication with Azure Storage services.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '443'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'Storage'
- access: 'Allow'
- priority: 102
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-worker-outbound'
- properties: {
- description: 'Required for worker nodes communication within a cluster.'
- protocol: '*'
- sourcePortRange: '*'
- destinationPortRange: '*'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'VirtualNetwork'
- access: 'Allow'
- priority: 103
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-eventhub'
- properties: {
- description: 'Required for worker communication with Azure Eventhub services.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '9093'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'EventHub'
- access: 'Allow'
- priority: 104
- direction: 'Outbound'
- }
- }
- ]
- }
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-01-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 20, 0)
- }
- }
- {
- name: 'custom-public-subnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 20, 1)
- networkSecurityGroup: {
- id: networkSecurityGroup.id
- }
- delegations: [
- {
- name: 'databricksDelegation'
- properties: {
- serviceName: 'Microsoft.Databricks/workspaces'
- }
- }
- ]
- }
- }
- {
- name: 'custom-private-subnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 20, 2)
- networkSecurityGroup: {
- id: networkSecurityGroup.id
- }
- delegations: [
- {
- name: 'databricksDelegation'
- properties: {
- serviceName: 'Microsoft.Databricks/workspaces'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.azuredatabricks.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Default Subnet.')
-output defaultSubnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The name of the created Virtual Network Public Subnet.')
-output customPublicSubnetName string = virtualNetwork.properties.subnets[1].name
-
-@description('The name of the created Virtual Network Private Subnet.')
-output customPrivateSubnetName string = virtualNetwork.properties.subnets[2].name
-
-@description('The resource ID of the created Virtual Network.')
-output virtualNetworkResourceId string = virtualNetwork.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Azure Machine Learning Workspace.')
-output machineLearningWorkspaceResourceId string = machineLearningWorkspace.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The resource ID of the created Disk Key Vault.')
-output keyVaultDiskResourceId string = keyVaultDisk.id
-
-@description('The resource ID of the created Load Balancer.')
-output loadBalancerResourceId string = loadBalancer.id
-
-@description('The name of the created Load Balancer Backend Pool.')
-output loadBalancerBackendPoolName string = loadBalancer.properties.backendAddressPools[0].name
-
-@description('The name of the created Key Vault encryption key.')
-output keyVaultKeyName string = keyVault::key.name
-
-@description('The name of the created Key Vault Disk encryption key.')
-output keyVaultDiskKeyName string = keyVaultDisk::key.name
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/databricks/workspace/tests/e2e/max/main.test.bicep b/modules/databricks/workspace/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 5656e772da..0000000000
--- a/modules/databricks/workspace/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,167 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-databricks.workspaces-${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 = 'dwmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- amlWorkspaceName: 'dep-${namePrefix}-aml-${serviceShort}'
- applicationInsightsName: 'dep-${namePrefix}-appi-${serviceShort}'
- loadBalancerName: 'dep-${namePrefix}-lb-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- networkSecurityGroupName: 'dep-${namePrefix}-nsg-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- keyVaultDiskName: 'dep-${namePrefix}-kve-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- logCategoriesAndGroups: [
- {
- category: 'jobs'
- }
- {
- category: 'notebook'
-
- }
- ]
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- }
- customerManagedKeyManagedDisk: {
- keyName: nestedDependencies.outputs.keyVaultDiskKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultDiskResourceId
- rotationToLatestKeyVersionEnabled: true
- }
- storageAccountName: 'sa${namePrefix}${serviceShort}001'
- storageAccountSkuName: 'Standard_ZRS'
- publicIpName: 'nat-gw-public-ip'
- natGatewayName: 'nat-gateway'
- prepareEncryption: true
- requiredNsgRules: 'NoAzureDatabricksRules'
- skuName: 'premium'
- amlWorkspaceResourceId: nestedDependencies.outputs.machineLearningWorkspaceResourceId
- customPrivateSubnetName: nestedDependencies.outputs.customPrivateSubnetName
- customPublicSubnetName: nestedDependencies.outputs.customPublicSubnetName
- publicNetworkAccess: 'Disabled'
- disablePublicIp: true
- loadBalancerResourceId: nestedDependencies.outputs.loadBalancerResourceId
- loadBalancerBackendPoolName: nestedDependencies.outputs.loadBalancerBackendPoolName
- customVirtualNetworkResourceId: nestedDependencies.outputs.virtualNetworkResourceId
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.defaultSubnetResourceId
- tags: {
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- managedResourceGroupResourceId: '${subscription().id}/resourceGroups/rg-${resourceGroupName}-managed'
- requireInfrastructureEncryption: true
- vnetAddressPrefix: '10.100'
- location: resourceGroup.location
- }
-}]
diff --git a/modules/databricks/workspace/tests/e2e/waf-aligned/dependencies.bicep b/modules/databricks/workspace/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 4c074d6ae8..0000000000
--- a/modules/databricks/workspace/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,368 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Key Vault for Disk Encryption to create.')
-param keyVaultDiskName string
-
-@description('Required. The name of the Azure Machine Learning Workspace to create.')
-param amlWorkspaceName string
-
-@description('Required. The name of the Load Balancer to create.')
-param loadBalancerName string
-
-@description('Required. The name of the Network Security Group to create.')
-param networkSecurityGroupName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Application Insights Instanec to create.')
-param applicationInsightsName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyVaultDisk 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultDiskName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKeyDisk'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Key-Vault-Crypto-User-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: '5167ea7a-355a-466f-ae8b-8ea60f718b35' // AzureDatabricks Enterprise Application Object Id
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource amlPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-Key-Vault-Contributor')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_ZRS'
- }
- kind: 'StorageV2'
- properties: {}
-}
-
-resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: applicationInsightsName
- location: location
- kind: 'web'
- properties: {
- Application_Type: 'web'
- }
-}
-
-resource machineLearningWorkspace 'Microsoft.MachineLearningServices/workspaces@2023-04-01' = {
- name: amlWorkspaceName
- location: location
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- storageAccount: storageAccount.id
- keyVault: keyVault.id
- applicationInsights: applicationInsights.id
- primaryUserAssignedIdentity: managedIdentity.id
- }
-}
-
-resource loadBalancer 'Microsoft.Network/loadBalancers@2023-04-01' = {
- name: loadBalancerName
- location: location
- properties: {
- backendAddressPools: [
- {
- name: 'default'
- }
- ]
- frontendIPConfigurations: [
- {
- name: 'privateIPConfig1'
- properties: {
- subnet: {
- id: virtualNetwork.properties.subnets[0].id
- }
- }
- }
- ]
- }
-}
-
-resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2023-04-01' = {
- name: networkSecurityGroupName
- location: location
- properties: {
- securityRules: [
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-worker-inbound'
- properties: {
- description: 'Required for worker nodes communication within a cluster.'
- protocol: '*'
- sourcePortRange: '*'
- destinationPortRange: '*'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'VirtualNetwork'
- access: 'Allow'
- priority: 100
- direction: 'Inbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-databricks-webapp'
- properties: {
- description: 'Required for workers communication with Databricks Webapp.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '443'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'AzureDatabricks'
- access: 'Allow'
- priority: 100
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-sql'
- properties: {
- description: 'Required for workers communication with Azure SQL services.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '3306'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'Sql'
- access: 'Allow'
- priority: 101
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-storage'
- properties: {
- description: 'Required for workers communication with Azure Storage services.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '443'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'Storage'
- access: 'Allow'
- priority: 102
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-worker-outbound'
- properties: {
- description: 'Required for worker nodes communication within a cluster.'
- protocol: '*'
- sourcePortRange: '*'
- destinationPortRange: '*'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'VirtualNetwork'
- access: 'Allow'
- priority: 103
- direction: 'Outbound'
- }
- }
- {
- name: 'Microsoft.Databricks-workspaces_UseOnly_databricks-worker-to-eventhub'
- properties: {
- description: 'Required for worker communication with Azure Eventhub services.'
- protocol: 'Tcp'
- sourcePortRange: '*'
- destinationPortRange: '9093'
- sourceAddressPrefix: 'VirtualNetwork'
- destinationAddressPrefix: 'EventHub'
- access: 'Allow'
- priority: 104
- direction: 'Outbound'
- }
- }
- ]
- }
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-01-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 20, 0)
- }
- }
- {
- name: 'custom-public-subnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 20, 1)
- networkSecurityGroup: {
- id: networkSecurityGroup.id
- }
- delegations: [
- {
- name: 'databricksDelegation'
- properties: {
- serviceName: 'Microsoft.Databricks/workspaces'
- }
- }
- ]
- }
- }
- {
- name: 'custom-private-subnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 20, 2)
- networkSecurityGroup: {
- id: networkSecurityGroup.id
- }
- delegations: [
- {
- name: 'databricksDelegation'
- properties: {
- serviceName: 'Microsoft.Databricks/workspaces'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.azuredatabricks.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Default Subnet.')
-output defaultSubnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The name of the created Virtual Network Public Subnet.')
-output customPublicSubnetName string = virtualNetwork.properties.subnets[1].name
-
-@description('The name of the created Virtual Network Private Subnet.')
-output customPrivateSubnetName string = virtualNetwork.properties.subnets[2].name
-
-@description('The resource ID of the created Virtual Network.')
-output virtualNetworkResourceId string = virtualNetwork.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Azure Machine Learning Workspace.')
-output machineLearningWorkspaceResourceId string = machineLearningWorkspace.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The resource ID of the created Disk Key Vault.')
-output keyVaultDiskResourceId string = keyVaultDisk.id
-
-@description('The resource ID of the created Load Balancer.')
-output loadBalancerResourceId string = loadBalancer.id
-
-@description('The name of the created Load Balancer Backend Pool.')
-output loadBalancerBackendPoolName string = loadBalancer.properties.backendAddressPools[0].name
-
-@description('The name of the created Key Vault encryption key.')
-output keyVaultKeyName string = keyVault::key.name
-
-@description('The name of the created Key Vault Disk encryption key.')
-output keyVaultDiskKeyName string = keyVaultDisk::key.name
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep b/modules/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 66928e1121..0000000000
--- a/modules/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,150 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-databricks.workspaces-${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 = 'dwwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- amlWorkspaceName: 'dep-${namePrefix}-aml-${serviceShort}'
- applicationInsightsName: 'dep-${namePrefix}-appi-${serviceShort}'
- loadBalancerName: 'dep-${namePrefix}-lb-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- networkSecurityGroupName: 'dep-${namePrefix}-nsg-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- keyVaultDiskName: 'dep-${namePrefix}-kve-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- logCategoriesAndGroups: [
- {
- category: 'jobs'
- }
- {
- category: 'notebook'
-
- }
- ]
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- }
- customerManagedKeyManagedDisk: {
- keyName: nestedDependencies.outputs.keyVaultDiskKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultDiskResourceId
- rotationToLatestKeyVersionEnabled: true
- }
- storageAccountName: 'sa${namePrefix}${serviceShort}001'
- storageAccountSkuName: 'Standard_ZRS'
- publicIpName: 'nat-gw-public-ip'
- natGatewayName: 'nat-gateway'
- prepareEncryption: true
- requiredNsgRules: 'NoAzureDatabricksRules'
- skuName: 'premium'
- amlWorkspaceResourceId: nestedDependencies.outputs.machineLearningWorkspaceResourceId
- customPrivateSubnetName: nestedDependencies.outputs.customPrivateSubnetName
- customPublicSubnetName: nestedDependencies.outputs.customPublicSubnetName
- publicNetworkAccess: 'Disabled'
- disablePublicIp: true
- loadBalancerResourceId: nestedDependencies.outputs.loadBalancerResourceId
- loadBalancerBackendPoolName: nestedDependencies.outputs.loadBalancerBackendPoolName
- customVirtualNetworkResourceId: nestedDependencies.outputs.virtualNetworkResourceId
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.defaultSubnetResourceId
- tags: {
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- managedResourceGroupResourceId: '${subscription().id}/resourceGroups/rg-${resourceGroupName}-managed'
- requireInfrastructureEncryption: true
- vnetAddressPrefix: '10.100'
- location: resourceGroup.location
- }
-}]
diff --git a/modules/databricks/workspace/version.json b/modules/databricks/workspace/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/databricks/workspace/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-my-sql/flexible-server/README.md b/modules/db-for-my-sql/flexible-server/README.md
index bdbfbf4aa1..e07b9d744a 100644
--- a/modules/db-for-my-sql/flexible-server/README.md
+++ b/modules/db-for-my-sql/flexible-server/README.md
@@ -1,1286 +1,7 @@
-# DBforMySQL Flexible Servers `[Microsoft.DBforMySQL/flexibleServers]`
+
-
-
-
-### Example 2: _Private_
-
-
-
-
-
-### Example 3: _Public_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the MySQL flexible server. |
-| [`skuName`](#parameter-skuname) | string | The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. |
-| [`tier`](#parameter-tier) | string | The tier of the particular SKU. Tier must align with the "skuName" property. Example, tier cannot be "Burstable" if skuName is "Standard_D4s_v3". |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. Required if 'customerManagedKey' is not empty. |
-| [`privateDnsZoneResourceId`](#parameter-privatednszoneresourceid) | string | Private dns zone arm resource ID. Used when the desired connectivity mode is "Private Access". Required if "delegatedSubnetResourceId" is used and the Private DNS Zone name must end with mysql.database.azure.com in order to be linked to the MySQL Flexible Server. |
-| [`restorePointInTime`](#parameter-restorepointintime) | string | Restore point creation time (ISO8601 format), specifying the time to restore from. Required if "createMode" is set to "PointInTimeRestore". |
-| [`sourceServerResourceId`](#parameter-sourceserverresourceid) | string | The source MySQL server ID. Required if "createMode" is set to "PointInTimeRestore". |
-| [`storageAutoGrow`](#parameter-storageautogrow) | string | Enable Storage Auto Grow or not. Storage auto-growth prevents a server from running out of storage and becoming read-only. Required if "highAvailability" is not "Disabled". |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`administratorLogin`](#parameter-administratorlogin) | string | The administrator login name of a server. Can only be specified when the MySQL server is being created. |
-| [`administratorLoginPassword`](#parameter-administratorloginpassword) | securestring | The administrator login password. |
-| [`administrators`](#parameter-administrators) | array | The Azure AD administrators when AAD authentication enabled. |
-| [`availabilityZone`](#parameter-availabilityzone) | string | Availability zone information of the server. Default will have no preference set. |
-| [`backupRetentionDays`](#parameter-backupretentiondays) | int | Backup retention days for the server. |
-| [`createMode`](#parameter-createmode) | string | The mode to create a new MySQL server. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition to use for the managed service. |
-| [`customerManagedKeyGeo`](#parameter-customermanagedkeygeo) | object | The customer managed key definition to use when geoRedundantBackup is "Enabled". |
-| [`databases`](#parameter-databases) | array | The databases to create in the server. |
-| [`delegatedSubnetResourceId`](#parameter-delegatedsubnetresourceid) | string | Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration. Delegation must be enabled on the subnet for MySQL Flexible Servers and subnet CIDR size is /29. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`firewallRules`](#parameter-firewallrules) | array | The firewall rules to create in the MySQL flexible server. |
-| [`geoRedundantBackup`](#parameter-georedundantbackup) | string | A value indicating whether Geo-Redundant backup is enabled on the server. If "Enabled" and "cMKKeyName" is not empty, then "geoBackupCMKKeyVaultResourceId" and "cMKUserAssignedIdentityResourceId" are also required. |
-| [`highAvailability`](#parameter-highavailability) | string | The mode for High Availability (HA). It is not supported for the Burstable pricing tier and Zone redundant HA can only be set during server provisioning. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`maintenanceWindow`](#parameter-maintenancewindow) | object | Properties for the maintenence window. If provided, "customWindow" property must exist and set to "Enabled". |
-| [`replicationRole`](#parameter-replicationrole) | string | The replication role. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11". |
-| [`storageAutoIoScaling`](#parameter-storageautoioscaling) | string | Enable IO Auto Scaling or not. The server scales IOPs up or down automatically depending on your workload needs. |
-| [`storageIOPS`](#parameter-storageiops) | int | Storage IOPS for a server. Max IOPS are determined by compute size. |
-| [`storageSizeGB`](#parameter-storagesizegb) | int | Max storage allowed for a server. In all compute tiers, the minimum storage supported is 20 GiB and maximum is 16 TiB. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`version`](#parameter-version) | string | MySQL Server version. |
-
-### Parameter: `name`
-
-The name of the MySQL flexible server.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `skuName`
-
-The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `tier`
-
-The tier of the particular SKU. Tier must align with the "skuName" property. Example, tier cannot be "Burstable" if skuName is "Standard_D4s_v3".
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Burstable'
- 'GeneralPurpose'
- 'MemoryOptimized'
- ]
- ```
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. Required if 'customerManagedKey' is not empty.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `privateDnsZoneResourceId`
-
-Private dns zone arm resource ID. Used when the desired connectivity mode is "Private Access". Required if "delegatedSubnetResourceId" is used and the Private DNS Zone name must end with mysql.database.azure.com in order to be linked to the MySQL Flexible Server.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `restorePointInTime`
-
-Restore point creation time (ISO8601 format), specifying the time to restore from. Required if "createMode" is set to "PointInTimeRestore".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `sourceServerResourceId`
-
-The source MySQL server ID. Required if "createMode" is set to "PointInTimeRestore".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `storageAutoGrow`
-
-Enable Storage Auto Grow or not. Storage auto-growth prevents a server from running out of storage and becoming read-only. Required if "highAvailability" is not "Disabled".
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `administratorLogin`
-
-The administrator login name of a server. Can only be specified when the MySQL server is being created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `administratorLoginPassword`
-
-The administrator login password.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `administrators`
-
-The Azure AD administrators when AAD authentication enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `availabilityZone`
-
-Availability zone information of the server. Default will have no preference set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- '1'
- '2'
- '3'
- ]
- ```
-
-### Parameter: `backupRetentionDays`
-
-Backup retention days for the server.
-
-- Required: No
-- Type: int
-- Default: `7`
-
-### Parameter: `createMode`
-
-The mode to create a new MySQL server.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'GeoRestore'
- 'PointInTimeRestore'
- 'Replica'
- ]
- ```
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition to use for the managed service.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKeyGeo`
-
-The customer managed key definition to use when geoRedundantBackup is "Enabled".
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeygeokeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeygeokeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeygeouserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeygeokeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-
-### Parameter: `customerManagedKeyGeo.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKeyGeo.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKeyGeo.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKeyGeo.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `databases`
-
-The databases to create in the server.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `delegatedSubnetResourceId`
-
-Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration. Delegation must be enabled on the subnet for MySQL Flexible Servers and subnet CIDR size is /29.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `firewallRules`
-
-The firewall rules to create in the MySQL flexible server.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `geoRedundantBackup`
-
-A value indicating whether Geo-Redundant backup is enabled on the server. If "Enabled" and "cMKKeyName" is not empty, then "geoBackupCMKKeyVaultResourceId" and "cMKUserAssignedIdentityResourceId" are also required.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `highAvailability`
-
-The mode for High Availability (HA). It is not supported for the Burstable pricing tier and Zone redundant HA can only be set during server provisioning.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'SameZone'
- 'ZoneRedundant'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `maintenanceWindow`
-
-Properties for the maintenence window. If provided, "customWindow" property must exist and set to "Enabled".
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `replicationRole`
-
-The replication role.
-
-- Required: No
-- Type: string
-- Default: `'None'`
-- Allowed:
- ```Bicep
- [
- 'None'
- 'Replica'
- 'Source'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11".
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `storageAutoIoScaling`
-
-Enable IO Auto Scaling or not. The server scales IOPs up or down automatically depending on your workload needs.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `storageIOPS`
-
-Storage IOPS for a server. Max IOPS are determined by compute size.
-
-- Required: No
-- Type: int
-- Default: `1000`
-
-### Parameter: `storageSizeGB`
-
-Max storage allowed for a server. In all compute tiers, the minimum storage supported is 20 GiB and maximum is 16 TiB.
-
-- Required: No
-- Type: int
-- Default: `64`
-- Allowed:
- ```Bicep
- [
- 20
- 32
- 64
- 128
- 256
- 512
- 1024
- 2048
- 4096
- 8192
- 16384
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `version`
-
-MySQL Server version.
-
-- Required: No
-- Type: string
-- Default: `'5.7'`
-- Allowed:
- ```Bicep
- [
- '5.7'
- '8.0.21'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed MySQL Flexible server. |
-| `resourceGroupName` | string | The resource group of the deployed MySQL Flexible server. |
-| `resourceId` | string | The resource ID of the deployed MySQL Flexible server. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/db-for-my-sql/flexible-server/administrator/README.md b/modules/db-for-my-sql/flexible-server/administrator/README.md
deleted file mode 100644
index 827b434ef7..0000000000
--- a/modules/db-for-my-sql/flexible-server/administrator/README.md
+++ /dev/null
@@ -1,105 +0,0 @@
-# DBforMySQL Flexible Server Administrators `[Microsoft.DBforMySQL/flexibleServers/administrators]`
-
-This module deploys a DBforMySQL Flexible Server Administrator.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforMySQL/flexibleServers/administrators` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-01-01/flexibleServers/administrators) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`identityResourceId`](#parameter-identityresourceid) | string | The resource ID of the identity used for AAD Authentication. |
-| [`login`](#parameter-login) | string | Login name of the server administrator. |
-| [`sid`](#parameter-sid) | string | SID (object ID) of the server administrator. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent DBforMySQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`tenantId`](#parameter-tenantid) | string | The tenantId of the Active Directory administrator. |
-
-### Parameter: `identityResourceId`
-
-The resource ID of the identity used for AAD Authentication.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `login`
-
-Login name of the server administrator.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `sid`
-
-SID (object ID) of the server administrator.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `flexibleServerName`
-
-The name of the parent DBforMySQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `tenantId`
-
-The tenantId of the Active Directory administrator.
-
-- Required: No
-- Type: string
-- Default: `[tenant().tenantId]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed administrator. |
-| `resourceGroupName` | string | The resource group of the deployed administrator. |
-| `resourceId` | string | The resource ID of the deployed administrator. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-my-sql/flexible-server/administrator/main.bicep b/modules/db-for-my-sql/flexible-server/administrator/main.bicep
deleted file mode 100644
index c5442f24ea..0000000000
--- a/modules/db-for-my-sql/flexible-server/administrator/main.bicep
+++ /dev/null
@@ -1,61 +0,0 @@
-metadata name = 'DBforMySQL Flexible Server Administrators'
-metadata description = 'This module deploys a DBforMySQL Flexible Server Administrator.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent DBforMySQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Required. SID (object ID) of the server administrator.')
-param sid string
-
-@description('Required. The resource ID of the identity used for AAD Authentication.')
-param identityResourceId string
-
-@description('Required. Login name of the server administrator.')
-param login string
-
-@description('Optional. The tenantId of the Active Directory administrator.')
-param tenantId string = tenant().tenantId
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforMySQL/flexibleServers@2022-01-01' existing = {
- name: flexibleServerName
-}
-
-resource administrator 'Microsoft.DBforMySQL/flexibleServers/administrators@2022-01-01' = {
- name: 'ActiveDirectory'
- parent: flexibleServer
- properties: {
- administratorType: 'ActiveDirectory'
- identityResourceId: identityResourceId
- login: login
- sid: sid
- tenantId: tenantId
- }
-}
-
-@description('The name of the deployed administrator.')
-output name string = administrator.name
-
-@description('The resource ID of the deployed administrator.')
-output resourceId string = administrator.id
-
-@description('The resource group of the deployed administrator.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-my-sql/flexible-server/administrator/main.json b/modules/db-for-my-sql/flexible-server/administrator/main.json
deleted file mode 100644
index 41ee008d22..0000000000
--- a/modules/db-for-my-sql/flexible-server/administrator/main.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16367563858411209197"
- },
- "name": "DBforMySQL Flexible Server Administrators",
- "description": "This module deploys a DBforMySQL Flexible Server Administrator.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent DBforMySQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "sid": {
- "type": "string",
- "metadata": {
- "description": "Required. SID (object ID) of the server administrator."
- }
- },
- "identityResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the identity used for AAD Authentication."
- }
- },
- "login": {
- "type": "string",
- "metadata": {
- "description": "Required. Login name of the server administrator."
- }
- },
- "tenantId": {
- "type": "string",
- "defaultValue": "[tenant().tenantId]",
- "metadata": {
- "description": "Optional. The tenantId of the Active Directory administrator."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforMySQL/flexibleServers/administrators",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), 'ActiveDirectory')]",
- "properties": {
- "administratorType": "ActiveDirectory",
- "identityResourceId": "[parameters('identityResourceId')]",
- "login": "[parameters('login')]",
- "sid": "[parameters('sid')]",
- "tenantId": "[parameters('tenantId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed administrator."
- },
- "value": "ActiveDirectory"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed administrator."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers/administrators', parameters('flexibleServerName'), 'ActiveDirectory')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed administrator."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-my-sql/flexible-server/administrator/version.json b/modules/db-for-my-sql/flexible-server/administrator/version.json
deleted file mode 100644
index 7fa401bdf7..0000000000
--- a/modules/db-for-my-sql/flexible-server/administrator/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.1",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-my-sql/flexible-server/database/README.md b/modules/db-for-my-sql/flexible-server/database/README.md
deleted file mode 100644
index 4bcb034a0b..0000000000
--- a/modules/db-for-my-sql/flexible-server/database/README.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# DBforMySQL Flexible Server Databases `[Microsoft.DBforMySQL/flexibleServers/databases]`
-
-This module deploys a DBforMySQL Flexible Server Database.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforMySQL/flexibleServers/databases` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-01-01/flexibleServers/databases) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the database. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`charset`](#parameter-charset) | string | The charset of the database. |
-| [`collation`](#parameter-collation) | string | The collation of the database. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-
-### Parameter: `name`
-
-The name of the database.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `flexibleServerName`
-
-The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `charset`
-
-The charset of the database.
-
-- Required: No
-- Type: string
-- Default: `'utf8_general_ci'`
-
-### Parameter: `collation`
-
-The collation of the database.
-
-- Required: No
-- Type: string
-- Default: `'utf8'`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed database. |
-| `resourceGroupName` | string | The resource group of the deployed database. |
-| `resourceId` | string | The resource ID of the deployed database. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-my-sql/flexible-server/database/main.bicep b/modules/db-for-my-sql/flexible-server/database/main.bicep
deleted file mode 100644
index 2c4fd62547..0000000000
--- a/modules/db-for-my-sql/flexible-server/database/main.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-metadata name = 'DBforMySQL Flexible Server Databases'
-metadata description = 'This module deploys a DBforMySQL Flexible Server Database.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the database.')
-param name string
-
-@description('Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Optional. The collation of the database.')
-param collation string = 'utf8'
-
-@description('Optional. The charset of the database.')
-param charset string = 'utf8_general_ci'
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforMySQL/flexibleServers@2022-09-30-preview' existing = {
- name: flexibleServerName
-}
-
-resource database 'Microsoft.DBforMySQL/flexibleServers/databases@2022-01-01' = {
- name: name
- parent: flexibleServer
- properties: {
- collation: !empty(collation) ? collation : null
- charset: !empty(charset) ? charset : null
- }
-}
-
-@description('The name of the deployed database.')
-output name string = database.name
-
-@description('The resource ID of the deployed database.')
-output resourceId string = database.id
-
-@description('The resource group of the deployed database.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-my-sql/flexible-server/database/main.json b/modules/db-for-my-sql/flexible-server/database/main.json
deleted file mode 100644
index 4a68e48562..0000000000
--- a/modules/db-for-my-sql/flexible-server/database/main.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16649222900362138505"
- },
- "name": "DBforMySQL Flexible Server Databases",
- "description": "This module deploys a DBforMySQL Flexible Server Database.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the database."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "collation": {
- "type": "string",
- "defaultValue": "utf8",
- "metadata": {
- "description": "Optional. The collation of the database."
- }
- },
- "charset": {
- "type": "string",
- "defaultValue": "utf8_general_ci",
- "metadata": {
- "description": "Optional. The charset of the database."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforMySQL/flexibleServers/databases",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "collation": "[if(not(empty(parameters('collation'))), parameters('collation'), null())]",
- "charset": "[if(not(empty(parameters('charset'))), parameters('charset'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed database."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers/databases', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed database."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-my-sql/flexible-server/database/version.json b/modules/db-for-my-sql/flexible-server/database/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-my-sql/flexible-server/database/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-my-sql/flexible-server/firewall-rule/README.md b/modules/db-for-my-sql/flexible-server/firewall-rule/README.md
deleted file mode 100644
index 593969aa25..0000000000
--- a/modules/db-for-my-sql/flexible-server/firewall-rule/README.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# DBforMySQL Flexible Server Firewall Rules `[Microsoft.DBforMySQL/flexibleServers/firewallRules]`
-
-This module deploys a DBforMySQL Flexible Server Firewall Rule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforMySQL/flexibleServers/firewallRules` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-01-01/flexibleServers/firewallRules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`endIpAddress`](#parameter-endipaddress) | string | The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. |
-| [`name`](#parameter-name) | string | The name of the MySQL flexible server Firewall Rule. |
-| [`startIpAddress`](#parameter-startipaddress) | string | The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `endIpAddress`
-
-The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the MySQL flexible server Firewall Rule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `startIpAddress`
-
-The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `flexibleServerName`
-
-The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed firewall rule. |
-| `resourceGroupName` | string | The resource group of the deployed firewall rule. |
-| `resourceId` | string | The resource ID of the deployed firewall rule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-my-sql/flexible-server/firewall-rule/main.bicep b/modules/db-for-my-sql/flexible-server/firewall-rule/main.bicep
deleted file mode 100644
index cba30a70e3..0000000000
--- a/modules/db-for-my-sql/flexible-server/firewall-rule/main.bicep
+++ /dev/null
@@ -1,52 +0,0 @@
-metadata name = 'DBforMySQL Flexible Server Firewall Rules'
-metadata description = 'This module deploys a DBforMySQL Flexible Server Firewall Rule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the MySQL flexible server Firewall Rule.')
-param name string
-
-@description('Required. The start IP address of the firewall rule. Must be IPv4 format. Use value \'0.0.0.0\' for all Azure-internal IP addresses.')
-param startIpAddress string
-
-@description('Required. The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value \'0.0.0.0\' for all Azure-internal IP addresses.')
-param endIpAddress string
-
-@description('Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforMySQL/flexibleServers@2022-09-30-preview' existing = {
- name: flexibleServerName
-}
-
-resource firewallRule 'Microsoft.DBforMySQL/flexibleServers/firewallRules@2022-01-01' = {
- name: name
- parent: flexibleServer
- properties: {
- endIpAddress: endIpAddress
- startIpAddress: startIpAddress
- }
-}
-
-@description('The name of the deployed firewall rule.')
-output name string = firewallRule.name
-
-@description('The resource ID of the deployed firewall rule.')
-output resourceId string = firewallRule.id
-
-@description('The resource group of the deployed firewall rule.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-my-sql/flexible-server/firewall-rule/main.json b/modules/db-for-my-sql/flexible-server/firewall-rule/main.json
deleted file mode 100644
index 4b909f3882..0000000000
--- a/modules/db-for-my-sql/flexible-server/firewall-rule/main.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12840531816938690352"
- },
- "name": "DBforMySQL Flexible Server Firewall Rules",
- "description": "This module deploys a DBforMySQL Flexible Server Firewall Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the MySQL flexible server Firewall Rule."
- }
- },
- "startIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "endIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "endIpAddress": "[parameters('endIpAddress')]",
- "startIpAddress": "[parameters('startIpAddress')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed firewall rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed firewall rule."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers/firewallRules', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed firewall rule."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-my-sql/flexible-server/firewall-rule/version.json b/modules/db-for-my-sql/flexible-server/firewall-rule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-my-sql/flexible-server/firewall-rule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-my-sql/flexible-server/main.bicep b/modules/db-for-my-sql/flexible-server/main.bicep
deleted file mode 100644
index d89c29094a..0000000000
--- a/modules/db-for-my-sql/flexible-server/main.bicep
+++ /dev/null
@@ -1,459 +0,0 @@
-metadata name = 'DBforMySQL Flexible Servers'
-metadata description = 'This module deploys a DBforMySQL Flexible Server.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the MySQL flexible server.')
-param name string
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. The administrator login name of a server. Can only be specified when the MySQL server is being created.')
-param administratorLogin string = ''
-
-@description('Optional. The administrator login password.')
-@secure()
-param administratorLoginPassword string = ''
-
-@description('Optional. The Azure AD administrators when AAD authentication enabled.')
-param administrators array = []
-
-@description('Required. The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.')
-param skuName string
-
-@allowed([
- 'GeneralPurpose'
- 'Burstable'
- 'MemoryOptimized'
-])
-@description('Required. The tier of the particular SKU. Tier must align with the "skuName" property. Example, tier cannot be "Burstable" if skuName is "Standard_D4s_v3".')
-param tier string
-
-@allowed([
- ''
- '1'
- '2'
- '3'
-])
-@description('Optional. Availability zone information of the server. Default will have no preference set.')
-param availabilityZone string = ''
-
-@minValue(1)
-@maxValue(35)
-@description('Optional. Backup retention days for the server.')
-param backupRetentionDays int = 7
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. A value indicating whether Geo-Redundant backup is enabled on the server. If "Enabled" and "cMKKeyName" is not empty, then "geoBackupCMKKeyVaultResourceId" and "cMKUserAssignedIdentityResourceId" are also required.')
-param geoRedundantBackup string = 'Disabled'
-
-@allowed([
- 'Default'
- 'GeoRestore'
- 'PointInTimeRestore'
- 'Replica'
-])
-@description('Optional. The mode to create a new MySQL server.')
-param createMode string = 'Default'
-
-@description('Conditional. The managed identity definition for this resource. Required if \'customerManagedKey\' is not empty.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The customer managed key definition to use for the managed service.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. The customer managed key definition to use when geoRedundantBackup is "Enabled".')
-param customerManagedKeyGeo customerManagedKeyType
-
-@allowed([
- 'Disabled'
- 'SameZone'
- 'ZoneRedundant'
-])
-@description('Optional. The mode for High Availability (HA). It is not supported for the Burstable pricing tier and Zone redundant HA can only be set during server provisioning.')
-param highAvailability string = 'Disabled'
-
-@description('Optional. Properties for the maintenence window. If provided, "customWindow" property must exist and set to "Enabled".')
-param maintenanceWindow object = {}
-
-@description('Optional. Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration. Delegation must be enabled on the subnet for MySQL Flexible Servers and subnet CIDR size is /29.')
-param delegatedSubnetResourceId string = ''
-
-@description('Conditional. Private dns zone arm resource ID. Used when the desired connectivity mode is "Private Access". Required if "delegatedSubnetResourceId" is used and the Private DNS Zone name must end with mysql.database.azure.com in order to be linked to the MySQL Flexible Server.')
-param privateDnsZoneResourceId string = ''
-
-@description('Conditional. Restore point creation time (ISO8601 format), specifying the time to restore from. Required if "createMode" is set to "PointInTimeRestore".')
-param restorePointInTime string = ''
-
-@allowed([
- 'None'
- 'Replica'
- 'Source'
-])
-@description('Optional. The replication role.')
-param replicationRole string = 'None'
-
-@description('Conditional. The source MySQL server ID. Required if "createMode" is set to "PointInTimeRestore".')
-param sourceServerResourceId string = ''
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Conditional. Enable Storage Auto Grow or not. Storage auto-growth prevents a server from running out of storage and becoming read-only. Required if "highAvailability" is not "Disabled".')
-param storageAutoGrow string = 'Disabled'
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Enable IO Auto Scaling or not. The server scales IOPs up or down automatically depending on your workload needs.')
-param storageAutoIoScaling string = 'Disabled'
-
-@minValue(360)
-@maxValue(48000)
-@description('Optional. Storage IOPS for a server. Max IOPS are determined by compute size.')
-param storageIOPS int = 1000
-
-@allowed([
- 20
- 32
- 64
- 128
- 256
- 512
- 1024
- 2048
- 4096
- 8192
- 16384
-])
-@description('Optional. Max storage allowed for a server. In all compute tiers, the minimum storage supported is 20 GiB and maximum is 16 TiB.')
-param storageSizeGB int = 64
-
-@allowed([
- '5.7'
- '8.0.21'
-])
-@description('Optional. MySQL Server version.')
-param version string = '5.7'
-
-@description('Optional. The databases to create in the server.')
-param databases array = []
-
-@description('Optional. The firewall rules to create in the MySQL flexible server.')
-param firewallRules array = []
-
-@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 its fully qualified ID in the following format: "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11".')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: !empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'MySQL Backup And Export Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd18ad5f3-1baf-4119-b49b-d944edb1f9d0')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource cMKGeoKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKeyGeo.?keyVaultResourceId)) {
- name: last(split((customerManagedKeyGeo.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKeyGeo.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKeyGeo.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKeyGeo.?keyVaultResourceId) && !empty(customerManagedKeyGeo.?keyName)) {
- name: customerManagedKeyGeo.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKGeoUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKeyGeo.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKeyGeo.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKeyGeo.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKeyGeo.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource flexibleServer 'Microsoft.DBforMySQL/flexibleServers@2022-09-30-preview' = {
- name: name
- location: location
- tags: tags
- sku: {
- name: skuName
- tier: tier
- }
- identity: identity
- properties: {
- administratorLogin: !empty(administratorLogin) ? administratorLogin : null
- administratorLoginPassword: !empty(administratorLoginPassword) ? administratorLoginPassword : null
- availabilityZone: availabilityZone
- backup: {
- backupRetentionDays: backupRetentionDays
- geoRedundantBackup: geoRedundantBackup
- }
- createMode: createMode
- dataEncryption: !empty(customerManagedKey) ? {
- type: 'AzureKeyVault'
- geoBackupKeyURI: geoRedundantBackup == 'Enabled' ? (!empty(customerManagedKeyGeo.?keyVersion ?? '') ? '${cMKGeoKeyVault::cMKKey.properties.keyUri}/${customerManagedKeyGeo!.keyVersion}' : cMKGeoKeyVault::cMKKey.properties.keyUriWithVersion) : null
- geoBackupUserAssignedIdentityId: geoRedundantBackup == 'Enabled' ? cMKGeoUserAssignedIdentity.id : null
- primaryKeyURI: !empty(customerManagedKey.?keyVersion ?? '') ? '${cMKKeyVault::cMKKey.properties.keyUri}/${customerManagedKey!.keyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- primaryUserAssignedIdentityId: cMKUserAssignedIdentity.id
- } : null
- highAvailability: {
- mode: highAvailability
- standbyAvailabilityZone: highAvailability == 'SameZone' ? availabilityZone : null
- }
- maintenanceWindow: !empty(maintenanceWindow) ? {
- customWindow: maintenanceWindow.customWindow
- dayOfWeek: maintenanceWindow.customWindow == 'Enabled' ? maintenanceWindow.dayOfWeek : 0
- startHour: maintenanceWindow.customWindow == 'Enabled' ? maintenanceWindow.startHour : 0
- startMinute: maintenanceWindow.customWindow == 'Enabled' ? maintenanceWindow.startMinute : 0
- } : null
- network: !empty(delegatedSubnetResourceId) && empty(firewallRules) ? {
- delegatedSubnetResourceId: delegatedSubnetResourceId
- privateDnsZoneResourceId: privateDnsZoneResourceId
- } : null
- replicationRole: replicationRole
- restorePointInTime: restorePointInTime
- sourceServerResourceId: !empty(sourceServerResourceId) ? sourceServerResourceId : null
- storage: {
- autoGrow: storageAutoGrow
- autoIoScaling: storageAutoIoScaling
- iops: storageIOPS
- storageSizeGB: storageSizeGB
- }
- version: version
- }
-}
-
-resource flexibleServer_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: flexibleServer
-}
-
-resource flexibleServer_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(flexibleServer.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: flexibleServer
-}]
-
-module flexibleServer_databases 'database/main.bicep' = [for (database, index) in databases: {
- name: '${uniqueString(deployment().name, location)}-MySQL-DB-${index}'
- params: {
- name: database.name
- flexibleServerName: flexibleServer.name
- collation: contains(database, 'collation') ? database.collation : ''
- charset: contains(database, 'charset') ? database.charset : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module flexibleServer_firewallRules 'firewall-rule/main.bicep' = [for (firewallRule, index) in firewallRules: {
- name: '${uniqueString(deployment().name, location)}-MySQL-FirewallRules-${index}'
- params: {
- name: firewallRule.name
- flexibleServerName: flexibleServer.name
- startIpAddress: firewallRule.startIpAddress
- endIpAddress: firewallRule.endIpAddress
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module flexibleServer_administrators 'administrator/main.bicep' = [for (administrator, index) in administrators: {
- name: '${uniqueString(deployment().name, location)}-MySQL-Administrators-${index}'
- params: {
- flexibleServerName: flexibleServer.name
- login: administrator.login
- sid: administrator.sid
- identityResourceId: administrator.identityResourceId
- tenantId: contains(administrator, 'tenantId') ? administrator.tenantId : tenant().tenantId
- }
-}]
-
-resource flexibleServer_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: flexibleServer
-}]
-
-@description('The name of the deployed MySQL Flexible server.')
-output name string = flexibleServer.name
-
-@description('The resource ID of the deployed MySQL Flexible server.')
-output resourceId string = flexibleServer.id
-
-@description('The resource group of the deployed MySQL Flexible server.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = flexibleServer.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Required. User assigned identity to use when fetching the customer managed key.')
- userAssignedIdentityResourceId: string
-}?
diff --git a/modules/db-for-my-sql/flexible-server/main.json b/modules/db-for-my-sql/flexible-server/main.json
deleted file mode 100644
index 5d63ee48ca..0000000000
--- a/modules/db-for-my-sql/flexible-server/main.json
+++ /dev/null
@@ -1,1177 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13509958318011769977"
- },
- "name": "DBforMySQL Flexible Servers",
- "description": "This module deploys a DBforMySQL Flexible Server.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. User assigned identity to use when fetching the customer managed key."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the MySQL flexible server."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "administratorLogin": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The administrator login name of a server. Can only be specified when the MySQL server is being created."
- }
- },
- "administratorLoginPassword": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The administrator login password."
- }
- },
- "administrators": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The Azure AD administrators when AAD authentication enabled."
- }
- },
- "skuName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3."
- }
- },
- "tier": {
- "type": "string",
- "allowedValues": [
- "GeneralPurpose",
- "Burstable",
- "MemoryOptimized"
- ],
- "metadata": {
- "description": "Required. The tier of the particular SKU. Tier must align with the \"skuName\" property. Example, tier cannot be \"Burstable\" if skuName is \"Standard_D4s_v3\"."
- }
- },
- "availabilityZone": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "1",
- "2",
- "3"
- ],
- "metadata": {
- "description": "Optional. Availability zone information of the server. Default will have no preference set."
- }
- },
- "backupRetentionDays": {
- "type": "int",
- "defaultValue": 7,
- "minValue": 1,
- "maxValue": 35,
- "metadata": {
- "description": "Optional. Backup retention days for the server."
- }
- },
- "geoRedundantBackup": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. A value indicating whether Geo-Redundant backup is enabled on the server. If \"Enabled\" and \"cMKKeyName\" is not empty, then \"geoBackupCMKKeyVaultResourceId\" and \"cMKUserAssignedIdentityResourceId\" are also required."
- }
- },
- "createMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "GeoRestore",
- "PointInTimeRestore",
- "Replica"
- ],
- "metadata": {
- "description": "Optional. The mode to create a new MySQL server."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Conditional. The managed identity definition for this resource. Required if 'customerManagedKey' is not empty."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition to use for the managed service."
- }
- },
- "customerManagedKeyGeo": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition to use when geoRedundantBackup is \"Enabled\"."
- }
- },
- "highAvailability": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "SameZone",
- "ZoneRedundant"
- ],
- "metadata": {
- "description": "Optional. The mode for High Availability (HA). It is not supported for the Burstable pricing tier and Zone redundant HA can only be set during server provisioning."
- }
- },
- "maintenanceWindow": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Properties for the maintenence window. If provided, \"customWindow\" property must exist and set to \"Enabled\"."
- }
- },
- "delegatedSubnetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Delegated subnet arm resource ID. Used when the desired connectivity mode is \"Private Access\" - virtual network integration. Delegation must be enabled on the subnet for MySQL Flexible Servers and subnet CIDR size is /29."
- }
- },
- "privateDnsZoneResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Private dns zone arm resource ID. Used when the desired connectivity mode is \"Private Access\". Required if \"delegatedSubnetResourceId\" is used and the Private DNS Zone name must end with mysql.database.azure.com in order to be linked to the MySQL Flexible Server."
- }
- },
- "restorePointInTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Restore point creation time (ISO8601 format), specifying the time to restore from. Required if \"createMode\" is set to \"PointInTimeRestore\"."
- }
- },
- "replicationRole": {
- "type": "string",
- "defaultValue": "None",
- "allowedValues": [
- "None",
- "Replica",
- "Source"
- ],
- "metadata": {
- "description": "Optional. The replication role."
- }
- },
- "sourceServerResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The source MySQL server ID. Required if \"createMode\" is set to \"PointInTimeRestore\"."
- }
- },
- "storageAutoGrow": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Conditional. Enable Storage Auto Grow or not. Storage auto-growth prevents a server from running out of storage and becoming read-only. Required if \"highAvailability\" is not \"Disabled\"."
- }
- },
- "storageAutoIoScaling": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Enable IO Auto Scaling or not. The server scales IOPs up or down automatically depending on your workload needs."
- }
- },
- "storageIOPS": {
- "type": "int",
- "defaultValue": 1000,
- "minValue": 360,
- "maxValue": 48000,
- "metadata": {
- "description": "Optional. Storage IOPS for a server. Max IOPS are determined by compute size."
- }
- },
- "storageSizeGB": {
- "type": "int",
- "defaultValue": 64,
- "allowedValues": [
- 20,
- 32,
- 64,
- 128,
- 256,
- 512,
- 1024,
- 2048,
- 4096,
- 8192,
- 16384
- ],
- "metadata": {
- "description": "Optional. Max storage allowed for a server. In all compute tiers, the minimum storage supported is 20 GiB and maximum is 16 TiB."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "5.7",
- "allowedValues": [
- "5.7",
- "8.0.21"
- ],
- "metadata": {
- "description": "Optional. MySQL Server version."
- }
- },
- "databases": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The databases to create in the server."
- }
- },
- "firewallRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The firewall rules to create in the MySQL flexible server."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: \"/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\"."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null()), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "MySQL Backup And Export Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd18ad5f3-1baf-4119-b49b-d944edb1f9d0')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "cMKGeoKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKeyGeo'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKGeoKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "cMKGeoKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKGeoUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "flexibleServer": {
- "type": "Microsoft.DBforMySQL/flexibleServers",
- "apiVersion": "2022-09-30-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('skuName')]",
- "tier": "[parameters('tier')]"
- },
- "identity": "[variables('identity')]",
- "properties": {
- "administratorLogin": "[if(not(empty(parameters('administratorLogin'))), parameters('administratorLogin'), null())]",
- "administratorLoginPassword": "[if(not(empty(parameters('administratorLoginPassword'))), parameters('administratorLoginPassword'), null())]",
- "availabilityZone": "[parameters('availabilityZone')]",
- "backup": {
- "backupRetentionDays": "[parameters('backupRetentionDays')]",
- "geoRedundantBackup": "[parameters('geoRedundantBackup')]"
- },
- "createMode": "[parameters('createMode')]",
- "dataEncryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('type', 'AzureKeyVault', 'geoBackupKeyURI', if(equals(parameters('geoRedundantBackup'), 'Enabled'), if(not(empty(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKGeoKeyVault::cMKKey').keyUri, parameters('customerManagedKeyGeo').keyVersion), reference('cMKGeoKeyVault::cMKKey').keyUriWithVersion), null()), 'geoBackupUserAssignedIdentityId', if(equals(parameters('geoRedundantBackup'), 'Enabled'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKeyGeo'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))), null()), 'primaryKeyURI', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('customerManagedKey').keyVersion), reference('cMKKeyVault::cMKKey').keyUriWithVersion), 'primaryUserAssignedIdentityId', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/')))), null())]",
- "highAvailability": {
- "mode": "[parameters('highAvailability')]",
- "standbyAvailabilityZone": "[if(equals(parameters('highAvailability'), 'SameZone'), parameters('availabilityZone'), null())]"
- },
- "maintenanceWindow": "[if(not(empty(parameters('maintenanceWindow'))), createObject('customWindow', parameters('maintenanceWindow').customWindow, 'dayOfWeek', if(equals(parameters('maintenanceWindow').customWindow, 'Enabled'), parameters('maintenanceWindow').dayOfWeek, 0), 'startHour', if(equals(parameters('maintenanceWindow').customWindow, 'Enabled'), parameters('maintenanceWindow').startHour, 0), 'startMinute', if(equals(parameters('maintenanceWindow').customWindow, 'Enabled'), parameters('maintenanceWindow').startMinute, 0)), null())]",
- "network": "[if(and(not(empty(parameters('delegatedSubnetResourceId'))), empty(parameters('firewallRules'))), createObject('delegatedSubnetResourceId', parameters('delegatedSubnetResourceId'), 'privateDnsZoneResourceId', parameters('privateDnsZoneResourceId')), null())]",
- "replicationRole": "[parameters('replicationRole')]",
- "restorePointInTime": "[parameters('restorePointInTime')]",
- "sourceServerResourceId": "[if(not(empty(parameters('sourceServerResourceId'))), parameters('sourceServerResourceId'), null())]",
- "storage": {
- "autoGrow": "[parameters('storageAutoGrow')]",
- "autoIoScaling": "[parameters('storageAutoIoScaling')]",
- "iops": "[parameters('storageIOPS')]",
- "storageSizeGB": "[parameters('storageSizeGB')]"
- },
- "version": "[parameters('version')]"
- },
- "dependsOn": [
- "cMKGeoKeyVault",
- "cMKGeoUserAssignedIdentity",
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "flexibleServer_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DBforMySQL/flexibleServers/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_roleAssignments": {
- "copy": {
- "name": "flexibleServer_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DBforMySQL/flexibleServers/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DBforMySQL/flexibleServers', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_diagnosticSettings": {
- "copy": {
- "name": "flexibleServer_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DBforMySQL/flexibleServers/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_databases": {
- "copy": {
- "name": "flexibleServer_databases",
- "count": "[length(parameters('databases'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-MySQL-DB-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('databases')[copyIndex()].name]"
- },
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "collation": "[if(contains(parameters('databases')[copyIndex()], 'collation'), createObject('value', parameters('databases')[copyIndex()].collation), createObject('value', ''))]",
- "charset": "[if(contains(parameters('databases')[copyIndex()], 'charset'), createObject('value', parameters('databases')[copyIndex()].charset), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7585808247826533259"
- },
- "name": "DBforMySQL Flexible Server Databases",
- "description": "This module deploys a DBforMySQL Flexible Server Database.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the database."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "collation": {
- "type": "string",
- "defaultValue": "utf8",
- "metadata": {
- "description": "Optional. The collation of the database."
- }
- },
- "charset": {
- "type": "string",
- "defaultValue": "utf8_general_ci",
- "metadata": {
- "description": "Optional. The charset of the database."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforMySQL/flexibleServers/databases",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "collation": "[if(not(empty(parameters('collation'))), parameters('collation'), null())]",
- "charset": "[if(not(empty(parameters('charset'))), parameters('charset'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed database."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers/databases', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed database."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_firewallRules": {
- "copy": {
- "name": "flexibleServer_firewallRules",
- "count": "[length(parameters('firewallRules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-MySQL-FirewallRules-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('firewallRules')[copyIndex()].name]"
- },
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "startIpAddress": {
- "value": "[parameters('firewallRules')[copyIndex()].startIpAddress]"
- },
- "endIpAddress": {
- "value": "[parameters('firewallRules')[copyIndex()].endIpAddress]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "9889972221731602451"
- },
- "name": "DBforMySQL Flexible Server Firewall Rules",
- "description": "This module deploys a DBforMySQL Flexible Server Firewall Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the MySQL flexible server Firewall Rule."
- }
- },
- "startIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "endIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent MySQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforMySQL/flexibleServers/firewallRules",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "endIpAddress": "[parameters('endIpAddress')]",
- "startIpAddress": "[parameters('startIpAddress')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed firewall rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed firewall rule."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers/firewallRules', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed firewall rule."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_administrators": {
- "copy": {
- "name": "flexibleServer_administrators",
- "count": "[length(parameters('administrators'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-MySQL-Administrators-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "login": {
- "value": "[parameters('administrators')[copyIndex()].login]"
- },
- "sid": {
- "value": "[parameters('administrators')[copyIndex()].sid]"
- },
- "identityResourceId": {
- "value": "[parameters('administrators')[copyIndex()].identityResourceId]"
- },
- "tenantId": "[if(contains(parameters('administrators')[copyIndex()], 'tenantId'), createObject('value', parameters('administrators')[copyIndex()].tenantId), createObject('value', tenant().tenantId))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8863151548145849170"
- },
- "name": "DBforMySQL Flexible Server Administrators",
- "description": "This module deploys a DBforMySQL Flexible Server Administrator.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent DBforMySQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "sid": {
- "type": "string",
- "metadata": {
- "description": "Required. SID (object ID) of the server administrator."
- }
- },
- "identityResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the identity used for AAD Authentication."
- }
- },
- "login": {
- "type": "string",
- "metadata": {
- "description": "Required. Login name of the server administrator."
- }
- },
- "tenantId": {
- "type": "string",
- "defaultValue": "[tenant().tenantId]",
- "metadata": {
- "description": "Optional. The tenantId of the Active Directory administrator."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforMySQL/flexibleServers/administrators",
- "apiVersion": "2022-01-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), 'ActiveDirectory')]",
- "properties": {
- "administratorType": "ActiveDirectory",
- "identityResourceId": "[parameters('identityResourceId')]",
- "login": "[parameters('login')]",
- "sid": "[parameters('sid')]",
- "tenantId": "[parameters('tenantId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed administrator."
- },
- "value": "ActiveDirectory"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed administrator."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers/administrators', parameters('flexibleServerName'), 'ActiveDirectory')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed administrator."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed MySQL Flexible server."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed MySQL Flexible server."
- },
- "value": "[resourceId('Microsoft.DBforMySQL/flexibleServers', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed MySQL Flexible server."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('flexibleServer', '2022-09-30-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep b/modules/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 60b6289226..0000000000
--- a/modules/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,57 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${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 = 'dfmsfsmin'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- administratorLogin: 'adminUserName'
- administratorLoginPassword: password
- skuName: 'Standard_B1ms'
- tier: 'Burstable'
- }
-}]
diff --git a/modules/db-for-my-sql/flexible-server/tests/e2e/private/dependencies.bicep b/modules/db-for-my-sql/flexible-server/tests/e2e/private/dependencies.bicep
deleted file mode 100644
index ca3c6ceec6..0000000000
--- a/modules/db-for-my-sql/flexible-server/tests/e2e/private/dependencies.bicep
+++ /dev/null
@@ -1,74 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- delegations: [
- {
- name: 'Microsoft.DBforMySQL.flexibleServers'
- properties: {
- serviceName: 'Microsoft.DBforMySQL/flexibleServers'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'private.mysql.database.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The name of the created Managed Identity.')
-output managedIdentityName string = managedIdentity.name
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep b/modules/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep
deleted file mode 100644
index 46a67b9445..0000000000
--- a/modules/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep
+++ /dev/null
@@ -1,144 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${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 = 'dfmsfspvt'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- location: resourceGroup.location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'MySQL Flexible Server'
- serverName: '${namePrefix}${serviceShort}001'
- }
- administratorLogin: 'adminUserName'
- administratorLoginPassword: password
- skuName: 'Standard_D2ds_v4'
- tier: 'GeneralPurpose'
- delegatedSubnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceId: nestedDependencies.outputs.privateDNSZoneResourceId
- storageAutoIoScaling: 'Enabled'
- storageSizeGB: 64
- storageIOPS: 400
- backupRetentionDays: 10
- databases: [
- {
-
- name: 'testdb1'
- }
- ]
- highAvailability: 'SameZone'
- storageAutoGrow: 'Enabled'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- administrators: [
- {
- identityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- login: nestedDependencies.outputs.managedIdentityName
- sid: nestedDependencies.outputs.managedIdentityPrincipalId
- }
- ]
- }
-}]
diff --git a/modules/db-for-my-sql/flexible-server/tests/e2e/public/dependencies1.bicep b/modules/db-for-my-sql/flexible-server/tests/e2e/public/dependencies1.bicep
deleted file mode 100644
index 82fbab799d..0000000000
--- a/modules/db-for-my-sql/flexible-server/tests/e2e/public/dependencies1.bicep
+++ /dev/null
@@ -1,46 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
diff --git a/modules/db-for-my-sql/flexible-server/tests/e2e/public/dependencies2.bicep b/modules/db-for-my-sql/flexible-server/tests/e2e/public/dependencies2.bicep
deleted file mode 100644
index 258d087ade..0000000000
--- a/modules/db-for-my-sql/flexible-server/tests/e2e/public/dependencies2.bicep
+++ /dev/null
@@ -1,120 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the geo backup Key Vault to create.')
-param geoBackupKeyVaultName string
-
-@description('Required. The name of the geo backup Managed Identity to create.')
-param geoBackupManagedIdentityName string
-
-@description('Required. The location to deploy geo backup resources to.')
-param geoBackupLocation string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2023-02-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true
- softDeleteRetentionInDays: 90
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2023-02-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource geoBackupManagedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: geoBackupManagedIdentityName
- location: geoBackupLocation
-}
-
-resource geoBackupKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' = {
- name: geoBackupKeyVaultName
- location: geoBackupLocation
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true
- softDeleteRetentionInDays: 90
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2023-02-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource geoBackupKeyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${geoBackupKeyVault::key.id}-${geoBackupLocation}-${geoBackupManagedIdentity.id}-Key-Reader-RoleAssignment')
- scope: geoBackupKeyVault::key
- properties: {
- principalId: geoBackupManagedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the created encryption key.')
-output keyName string = keyVault::key.name
-
-@description('The resource ID of the created geo backup Managed Identity.')
-output geoBackupManagedIdentityResourceId string = geoBackupManagedIdentity.id
-
-@description('The resource ID of the created geo backup Key Vault.')
-output geoBackupKeyVaultResourceId string = geoBackupKeyVault.id
-
-@description('The name of the created geo backup encryption key.')
-output geoBackupKeyName string = geoBackupKeyVault::key.name
diff --git a/modules/db-for-my-sql/flexible-server/tests/e2e/public/main.test.bicep b/modules/db-for-my-sql/flexible-server/tests/e2e/public/main.test.bicep
deleted file mode 100644
index 7f522933c1..0000000000
--- a/modules/db-for-my-sql/flexible-server/tests/e2e/public/main.test.bicep
+++ /dev/null
@@ -1,179 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${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 = 'dfmsfsp'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies1 'dependencies1.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies1'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- location: location
- managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-module nestedDependencies2 'dependencies2.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies2'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- geoBackupKeyVaultName: 'dep-${namePrefix}-kvp-${serviceShort}-${substring(uniqueString(baseTime), 0, 2)}'
- geoBackupManagedIdentityName: 'dep-${namePrefix}-msip-${serviceShort}'
- geoBackupLocation: nestedDependencies1.outputs.pairedRegionName
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- location: resourceGroup.location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies2.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'MySQL Flexible Server'
- serverName: '${namePrefix}${serviceShort}001'
- }
- administratorLogin: 'adminUserName'
- administratorLoginPassword: password
- skuName: 'Standard_D2ds_v4'
- tier: 'GeneralPurpose'
- storageAutoIoScaling: 'Enabled'
- storageSizeGB: 32
- storageIOPS: 400
- backupRetentionDays: 20
- availabilityZone: '1'
- databases: [
- {
-
- name: 'testdb1'
- }
- {
- name: 'testdb2'
- charset: 'ascii'
- collation: 'ascii_general_ci'
- }
- ]
- firewallRules: [
- {
- endIpAddress: '0.0.0.0'
- name: 'AllowAllWindowsAzureIps'
- startIpAddress: '0.0.0.0'
- }
- {
- endIpAddress: '10.10.10.10'
- name: 'test-rule1'
- startIpAddress: '10.10.10.1'
- }
- {
- endIpAddress: '100.100.100.10'
- name: 'test-rule2'
- startIpAddress: '100.100.100.1'
- }
- ]
- highAvailability: 'SameZone'
- storageAutoGrow: 'Enabled'
- version: '8.0.21'
- customerManagedKey: {
- keyName: nestedDependencies2.outputs.keyName
- keyVaultResourceId: nestedDependencies2.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies2.outputs.managedIdentityResourceId
- }
- geoRedundantBackup: 'Enabled'
- customerManagedKeyGeo: {
- keyName: nestedDependencies2.outputs.geoBackupKeyName
- keyVaultResourceId: nestedDependencies2.outputs.geoBackupKeyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies2.outputs.geoBackupManagedIdentityResourceId
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies2.outputs.managedIdentityResourceId
- nestedDependencies2.outputs.geoBackupManagedIdentityResourceId
- ]
- }
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- }
-}]
diff --git a/modules/db-for-my-sql/flexible-server/version.json b/modules/db-for-my-sql/flexible-server/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-my-sql/flexible-server/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-postgre-sql/flexible-server/MOVED-TO-AVM.md b/modules/db-for-postgre-sql/flexible-server/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/db-for-postgre-sql/flexible-server/README.md b/modules/db-for-postgre-sql/flexible-server/README.md
index 9fd7665d16..03646bb4cb 100644
--- a/modules/db-for-postgre-sql/flexible-server/README.md
+++ b/modules/db-for-postgre-sql/flexible-server/README.md
@@ -1,1143 +1,7 @@
-# DBforPostgreSQL Flexible Servers `[Microsoft.DBforPostgreSQL/flexibleServers]`
+
-
-
-
-### Example 2: _Private_
-
-
-
-
-
-### Example 3: _Public_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the PostgreSQL flexible server. |
-| [`skuName`](#parameter-skuname) | string | The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3. |
-| [`tier`](#parameter-tier) | string | The tier of the particular SKU. Tier must align with the "skuName" property. Example, tier cannot be "Burstable" if skuName is "Standard_D4s_v3". |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. Required if 'cMKKeyName' is not empty. |
-| [`pointInTimeUTC`](#parameter-pointintimeutc) | string | Required if "createMode" is set to "PointInTimeRestore". |
-| [`sourceServerResourceId`](#parameter-sourceserverresourceid) | string | Required if "createMode" is set to "PointInTimeRestore". |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`activeDirectoryAuth`](#parameter-activedirectoryauth) | string | If Enabled, Azure Active Directory authentication is enabled. |
-| [`administratorLogin`](#parameter-administratorlogin) | string | The administrator login name of a server. Can only be specified when the PostgreSQL server is being created. |
-| [`administratorLoginPassword`](#parameter-administratorloginpassword) | securestring | The administrator login password. |
-| [`administrators`](#parameter-administrators) | array | The Azure AD administrators when AAD authentication enabled. |
-| [`availabilityZone`](#parameter-availabilityzone) | string | Availability zone information of the server. Default will have no preference set. |
-| [`backupRetentionDays`](#parameter-backupretentiondays) | int | Backup retention days for the server. |
-| [`configurations`](#parameter-configurations) | array | The configurations to create in the server. |
-| [`createMode`](#parameter-createmode) | string | The mode to create a new PostgreSQL server. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`databases`](#parameter-databases) | array | The databases to create in the server. |
-| [`delegatedSubnetResourceId`](#parameter-delegatedsubnetresourceid) | string | Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`firewallRules`](#parameter-firewallrules) | array | The firewall rules to create in the PostgreSQL flexible server. |
-| [`geoRedundantBackup`](#parameter-georedundantbackup) | string | A value indicating whether Geo-Redundant backup is enabled on the server. Should be left disabled if 'cMKKeyName' is not empty. |
-| [`highAvailability`](#parameter-highavailability) | string | The mode for high availability. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`maintenanceWindow`](#parameter-maintenancewindow) | object | Properties for the maintenence window. If provided, "customWindow" property must exist and set to "Enabled". |
-| [`passwordAuth`](#parameter-passwordauth) | string | If Enabled, password authentication is enabled. |
-| [`privateDnsZoneArmResourceId`](#parameter-privatednszonearmresourceid) | string | Private dns zone arm resource ID. Used when the desired connectivity mode is "Private Access" and required when "delegatedSubnetResourceId" is used. The Private DNS Zone must be lined to the Virtual Network referenced in "delegatedSubnetResourceId". |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`storageSizeGB`](#parameter-storagesizegb) | int | Max storage allowed for a server. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`tenantId`](#parameter-tenantid) | string | Tenant id of the server. |
-| [`version`](#parameter-version) | string | PostgreSQL Server version. |
-
-### Parameter: `name`
-
-The name of the PostgreSQL flexible server.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `skuName`
-
-The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `tier`
-
-The tier of the particular SKU. Tier must align with the "skuName" property. Example, tier cannot be "Burstable" if skuName is "Standard_D4s_v3".
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Burstable'
- 'GeneralPurpose'
- 'MemoryOptimized'
- ]
- ```
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. Required if 'cMKKeyName' is not empty.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `pointInTimeUTC`
-
-Required if "createMode" is set to "PointInTimeRestore".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `sourceServerResourceId`
-
-Required if "createMode" is set to "PointInTimeRestore".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `activeDirectoryAuth`
-
-If Enabled, Azure Active Directory authentication is enabled.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `administratorLogin`
-
-The administrator login name of a server. Can only be specified when the PostgreSQL server is being created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `administratorLoginPassword`
-
-The administrator login password.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `administrators`
-
-The Azure AD administrators when AAD authentication enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `availabilityZone`
-
-Availability zone information of the server. Default will have no preference set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- '1'
- '2'
- '3'
- ]
- ```
-
-### Parameter: `backupRetentionDays`
-
-Backup retention days for the server.
-
-- Required: No
-- Type: int
-- Default: `7`
-
-### Parameter: `configurations`
-
-The configurations to create in the server.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `createMode`
-
-The mode to create a new PostgreSQL server.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Create'
- 'Default'
- 'PointInTimeRestore'
- 'Update'
- ]
- ```
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `databases`
-
-The databases to create in the server.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `delegatedSubnetResourceId`
-
-Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `firewallRules`
-
-The firewall rules to create in the PostgreSQL flexible server.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `geoRedundantBackup`
-
-A value indicating whether Geo-Redundant backup is enabled on the server. Should be left disabled if 'cMKKeyName' is not empty.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `highAvailability`
-
-The mode for high availability.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'SameZone'
- 'ZoneRedundant'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `maintenanceWindow`
-
-Properties for the maintenence window. If provided, "customWindow" property must exist and set to "Enabled".
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `passwordAuth`
-
-If Enabled, password authentication is enabled.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `privateDnsZoneArmResourceId`
-
-Private dns zone arm resource ID. Used when the desired connectivity mode is "Private Access" and required when "delegatedSubnetResourceId" is used. The Private DNS Zone must be lined to the Virtual Network referenced in "delegatedSubnetResourceId".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `storageSizeGB`
-
-Max storage allowed for a server.
-
-- Required: No
-- Type: int
-- Default: `32`
-- Allowed:
- ```Bicep
- [
- 32
- 64
- 128
- 256
- 512
- 1024
- 2048
- 4096
- 8192
- 16384
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `tenantId`
-
-Tenant id of the server.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `version`
-
-PostgreSQL Server version.
-
-- Required: No
-- Type: string
-- Default: `'15'`
-- Allowed:
- ```Bicep
- [
- '11'
- '12'
- '13'
- '14'
- '15'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the deployed PostgreSQL Flexible server. |
-| `resourceGroupName` | string | The resource group of the deployed PostgreSQL Flexible server. |
-| `resourceId` | string | The resource ID of the deployed PostgreSQL Flexible server. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/db-for-postgre-sql/flexible-server/administrator/README.md b/modules/db-for-postgre-sql/flexible-server/administrator/README.md
deleted file mode 100644
index c0f2f4352f..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/administrator/README.md
+++ /dev/null
@@ -1,114 +0,0 @@
-# DBforPostgreSQL Flexible Server Administrators `[Microsoft.DBforPostgreSQL/flexibleServers/administrators]`
-
-This module deploys a DBforPostgreSQL Flexible Server Administrator.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforPostgreSQL/flexibleServers/administrators` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/administrators) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`objectId`](#parameter-objectid) | string | The objectId of the Active Directory administrator. |
-| [`principalName`](#parameter-principalname) | string | Active Directory administrator principal name. |
-| [`principalType`](#parameter-principaltype) | string | The principal type used to represent the type of Active Directory Administrator. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`tenantId`](#parameter-tenantid) | string | The tenantId of the Active Directory administrator. |
-
-### Parameter: `objectId`
-
-The objectId of the Active Directory administrator.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `principalName`
-
-Active Directory administrator principal name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `principalType`
-
-The principal type used to represent the type of Active Directory Administrator.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Group'
- 'ServicePrincipal'
- 'Unknown'
- 'User'
- ]
- ```
-
-### Parameter: `flexibleServerName`
-
-The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `tenantId`
-
-The tenantId of the Active Directory administrator.
-
-- Required: No
-- Type: string
-- Default: `[tenant().tenantId]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed administrator. |
-| `resourceGroupName` | string | The resource group of the deployed administrator. |
-| `resourceId` | string | The resource ID of the deployed administrator. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-postgre-sql/flexible-server/administrator/main.bicep b/modules/db-for-postgre-sql/flexible-server/administrator/main.bicep
deleted file mode 100644
index 5e4b8a19f7..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/administrator/main.bicep
+++ /dev/null
@@ -1,65 +0,0 @@
-metadata name = 'DBforPostgreSQL Flexible Server Administrators'
-metadata description = 'This module deploys a DBforPostgreSQL Flexible Server Administrator.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Required. The objectId of the Active Directory administrator.')
-param objectId string
-
-@description('Required. Active Directory administrator principal name.')
-param principalName string
-
-@allowed([
- 'Group'
- 'ServicePrincipal'
- 'Unknown'
- 'User'
-])
-@description('Required. The principal type used to represent the type of Active Directory Administrator.')
-param principalType string
-
-@description('Optional. The tenantId of the Active Directory administrator.')
-param tenantId string = tenant().tenantId
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' existing = {
- name: flexibleServerName
-}
-
-resource administrator 'Microsoft.DBforPostgreSQL/flexibleServers/administrators@2022-12-01' = {
- name: objectId
- parent: flexibleServer
- properties: {
- principalName: principalName
- principalType: principalType
- tenantId: tenantId
- }
-}
-
-@description('The name of the deployed administrator.')
-output name string = administrator.name
-
-@description('The resource ID of the deployed administrator.')
-output resourceId string = administrator.id
-
-@description('The resource group of the deployed administrator.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-postgre-sql/flexible-server/administrator/main.json b/modules/db-for-postgre-sql/flexible-server/administrator/main.json
deleted file mode 100644
index 6ac911a9e5..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/administrator/main.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3514176123135146796"
- },
- "name": "DBforPostgreSQL Flexible Server Administrators",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Administrator.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "objectId": {
- "type": "string",
- "metadata": {
- "description": "Required. The objectId of the Active Directory administrator."
- }
- },
- "principalName": {
- "type": "string",
- "metadata": {
- "description": "Required. Active Directory administrator principal name."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Group",
- "ServicePrincipal",
- "Unknown",
- "User"
- ],
- "metadata": {
- "description": "Required. The principal type used to represent the type of Active Directory Administrator."
- }
- },
- "tenantId": {
- "type": "string",
- "defaultValue": "[tenant().tenantId]",
- "metadata": {
- "description": "Optional. The tenantId of the Active Directory administrator."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/administrators",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('objectId'))]",
- "properties": {
- "principalName": "[parameters('principalName')]",
- "principalType": "[parameters('principalType')]",
- "tenantId": "[parameters('tenantId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed administrator."
- },
- "value": "[parameters('objectId')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed administrator."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/administrators', parameters('flexibleServerName'), parameters('objectId'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed administrator."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-postgre-sql/flexible-server/administrator/version.json b/modules/db-for-postgre-sql/flexible-server/administrator/version.json
deleted file mode 100644
index 7fa401bdf7..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/administrator/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.1",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-postgre-sql/flexible-server/configuration/README.md b/modules/db-for-postgre-sql/flexible-server/configuration/README.md
deleted file mode 100644
index fc940f2120..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/configuration/README.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# DBforPostgreSQL Flexible Server Configurations `[Microsoft.DBforPostgreSQL/flexibleServers/configurations]`
-
-This module deploys a DBforPostgreSQL Flexible Server Configuration.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforPostgreSQL/flexibleServers/configurations` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/configurations) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the configuration. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`source`](#parameter-source) | string | Source of the configuration. |
-| [`value`](#parameter-value) | string | Value of the configuration. |
-
-### Parameter: `name`
-
-The name of the configuration.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `flexibleServerName`
-
-The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `source`
-
-Source of the configuration.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `value`
-
-Value of the configuration.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed configuration. |
-| `resourceGroupName` | string | The resource group of the deployed configuration. |
-| `resourceId` | string | The resource ID of the deployed configuration. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-postgre-sql/flexible-server/configuration/main.bicep b/modules/db-for-postgre-sql/flexible-server/configuration/main.bicep
deleted file mode 100644
index b85020fcf8..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/configuration/main.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-metadata name = 'DBforPostgreSQL Flexible Server Configurations'
-metadata description = 'This module deploys a DBforPostgreSQL Flexible Server Configuration.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the configuration.')
-param name string
-
-@description('Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Optional. Source of the configuration.')
-param source string = ''
-
-@description('Optional. Value of the configuration.')
-param value string = ''
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' existing = {
- name: flexibleServerName
-}
-
-resource configuration 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2022-12-01' = {
- name: name
- parent: flexibleServer
- properties: {
- source: !empty(source) ? source : null
- value: !empty(value) ? value : null
- }
-}
-
-@description('The name of the deployed configuration.')
-output name string = configuration.name
-
-@description('The resource ID of the deployed configuration.')
-output resourceId string = configuration.id
-
-@description('The resource group of the deployed configuration.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-postgre-sql/flexible-server/configuration/main.json b/modules/db-for-postgre-sql/flexible-server/configuration/main.json
deleted file mode 100644
index 54b8e1f4b7..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/configuration/main.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12961146168624492771"
- },
- "name": "DBforPostgreSQL Flexible Server Configurations",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the configuration."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "source": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Source of the configuration."
- }
- },
- "value": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Value of the configuration."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/configurations",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "source": "[if(not(empty(parameters('source'))), parameters('source'), null())]",
- "value": "[if(not(empty(parameters('value'))), parameters('value'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed configuration."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/configurations', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed configuration."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-postgre-sql/flexible-server/configuration/version.json b/modules/db-for-postgre-sql/flexible-server/configuration/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/configuration/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-postgre-sql/flexible-server/database/README.md b/modules/db-for-postgre-sql/flexible-server/database/README.md
deleted file mode 100644
index 7e2b9c3c0d..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/database/README.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# DBforPostgreSQL Flexible Server Databases `[Microsoft.DBforPostgreSQL/flexibleServers/databases]`
-
-This module deploys a DBforPostgreSQL Flexible Server Database.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforPostgreSQL/flexibleServers/databases` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/databases) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the database. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`charset`](#parameter-charset) | string | The charset of the database. |
-| [`collation`](#parameter-collation) | string | The collation of the database. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-
-### Parameter: `name`
-
-The name of the database.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `flexibleServerName`
-
-The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `charset`
-
-The charset of the database.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `collation`
-
-The collation of the database.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed database. |
-| `resourceGroupName` | string | The resource group of the deployed database. |
-| `resourceId` | string | The resource ID of the deployed database. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-postgre-sql/flexible-server/database/main.bicep b/modules/db-for-postgre-sql/flexible-server/database/main.bicep
deleted file mode 100644
index ec2c185504..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/database/main.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-metadata name = 'DBforPostgreSQL Flexible Server Databases'
-metadata description = 'This module deploys a DBforPostgreSQL Flexible Server Database.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the database.')
-param name string
-
-@description('Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Optional. The collation of the database.')
-param collation string = ''
-
-@description('Optional. The charset of the database.')
-param charset string = ''
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' existing = {
- name: flexibleServerName
-}
-
-resource database 'Microsoft.DBforPostgreSQL/flexibleServers/databases@2022-12-01' = {
- name: name
- parent: flexibleServer
- properties: {
- collation: !empty(collation) ? collation : null
- charset: !empty(charset) ? charset : null
- }
-}
-
-@description('The name of the deployed database.')
-output name string = database.name
-
-@description('The resource ID of the deployed database.')
-output resourceId string = database.id
-
-@description('The resource group of the deployed database.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-postgre-sql/flexible-server/database/main.json b/modules/db-for-postgre-sql/flexible-server/database/main.json
deleted file mode 100644
index bc43485c4f..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/database/main.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15866259518448635553"
- },
- "name": "DBforPostgreSQL Flexible Server Databases",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Database.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the database."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "collation": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The collation of the database."
- }
- },
- "charset": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The charset of the database."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/databases",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "collation": "[if(not(empty(parameters('collation'))), parameters('collation'), null())]",
- "charset": "[if(not(empty(parameters('charset'))), parameters('charset'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed database."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/databases', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed database."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-postgre-sql/flexible-server/database/version.json b/modules/db-for-postgre-sql/flexible-server/database/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/database/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-postgre-sql/flexible-server/firewall-rule/README.md b/modules/db-for-postgre-sql/flexible-server/firewall-rule/README.md
deleted file mode 100644
index db3b0df266..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/firewall-rule/README.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# DBforPostgreSQL Flexible Server Firewall Rules `[Microsoft.DBforPostgreSQL/flexibleServers/firewallRules]`
-
-This module deploys a DBforPostgreSQL Flexible Server Firewall Rule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DBforPostgreSQL/flexibleServers/firewallRules` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/firewallRules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`endIpAddress`](#parameter-endipaddress) | string | The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. |
-| [`name`](#parameter-name) | string | The name of the PostgreSQL flexible server Firewall Rule. |
-| [`startIpAddress`](#parameter-startipaddress) | string | The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`flexibleServerName`](#parameter-flexibleservername) | string | The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `endIpAddress`
-
-The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the PostgreSQL flexible server Firewall Rule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `startIpAddress`
-
-The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `flexibleServerName`
-
-The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the deployed firewall rule. |
-| `resourceGroupName` | string | The resource group of the deployed firewall rule. |
-| `resourceId` | string | The resource ID of the deployed firewall rule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/db-for-postgre-sql/flexible-server/firewall-rule/main.bicep b/modules/db-for-postgre-sql/flexible-server/firewall-rule/main.bicep
deleted file mode 100644
index 5618c9d038..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/firewall-rule/main.bicep
+++ /dev/null
@@ -1,52 +0,0 @@
-metadata name = 'DBforPostgreSQL Flexible Server Firewall Rules'
-metadata description = 'This module deploys a DBforPostgreSQL Flexible Server Firewall Rule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the PostgreSQL flexible server Firewall Rule.')
-param name string
-
-@description('Required. The start IP address of the firewall rule. Must be IPv4 format. Use value \'0.0.0.0\' for all Azure-internal IP addresses.')
-param startIpAddress string
-
-@description('Required. The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value \'0.0.0.0\' for all Azure-internal IP addresses.')
-param endIpAddress string
-
-@description('Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment.')
-param flexibleServerName string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' existing = {
- name: flexibleServerName
-}
-
-resource firewallRule 'Microsoft.DBforPostgreSQL/flexibleServers/firewallRules@2022-12-01' = {
- name: name
- parent: flexibleServer
- properties: {
- endIpAddress: endIpAddress
- startIpAddress: startIpAddress
- }
-}
-
-@description('The name of the deployed firewall rule.')
-output name string = firewallRule.name
-
-@description('The resource ID of the deployed firewall rule.')
-output resourceId string = firewallRule.id
-
-@description('The resource group of the deployed firewall rule.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/db-for-postgre-sql/flexible-server/firewall-rule/main.json b/modules/db-for-postgre-sql/flexible-server/firewall-rule/main.json
deleted file mode 100644
index 79c31b0bfb..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/firewall-rule/main.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13418631602887252631"
- },
- "name": "DBforPostgreSQL Flexible Server Firewall Rules",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Firewall Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the PostgreSQL flexible server Firewall Rule."
- }
- },
- "startIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "endIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "endIpAddress": "[parameters('endIpAddress')]",
- "startIpAddress": "[parameters('startIpAddress')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed firewall rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed firewall rule."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/firewallRules', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed firewall rule."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-postgre-sql/flexible-server/firewall-rule/version.json b/modules/db-for-postgre-sql/flexible-server/firewall-rule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/firewall-rule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/db-for-postgre-sql/flexible-server/main.bicep b/modules/db-for-postgre-sql/flexible-server/main.bicep
deleted file mode 100644
index c6d1b75d5c..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/main.bicep
+++ /dev/null
@@ -1,454 +0,0 @@
-metadata name = 'DBforPostgreSQL Flexible Servers'
-metadata description = 'This module deploys a DBforPostgreSQL Flexible Server.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the PostgreSQL flexible server.')
-param name string
-
-@description('Optional. The administrator login name of a server. Can only be specified when the PostgreSQL server is being created.')
-param administratorLogin string = ''
-
-@description('Optional. The administrator login password.')
-@secure()
-param administratorLoginPassword string = ''
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. If Enabled, Azure Active Directory authentication is enabled.')
-param activeDirectoryAuth string = 'Enabled'
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. If Enabled, password authentication is enabled.')
-#disable-next-line secure-secrets-in-params
-param passwordAuth string = 'Disabled'
-
-@description('Optional. Tenant id of the server.')
-param tenantId string = ''
-
-@description('Optional. The Azure AD administrators when AAD authentication enabled.')
-param administrators array = []
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.')
-param skuName string
-
-@allowed([
- 'GeneralPurpose'
- 'Burstable'
- 'MemoryOptimized'
-])
-@description('Required. The tier of the particular SKU. Tier must align with the "skuName" property. Example, tier cannot be "Burstable" if skuName is "Standard_D4s_v3".')
-param tier string
-
-@allowed([
- ''
- '1'
- '2'
- '3'
-])
-@description('Optional. Availability zone information of the server. Default will have no preference set.')
-param availabilityZone string = ''
-
-@minValue(7)
-@maxValue(35)
-@description('Optional. Backup retention days for the server.')
-param backupRetentionDays int = 7
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. A value indicating whether Geo-Redundant backup is enabled on the server. Should be left disabled if \'cMKKeyName\' is not empty.')
-param geoRedundantBackup string = 'Disabled'
-
-@allowed([
- 32
- 64
- 128
- 256
- 512
- 1024
- 2048
- 4096
- 8192
- 16384
-])
-@description('Optional. Max storage allowed for a server.')
-param storageSizeGB int = 32
-
-@allowed([
- '11'
- '12'
- '13'
- '14'
- '15'
-])
-@description('Optional. PostgreSQL Server version.')
-param version string = '15'
-
-@allowed([
- 'Disabled'
- 'SameZone'
- 'ZoneRedundant'
-])
-@description('Optional. The mode for high availability.')
-param highAvailability string = 'Disabled'
-
-@allowed([
- 'Create'
- 'Default'
- 'PointInTimeRestore'
- 'Update'
-])
-@description('Optional. The mode to create a new PostgreSQL server.')
-param createMode string = 'Default'
-
-@description('Conditional. The managed identity definition for this resource. Required if \'cMKKeyName\' is not empty.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. Properties for the maintenence window. If provided, "customWindow" property must exist and set to "Enabled".')
-param maintenanceWindow object = {}
-
-@description('Conditional. Required if "createMode" is set to "PointInTimeRestore".')
-param pointInTimeUTC string = ''
-
-@description('Conditional. Required if "createMode" is set to "PointInTimeRestore".')
-param sourceServerResourceId string = ''
-
-@description('Optional. Delegated subnet arm resource ID. Used when the desired connectivity mode is "Private Access" - virtual network integration.')
-param delegatedSubnetResourceId string = ''
-
-@description('Optional. Private dns zone arm resource ID. Used when the desired connectivity mode is "Private Access" and required when "delegatedSubnetResourceId" is used. The Private DNS Zone must be lined to the Virtual Network referenced in "delegatedSubnetResourceId".')
-param privateDnsZoneArmResourceId string = ''
-
-@description('Optional. The firewall rules to create in the PostgreSQL flexible server.')
-param firewallRules array = []
-
-@description('Optional. The databases to create in the server.')
-param databases array = []
-
-@description('Optional. The configurations to create in the server.')
-param configurations array = []
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: !empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' = {
- name: name
- location: location
- tags: tags
- sku: {
- name: skuName
- tier: tier
- }
- identity: identity
- properties: {
- administratorLogin: !empty(administratorLogin) ? administratorLogin : null
- administratorLoginPassword: !empty(administratorLoginPassword) ? administratorLoginPassword : null
- authConfig: {
- activeDirectoryAuth: activeDirectoryAuth
- passwordAuth: passwordAuth
- tenantId: !empty(tenantId) ? tenantId : null
- }
- availabilityZone: availabilityZone
- backup: {
- backupRetentionDays: backupRetentionDays
- geoRedundantBackup: geoRedundantBackup
- }
- createMode: createMode
- dataEncryption: !empty(customerManagedKey) ? {
- primaryKeyURI: !empty(customerManagedKey.?keyVersion ?? '') ? '${cMKKeyVault::cMKKey.properties.keyUri}/${customerManagedKey!.keyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- primaryUserAssignedIdentityId: cMKUserAssignedIdentity.id
- type: 'AzureKeyVault'
- } : null
- highAvailability: {
- mode: highAvailability
- standbyAvailabilityZone: highAvailability == 'SameZone' ? availabilityZone : null
- }
- maintenanceWindow: !empty(maintenanceWindow) ? {
- customWindow: maintenanceWindow.customWindow
- dayOfWeek: maintenanceWindow.customWindow == 'Enabled' ? maintenanceWindow.dayOfWeek : 0
- startHour: maintenanceWindow.customWindow == 'Enabled' ? maintenanceWindow.startHour : 0
- startMinute: maintenanceWindow.customWindow == 'Enabled' ? maintenanceWindow.startMinute : 0
- } : null
- network: !empty(delegatedSubnetResourceId) && empty(firewallRules) ? {
- delegatedSubnetResourceId: delegatedSubnetResourceId
- privateDnsZoneArmResourceId: privateDnsZoneArmResourceId
- } : null
- pointInTimeUTC: createMode == 'PointInTimeRestore' ? pointInTimeUTC : null
- sourceServerResourceId: createMode == 'PointInTimeRestore' ? sourceServerResourceId : null
- storage: {
- storageSizeGB: storageSizeGB
- }
- version: version
- }
-}
-
-resource flexibleServer_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: flexibleServer
-}
-
-resource flexibleServer_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(flexibleServer.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: flexibleServer
-}]
-
-module flexibleServer_databases 'database/main.bicep' = [for (database, index) in databases: {
- name: '${uniqueString(deployment().name, location)}-PostgreSQL-DB-${index}'
- params: {
- name: database.name
- flexibleServerName: flexibleServer.name
- collation: contains(database, 'collation') ? database.collation : ''
- charset: contains(database, 'charset') ? database.charset : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module flexibleServer_firewallRules 'firewall-rule/main.bicep' = [for (firewallRule, index) in firewallRules: {
- name: '${uniqueString(deployment().name, location)}-PostgreSQL-FirewallRules-${index}'
- params: {
- name: firewallRule.name
- flexibleServerName: flexibleServer.name
- startIpAddress: firewallRule.startIpAddress
- endIpAddress: firewallRule.endIpAddress
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- flexibleServer_databases
- ]
-}]
-
-@batchSize(1)
-module flexibleServer_configurations 'configuration/main.bicep' = [for (configuration, index) in configurations: {
- name: '${uniqueString(deployment().name, location)}-PostgreSQL-Configurations-${index}'
- params: {
- name: configuration.name
- flexibleServerName: flexibleServer.name
- source: contains(configuration, 'source') ? configuration.source : ''
- value: contains(configuration, 'value') ? configuration.value : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
- dependsOn: [
- flexibleServer_firewallRules
- ]
-}]
-
-module flexibleServer_administrators 'administrator/main.bicep' = [for (administrator, index) in administrators: {
- name: '${uniqueString(deployment().name, location)}-PostgreSQL-Administrators-${index}'
- params: {
- flexibleServerName: flexibleServer.name
- objectId: administrator.objectId
- principalName: administrator.principalName
- principalType: administrator.principalType
- tenantId: contains(administrator, 'tenantId') ? administrator.tenantId : tenant().tenantId
- }
-}]
-
-resource flexibleServer_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: flexibleServer
-}]
-
-@description('The name of the deployed PostgreSQL Flexible server.')
-output name string = flexibleServer.name
-
-@description('The resource ID of the deployed PostgreSQL Flexible server.')
-output resourceId string = flexibleServer.id
-
-@description('The resource group of the deployed PostgreSQL Flexible server.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = flexibleServer.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Required. User assigned identity to use when fetching the customer managed key.')
- userAssignedIdentityResourceId: string
-}?
diff --git a/modules/db-for-postgre-sql/flexible-server/main.json b/modules/db-for-postgre-sql/flexible-server/main.json
deleted file mode 100644
index 25dcb199a2..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/main.json
+++ /dev/null
@@ -1,1277 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10058986332950368920"
- },
- "name": "DBforPostgreSQL Flexible Servers",
- "description": "This module deploys a DBforPostgreSQL Flexible Server.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. User assigned identity to use when fetching the customer managed key."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the PostgreSQL flexible server."
- }
- },
- "administratorLogin": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The administrator login name of a server. Can only be specified when the PostgreSQL server is being created."
- }
- },
- "administratorLoginPassword": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The administrator login password."
- }
- },
- "activeDirectoryAuth": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. If Enabled, Azure Active Directory authentication is enabled."
- }
- },
- "passwordAuth": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. If Enabled, password authentication is enabled."
- }
- },
- "tenantId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Tenant id of the server."
- }
- },
- "administrators": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The Azure AD administrators when AAD authentication enabled."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "skuName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3."
- }
- },
- "tier": {
- "type": "string",
- "allowedValues": [
- "GeneralPurpose",
- "Burstable",
- "MemoryOptimized"
- ],
- "metadata": {
- "description": "Required. The tier of the particular SKU. Tier must align with the \"skuName\" property. Example, tier cannot be \"Burstable\" if skuName is \"Standard_D4s_v3\"."
- }
- },
- "availabilityZone": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "1",
- "2",
- "3"
- ],
- "metadata": {
- "description": "Optional. Availability zone information of the server. Default will have no preference set."
- }
- },
- "backupRetentionDays": {
- "type": "int",
- "defaultValue": 7,
- "minValue": 7,
- "maxValue": 35,
- "metadata": {
- "description": "Optional. Backup retention days for the server."
- }
- },
- "geoRedundantBackup": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. A value indicating whether Geo-Redundant backup is enabled on the server. Should be left disabled if 'cMKKeyName' is not empty."
- }
- },
- "storageSizeGB": {
- "type": "int",
- "defaultValue": 32,
- "allowedValues": [
- 32,
- 64,
- 128,
- 256,
- 512,
- 1024,
- 2048,
- 4096,
- 8192,
- 16384
- ],
- "metadata": {
- "description": "Optional. Max storage allowed for a server."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "15",
- "allowedValues": [
- "11",
- "12",
- "13",
- "14",
- "15"
- ],
- "metadata": {
- "description": "Optional. PostgreSQL Server version."
- }
- },
- "highAvailability": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "SameZone",
- "ZoneRedundant"
- ],
- "metadata": {
- "description": "Optional. The mode for high availability."
- }
- },
- "createMode": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Create",
- "Default",
- "PointInTimeRestore",
- "Update"
- ],
- "metadata": {
- "description": "Optional. The mode to create a new PostgreSQL server."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Conditional. The managed identity definition for this resource. Required if 'cMKKeyName' is not empty."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "maintenanceWindow": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Properties for the maintenence window. If provided, \"customWindow\" property must exist and set to \"Enabled\"."
- }
- },
- "pointInTimeUTC": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Required if \"createMode\" is set to \"PointInTimeRestore\"."
- }
- },
- "sourceServerResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Required if \"createMode\" is set to \"PointInTimeRestore\"."
- }
- },
- "delegatedSubnetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Delegated subnet arm resource ID. Used when the desired connectivity mode is \"Private Access\" - virtual network integration."
- }
- },
- "privateDnsZoneArmResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Private dns zone arm resource ID. Used when the desired connectivity mode is \"Private Access\" and required when \"delegatedSubnetResourceId\" is used. The Private DNS Zone must be lined to the Virtual Network referenced in \"delegatedSubnetResourceId\"."
- }
- },
- "firewallRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The firewall rules to create in the PostgreSQL flexible server."
- }
- },
- "databases": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The databases to create in the server."
- }
- },
- "configurations": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The configurations to create in the server."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null()), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "flexibleServer": {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers",
- "apiVersion": "2022-12-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('skuName')]",
- "tier": "[parameters('tier')]"
- },
- "identity": "[variables('identity')]",
- "properties": {
- "administratorLogin": "[if(not(empty(parameters('administratorLogin'))), parameters('administratorLogin'), null())]",
- "administratorLoginPassword": "[if(not(empty(parameters('administratorLoginPassword'))), parameters('administratorLoginPassword'), null())]",
- "authConfig": {
- "activeDirectoryAuth": "[parameters('activeDirectoryAuth')]",
- "passwordAuth": "[parameters('passwordAuth')]",
- "tenantId": "[if(not(empty(parameters('tenantId'))), parameters('tenantId'), null())]"
- },
- "availabilityZone": "[parameters('availabilityZone')]",
- "backup": {
- "backupRetentionDays": "[parameters('backupRetentionDays')]",
- "geoRedundantBackup": "[parameters('geoRedundantBackup')]"
- },
- "createMode": "[parameters('createMode')]",
- "dataEncryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('primaryKeyURI', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('customerManagedKey').keyVersion), reference('cMKKeyVault::cMKKey').keyUriWithVersion), 'primaryUserAssignedIdentityId', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))), 'type', 'AzureKeyVault'), null())]",
- "highAvailability": {
- "mode": "[parameters('highAvailability')]",
- "standbyAvailabilityZone": "[if(equals(parameters('highAvailability'), 'SameZone'), parameters('availabilityZone'), null())]"
- },
- "maintenanceWindow": "[if(not(empty(parameters('maintenanceWindow'))), createObject('customWindow', parameters('maintenanceWindow').customWindow, 'dayOfWeek', if(equals(parameters('maintenanceWindow').customWindow, 'Enabled'), parameters('maintenanceWindow').dayOfWeek, 0), 'startHour', if(equals(parameters('maintenanceWindow').customWindow, 'Enabled'), parameters('maintenanceWindow').startHour, 0), 'startMinute', if(equals(parameters('maintenanceWindow').customWindow, 'Enabled'), parameters('maintenanceWindow').startMinute, 0)), null())]",
- "network": "[if(and(not(empty(parameters('delegatedSubnetResourceId'))), empty(parameters('firewallRules'))), createObject('delegatedSubnetResourceId', parameters('delegatedSubnetResourceId'), 'privateDnsZoneArmResourceId', parameters('privateDnsZoneArmResourceId')), null())]",
- "pointInTimeUTC": "[if(equals(parameters('createMode'), 'PointInTimeRestore'), parameters('pointInTimeUTC'), null())]",
- "sourceServerResourceId": "[if(equals(parameters('createMode'), 'PointInTimeRestore'), parameters('sourceServerResourceId'), null())]",
- "storage": {
- "storageSizeGB": "[parameters('storageSizeGB')]"
- },
- "version": "[parameters('version')]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "flexibleServer_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DBforPostgreSQL/flexibleServers/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_roleAssignments": {
- "copy": {
- "name": "flexibleServer_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DBforPostgreSQL/flexibleServers/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DBforPostgreSQL/flexibleServers', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_diagnosticSettings": {
- "copy": {
- "name": "flexibleServer_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DBforPostgreSQL/flexibleServers/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_databases": {
- "copy": {
- "name": "flexibleServer_databases",
- "count": "[length(parameters('databases'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PostgreSQL-DB-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('databases')[copyIndex()].name]"
- },
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "collation": "[if(contains(parameters('databases')[copyIndex()], 'collation'), createObject('value', parameters('databases')[copyIndex()].collation), createObject('value', ''))]",
- "charset": "[if(contains(parameters('databases')[copyIndex()], 'charset'), createObject('value', parameters('databases')[copyIndex()].charset), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16111012435403700897"
- },
- "name": "DBforPostgreSQL Flexible Server Databases",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Database.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the database."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "collation": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The collation of the database."
- }
- },
- "charset": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The charset of the database."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/databases",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "collation": "[if(not(empty(parameters('collation'))), parameters('collation'), null())]",
- "charset": "[if(not(empty(parameters('charset'))), parameters('charset'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed database."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/databases', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed database."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer"
- ]
- },
- "flexibleServer_firewallRules": {
- "copy": {
- "name": "flexibleServer_firewallRules",
- "count": "[length(parameters('firewallRules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PostgreSQL-FirewallRules-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('firewallRules')[copyIndex()].name]"
- },
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "startIpAddress": {
- "value": "[parameters('firewallRules')[copyIndex()].startIpAddress]"
- },
- "endIpAddress": {
- "value": "[parameters('firewallRules')[copyIndex()].endIpAddress]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "12680201884935036782"
- },
- "name": "DBforPostgreSQL Flexible Server Firewall Rules",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Firewall Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the PostgreSQL flexible server Firewall Rule."
- }
- },
- "startIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "endIpAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "endIpAddress": "[parameters('endIpAddress')]",
- "startIpAddress": "[parameters('startIpAddress')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed firewall rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed firewall rule."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/firewallRules', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed firewall rule."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer",
- "flexibleServer_databases"
- ]
- },
- "flexibleServer_configurations": {
- "copy": {
- "name": "flexibleServer_configurations",
- "count": "[length(parameters('configurations'))]",
- "mode": "serial",
- "batchSize": 1
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PostgreSQL-Configurations-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('configurations')[copyIndex()].name]"
- },
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "source": "[if(contains(parameters('configurations')[copyIndex()], 'source'), createObject('value', parameters('configurations')[copyIndex()].source), createObject('value', ''))]",
- "value": "[if(contains(parameters('configurations')[copyIndex()], 'value'), createObject('value', parameters('configurations')[copyIndex()].value), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16469307943232243904"
- },
- "name": "DBforPostgreSQL Flexible Server Configurations",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the configuration."
- }
- },
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "source": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Source of the configuration."
- }
- },
- "value": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Value of the configuration."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/configurations",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
- "properties": {
- "source": "[if(not(empty(parameters('source'))), parameters('source'), null())]",
- "value": "[if(not(empty(parameters('value'))), parameters('value'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed configuration."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/configurations', parameters('flexibleServerName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed configuration."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer",
- "flexibleServer_firewallRules"
- ]
- },
- "flexibleServer_administrators": {
- "copy": {
- "name": "flexibleServer_administrators",
- "count": "[length(parameters('administrators'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PostgreSQL-Administrators-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "flexibleServerName": {
- "value": "[parameters('name')]"
- },
- "objectId": {
- "value": "[parameters('administrators')[copyIndex()].objectId]"
- },
- "principalName": {
- "value": "[parameters('administrators')[copyIndex()].principalName]"
- },
- "principalType": {
- "value": "[parameters('administrators')[copyIndex()].principalType]"
- },
- "tenantId": "[if(contains(parameters('administrators')[copyIndex()], 'tenantId'), createObject('value', parameters('administrators')[copyIndex()].tenantId), createObject('value', tenant().tenantId))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13863840477045657155"
- },
- "name": "DBforPostgreSQL Flexible Server Administrators",
- "description": "This module deploys a DBforPostgreSQL Flexible Server Administrator.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "flexibleServerName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent PostgreSQL flexible server. Required if the template is used in a standalone deployment."
- }
- },
- "objectId": {
- "type": "string",
- "metadata": {
- "description": "Required. The objectId of the Active Directory administrator."
- }
- },
- "principalName": {
- "type": "string",
- "metadata": {
- "description": "Required. Active Directory administrator principal name."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Group",
- "ServicePrincipal",
- "Unknown",
- "User"
- ],
- "metadata": {
- "description": "Required. The principal type used to represent the type of Active Directory Administrator."
- }
- },
- "tenantId": {
- "type": "string",
- "defaultValue": "[tenant().tenantId]",
- "metadata": {
- "description": "Optional. The tenantId of the Active Directory administrator."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DBforPostgreSQL/flexibleServers/administrators",
- "apiVersion": "2022-12-01",
- "name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('objectId'))]",
- "properties": {
- "principalName": "[parameters('principalName')]",
- "principalType": "[parameters('principalType')]",
- "tenantId": "[parameters('tenantId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed administrator."
- },
- "value": "[parameters('objectId')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed administrator."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers/administrators', parameters('flexibleServerName'), parameters('objectId'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed administrator."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "flexibleServer"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the deployed PostgreSQL Flexible server."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed PostgreSQL Flexible server."
- },
- "value": "[resourceId('Microsoft.DBforPostgreSQL/flexibleServers', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group of the deployed PostgreSQL Flexible server."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('flexibleServer', '2022-12-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep b/modules/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index f3177dd795..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,57 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${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 = 'dfpsfsmin'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- administratorLogin: 'adminUserName'
- administratorLoginPassword: password
- skuName: 'Standard_B2s'
- tier: 'Burstable'
- }
-}]
diff --git a/modules/db-for-postgre-sql/flexible-server/tests/e2e/private/dependencies.bicep b/modules/db-for-postgre-sql/flexible-server/tests/e2e/private/dependencies.bicep
deleted file mode 100644
index 45875179d8..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/tests/e2e/private/dependencies.bicep
+++ /dev/null
@@ -1,68 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- delegations: [
- {
- name: 'Microsoft.DBforPostgreSQL.flexibleServers'
- properties: {
- serviceName: 'Microsoft.DBforPostgreSQL/flexibleServers'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: '${split(virtualNetworkName, '-')[1]}.postgres.database.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep b/modules/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep
deleted file mode 100644
index fcc65d67d8..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep
+++ /dev/null
@@ -1,121 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${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 = 'dfpsfspvt'
-
-@description('Optional. The password to leverage for the login.')
-@secure()
-param password string = newGuid()
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- administratorLogin: 'adminUserName'
- administratorLoginPassword: password
- skuName: 'Standard_D2s_v3'
- tier: 'GeneralPurpose'
- configurations: [
- {
- name: 'log_min_messages'
- source: 'user-override'
- value: 'INFO'
- }
- {
- name: 'autovacuum_naptime'
- source: 'user-override'
- value: '80'
- }
- ]
- databases: [
- {
- charset: 'UTF8'
- collation: 'en_US.utf8'
- name: 'testdb1'
- }
- {
- name: 'testdb2'
- }
- ]
- delegatedSubnetResourceId: nestedDependencies.outputs.subnetResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- geoRedundantBackup: 'Enabled'
- privateDnsZoneArmResourceId: nestedDependencies.outputs.privateDNSZoneResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/db-for-postgre-sql/flexible-server/tests/e2e/public/dependencies.bicep b/modules/db-for-postgre-sql/flexible-server/tests/e2e/public/dependencies.bicep
deleted file mode 100644
index e54b2767fc..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/tests/e2e/public/dependencies.bicep
+++ /dev/null
@@ -1,64 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The client ID of the created Managed Identity.')
-output managedIdentityClientId string = managedIdentity.properties.clientId
-
-@description('The name of the created Managed Identity.')
-output managedIdentityName string = managedIdentity.name
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the created encryption key.')
-output keyName string = keyVault::key.name
diff --git a/modules/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep b/modules/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep
deleted file mode 100644
index 26bda3bd05..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep
+++ /dev/null
@@ -1,152 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${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 = 'dfpsfsp'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- administrators: [
- {
- objectId: nestedDependencies.outputs.managedIdentityClientId
- principalName: nestedDependencies.outputs.managedIdentityName
- principalType: 'ServicePrincipal'
- }
- ]
- skuName: 'Standard_D2s_v3'
- tier: 'GeneralPurpose'
- availabilityZone: '1'
- backupRetentionDays: 20
- configurations: [
- {
- name: 'log_min_messages'
- source: 'user-override'
- value: 'INFO'
- }
- ]
- databases: [
- {
- charset: 'UTF8'
- collation: 'en_US.utf8'
- name: 'testdb1'
- }
- {
- name: 'testdb2'
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- firewallRules: [
- {
- endIpAddress: '0.0.0.0'
- name: 'AllowAllWindowsAzureIps'
- startIpAddress: '0.0.0.0'
- }
- {
- endIpAddress: '10.10.10.10'
- name: 'test-rule1'
- startIpAddress: '10.10.10.1'
- }
- {
- endIpAddress: '100.100.100.10'
- name: 'test-rule2'
- startIpAddress: '100.100.100.1'
- }
- ]
- geoRedundantBackup: 'Disabled'
- highAvailability: 'SameZone'
- location: location
- storageSizeGB: 1024
- version: '14'
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/db-for-postgre-sql/flexible-server/version.json b/modules/db-for-postgre-sql/flexible-server/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/db-for-postgre-sql/flexible-server/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/desktop-virtualization/application-group/README.md b/modules/desktop-virtualization/application-group/README.md
index 2a1f26658b..a9870f4842 100644
--- a/modules/desktop-virtualization/application-group/README.md
+++ b/modules/desktop-virtualization/application-group/README.md
@@ -1,743 +1,7 @@
-# Azure Virtual Desktop (AVD) Application Groups `[Microsoft.DesktopVirtualization/applicationGroups]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationGroupType`](#parameter-applicationgrouptype) | string | The type of the Application Group to be created. Allowed values: RemoteApp or Desktop. |
-| [`hostpoolName`](#parameter-hostpoolname) | string | Name of the Host Pool to be linked to this Application Group. |
-| [`name`](#parameter-name) | string | Name of the Application Group to create this application in. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applications`](#parameter-applications) | array | List of applications to be created in the Application Group. |
-| [`description`](#parameter-description) | string | The description of the Application Group to be created. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`friendlyName`](#parameter-friendlyname) | string | The friendly name of the Application Group to be created. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `applicationGroupType`
-
-The type of the Application Group to be created. Allowed values: RemoteApp or Desktop.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Desktop'
- 'RemoteApp'
- ]
- ```
-
-### Parameter: `hostpoolName`
-
-Name of the Host Pool to be linked to this Application Group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the Application Group to create this application in.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `applications`
-
-List of applications to be created in the Application Group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-The description of the Application Group to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `friendlyName`
-
-The friendly name of the Application Group to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the AVD application group. |
-| `resourceGroupName` | string | The resource group the AVD application group was deployed into. |
-| `resourceId` | string | The resource ID of the AVD application group. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/desktop-virtualization/application-group/application/README.md b/modules/desktop-virtualization/application-group/application/README.md
deleted file mode 100644
index 816f676251..0000000000
--- a/modules/desktop-virtualization/application-group/application/README.md
+++ /dev/null
@@ -1,149 +0,0 @@
-# Azure Virtual Desktop (AVD) Application Group Applications `[Microsoft.DesktopVirtualization/applicationGroups/applications]`
-
-This module deploys an Azure Virtual Desktop (AVD) Application Group Application.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DesktopVirtualization/applicationGroups/applications` | [2022-09-09](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DesktopVirtualization/2022-09-09/applicationGroups/applications) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`filePath`](#parameter-filepath) | string | Specifies a path for the executable file for the application. |
-| [`friendlyName`](#parameter-friendlyname) | string | Friendly name of Application.. |
-| [`name`](#parameter-name) | string | Name of the Application to be created in the Application Group. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`appGroupName`](#parameter-appgroupname) | string | The name of the parent Application Group to create the application(s) in. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`commandLineArguments`](#parameter-commandlinearguments) | string | Command-Line Arguments for Application. |
-| [`commandLineSetting`](#parameter-commandlinesetting) | string | Specifies whether this published application can be launched with command-line arguments provided by the client, command-line arguments specified at publish time, or no command-line arguments at all. |
-| [`description`](#parameter-description) | string | Description of Application.. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`iconIndex`](#parameter-iconindex) | int | Index of the icon. |
-| [`iconPath`](#parameter-iconpath) | string | Path to icon. |
-| [`showInPortal`](#parameter-showinportal) | bool | Specifies whether to show the RemoteApp program in the RD Web Access server. |
-
-### Parameter: `filePath`
-
-Specifies a path for the executable file for the application.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `friendlyName`
-
-Friendly name of Application..
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the Application to be created in the Application Group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `appGroupName`
-
-The name of the parent Application Group to create the application(s) in. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `commandLineArguments`
-
-Command-Line Arguments for Application.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `commandLineSetting`
-
-Specifies whether this published application can be launched with command-line arguments provided by the client, command-line arguments specified at publish time, or no command-line arguments at all.
-
-- Required: No
-- Type: string
-- Default: `'DoNotAllow'`
-- Allowed:
- ```Bicep
- [
- 'Allow'
- 'DoNotAllow'
- 'Require'
- ]
- ```
-
-### Parameter: `description`
-
-Description of Application..
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `iconIndex`
-
-Index of the icon.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `iconPath`
-
-Path to icon.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `showInPortal`
-
-Specifies whether to show the RemoteApp program in the RD Web Access server.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The Name of the Application Group to register the Application in. |
-| `resourceGroupName` | string | The name of the Resource Group the AVD Application was created in. |
-| `resourceId` | string | The resource ID of the deployed Application. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/desktop-virtualization/application-group/application/main.bicep b/modules/desktop-virtualization/application-group/application/main.bicep
deleted file mode 100644
index 92b4c090d2..0000000000
--- a/modules/desktop-virtualization/application-group/application/main.bicep
+++ /dev/null
@@ -1,81 +0,0 @@
-metadata name = 'Azure Virtual Desktop (AVD) Application Group Applications'
-metadata description = 'This module deploys an Azure Virtual Desktop (AVD) Application Group Application.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent Application Group to create the application(s) in. Required if the template is used in a standalone deployment.')
-param appGroupName string
-
-@sys.description('Required. Name of the Application to be created in the Application Group.')
-param name string
-
-@sys.description('Optional. Description of Application..')
-param description string = ''
-
-@sys.description('Required. Friendly name of Application..')
-param friendlyName string
-
-@sys.description('Required. Specifies a path for the executable file for the application.')
-param filePath string
-
-@allowed([
- 'Allow'
- 'DoNotAllow'
- 'Require'
-])
-@sys.description('Optional. Specifies whether this published application can be launched with command-line arguments provided by the client, command-line arguments specified at publish time, or no command-line arguments at all.')
-param commandLineSetting string = 'DoNotAllow'
-
-@sys.description('Optional. Command-Line Arguments for Application.')
-param commandLineArguments string = ''
-
-@sys.description('Optional. Specifies whether to show the RemoteApp program in the RD Web Access server.')
-param showInPortal bool = false
-
-@sys.description('Optional. Path to icon.')
-param iconPath string = ''
-
-@sys.description('Optional. Index of the icon.')
-param iconIndex int = 0
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource applicationGroup 'Microsoft.DesktopVirtualization/applicationGroups@2022-09-09' existing = {
- name: appGroupName
-}
-
-resource application 'Microsoft.DesktopVirtualization/applicationGroups/applications@2022-09-09' = {
- name: name
- parent: applicationGroup
- properties: {
- description: description
- friendlyName: friendlyName
- filePath: filePath
- commandLineSetting: commandLineSetting
- commandLineArguments: commandLineArguments
- showInPortal: showInPortal
- iconPath: iconPath
- iconIndex: iconIndex
- }
-}
-
-@sys.description('The resource ID of the deployed Application.')
-output resourceId string = application.id
-
-@sys.description('The name of the Resource Group the AVD Application was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The Name of the Application Group to register the Application in.')
-output name string = appGroupName
diff --git a/modules/desktop-virtualization/application-group/application/main.json b/modules/desktop-virtualization/application-group/application/main.json
deleted file mode 100644
index 70e339a8b2..0000000000
--- a/modules/desktop-virtualization/application-group/application/main.json
+++ /dev/null
@@ -1,148 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10616827856455579307"
- },
- "name": "Azure Virtual Desktop (AVD) Application Group Applications",
- "description": "This module deploys an Azure Virtual Desktop (AVD) Application Group Application.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "appGroupName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Application Group to create the application(s) in. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Application to be created in the Application Group."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of Application.."
- }
- },
- "friendlyName": {
- "type": "string",
- "metadata": {
- "description": "Required. Friendly name of Application.."
- }
- },
- "filePath": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies a path for the executable file for the application."
- }
- },
- "commandLineSetting": {
- "type": "string",
- "defaultValue": "DoNotAllow",
- "allowedValues": [
- "Allow",
- "DoNotAllow",
- "Require"
- ],
- "metadata": {
- "description": "Optional. Specifies whether this published application can be launched with command-line arguments provided by the client, command-line arguments specified at publish time, or no command-line arguments at all."
- }
- },
- "commandLineArguments": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Command-Line Arguments for Application."
- }
- },
- "showInPortal": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether to show the RemoteApp program in the RD Web Access server."
- }
- },
- "iconPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Path to icon."
- }
- },
- "iconIndex": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Index of the icon."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DesktopVirtualization/applicationGroups/applications",
- "apiVersion": "2022-09-09",
- "name": "[format('{0}/{1}', parameters('appGroupName'), parameters('name'))]",
- "properties": {
- "description": "[parameters('description')]",
- "friendlyName": "[parameters('friendlyName')]",
- "filePath": "[parameters('filePath')]",
- "commandLineSetting": "[parameters('commandLineSetting')]",
- "commandLineArguments": "[parameters('commandLineArguments')]",
- "showInPortal": "[parameters('showInPortal')]",
- "iconPath": "[parameters('iconPath')]",
- "iconIndex": "[parameters('iconIndex')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed Application."
- },
- "value": "[resourceId('Microsoft.DesktopVirtualization/applicationGroups/applications', parameters('appGroupName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the AVD Application was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the Application Group to register the Application in."
- },
- "value": "[parameters('appGroupName')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/desktop-virtualization/application-group/application/version.json b/modules/desktop-virtualization/application-group/application/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/desktop-virtualization/application-group/application/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/desktop-virtualization/application-group/main.bicep b/modules/desktop-virtualization/application-group/main.bicep
deleted file mode 100644
index 55bd2d0ee3..0000000000
--- a/modules/desktop-virtualization/application-group/main.bicep
+++ /dev/null
@@ -1,234 +0,0 @@
-metadata name = 'Azure Virtual Desktop (AVD) Application Groups'
-metadata description = 'This module deploys an Azure Virtual Desktop (AVD) Application Group.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. Name of the Application Group to create this application in.')
-@minLength(1)
-param name string
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Required. The type of the Application Group to be created. Allowed values: RemoteApp or Desktop.')
-@allowed([
- 'RemoteApp'
- 'Desktop'
-])
-param applicationGroupType string
-
-@sys.description('Required. Name of the Host Pool to be linked to this Application Group.')
-param hostpoolName string
-
-@sys.description('Optional. The friendly name of the Application Group to be created.')
-param friendlyName string = ''
-
-@sys.description('Optional. The description of the Application Group to be created.')
-param description string = ''
-
-@sys.description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@sys.description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@sys.description('Optional. The lock settings of the service.')
-param lock lockType
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. List of applications to be created in the Application Group.')
-param applications array = []
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- 'Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Desktop Virtualization Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')
- 'Desktop Virtualization Application Group Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')
- 'Desktop Virtualization Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')
- 'Desktop Virtualization Host Pool Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')
- 'Desktop Virtualization Host Pool Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')
- 'Desktop Virtualization Power On Off Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')
- 'Desktop Virtualization Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')
- 'Desktop Virtualization Session Host Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')
- 'Desktop Virtualization User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')
- 'Desktop Virtualization User Session Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')
- 'Desktop Virtualization Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')
- 'Desktop Virtualization Workspace Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')
- 'Desktop Virtualization Workspace Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource appGroup_hostpool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' existing = {
- name: hostpoolName
-}
-
-resource appGroup 'Microsoft.DesktopVirtualization/applicationGroups@2022-09-09' = {
- name: name
- location: location
- tags: tags
- properties: {
- hostPoolArmPath: appGroup_hostpool.id
- friendlyName: friendlyName
- description: description
- applicationGroupType: applicationGroupType
- }
-}
-
-resource appGroup_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: appGroup
-}
-
-resource appGroup_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: appGroup
-}]
-
-module appGroup_applications 'application/main.bicep' = [for (application, index) in applications: {
- name: '${uniqueString(deployment().name, location)}-AppGroup-App-${index}'
- params: {
- name: application.name
- appGroupName: appGroup.name
- description: contains(application, 'description') ? application.description : ''
- friendlyName: contains(application, 'friendlyName') ? application.friendlyName : appGroup.name
- filePath: application.filePath
- commandLineSetting: contains(application, 'commandLineSetting') ? application.commandLineSetting : 'DoNotAllow'
- commandLineArguments: contains(application, 'commandLineArguments') ? application.commandLineArguments : ''
- showInPortal: contains(application, 'showInPortal') ? application.showInPortal : false
- iconPath: contains(application, 'iconPath') ? application.iconPath : application.filePath
- iconIndex: contains(application, 'iconIndex') ? application.iconIndex : 0
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource appGroup_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(appGroup.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: appGroup
-}]
-
-@sys.description('The resource ID of the AVD application group.')
-output resourceId string = appGroup.id
-
-@sys.description('The resource group the AVD application group was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The name of the AVD application group.')
-output name string = appGroup.name
-
-@sys.description('The location the resource was deployed into.')
-output location string = appGroup.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @sys.description('Optional. Specify the name of lock.')
- name: string?
-
- @sys.description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @sys.description('Optional. The name of diagnostic setting.')
- name: string?
-
- @sys.description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @sys.description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @sys.description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @sys.description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @sys.description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @sys.description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @sys.description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/desktop-virtualization/application-group/main.json b/modules/desktop-virtualization/application-group/main.json
deleted file mode 100644
index f94e06adf4..0000000000
--- a/modules/desktop-virtualization/application-group/main.json
+++ /dev/null
@@ -1,618 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "1467950374107623921"
- },
- "name": "Azure Virtual Desktop (AVD) Application Groups",
- "description": "This module deploys an Azure Virtual Desktop (AVD) Application Group.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Required. Name of the Application Group to create this application in."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "applicationGroupType": {
- "type": "string",
- "allowedValues": [
- "RemoteApp",
- "Desktop"
- ],
- "metadata": {
- "description": "Required. The type of the Application Group to be created. Allowed values: RemoteApp or Desktop."
- }
- },
- "hostpoolName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Host Pool to be linked to this Application Group."
- }
- },
- "friendlyName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The friendly name of the Application Group to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the Application Group to be created."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "applications": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of applications to be created in the Application Group."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Desktop Virtualization Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')]",
- "Desktop Virtualization Application Group Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')]",
- "Desktop Virtualization Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')]",
- "Desktop Virtualization Host Pool Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')]",
- "Desktop Virtualization Host Pool Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')]",
- "Desktop Virtualization Power On Off Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')]",
- "Desktop Virtualization Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')]",
- "Desktop Virtualization Session Host Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')]",
- "Desktop Virtualization User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')]",
- "Desktop Virtualization User Session Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')]",
- "Desktop Virtualization Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')]",
- "Desktop Virtualization Workspace Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')]",
- "Desktop Virtualization Workspace Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "appGroup_hostpool": {
- "existing": true,
- "type": "Microsoft.DesktopVirtualization/hostPools",
- "apiVersion": "2022-09-09",
- "name": "[parameters('hostpoolName')]"
- },
- "appGroup": {
- "type": "Microsoft.DesktopVirtualization/applicationGroups",
- "apiVersion": "2022-09-09",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "hostPoolArmPath": "[resourceId('Microsoft.DesktopVirtualization/hostPools', parameters('hostpoolName'))]",
- "friendlyName": "[parameters('friendlyName')]",
- "description": "[parameters('description')]",
- "applicationGroupType": "[parameters('applicationGroupType')]"
- },
- "dependsOn": [
- "appGroup_hostpool"
- ]
- },
- "appGroup_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DesktopVirtualization/applicationGroups/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "appGroup"
- ]
- },
- "appGroup_diagnosticSettings": {
- "copy": {
- "name": "appGroup_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DesktopVirtualization/applicationGroups/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "appGroup"
- ]
- },
- "appGroup_roleAssignments": {
- "copy": {
- "name": "appGroup_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DesktopVirtualization/applicationGroups/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DesktopVirtualization/applicationGroups', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "appGroup"
- ]
- },
- "appGroup_applications": {
- "copy": {
- "name": "appGroup_applications",
- "count": "[length(parameters('applications'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AppGroup-App-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('applications')[copyIndex()].name]"
- },
- "appGroupName": {
- "value": "[parameters('name')]"
- },
- "description": "[if(contains(parameters('applications')[copyIndex()], 'description'), createObject('value', parameters('applications')[copyIndex()].description), createObject('value', ''))]",
- "friendlyName": "[if(contains(parameters('applications')[copyIndex()], 'friendlyName'), createObject('value', parameters('applications')[copyIndex()].friendlyName), createObject('value', parameters('name')))]",
- "filePath": {
- "value": "[parameters('applications')[copyIndex()].filePath]"
- },
- "commandLineSetting": "[if(contains(parameters('applications')[copyIndex()], 'commandLineSetting'), createObject('value', parameters('applications')[copyIndex()].commandLineSetting), createObject('value', 'DoNotAllow'))]",
- "commandLineArguments": "[if(contains(parameters('applications')[copyIndex()], 'commandLineArguments'), createObject('value', parameters('applications')[copyIndex()].commandLineArguments), createObject('value', ''))]",
- "showInPortal": "[if(contains(parameters('applications')[copyIndex()], 'showInPortal'), createObject('value', parameters('applications')[copyIndex()].showInPortal), createObject('value', false()))]",
- "iconPath": "[if(contains(parameters('applications')[copyIndex()], 'iconPath'), createObject('value', parameters('applications')[copyIndex()].iconPath), createObject('value', parameters('applications')[copyIndex()].filePath))]",
- "iconIndex": "[if(contains(parameters('applications')[copyIndex()], 'iconIndex'), createObject('value', parameters('applications')[copyIndex()].iconIndex), createObject('value', 0))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14264026920797711856"
- },
- "name": "Azure Virtual Desktop (AVD) Application Group Applications",
- "description": "This module deploys an Azure Virtual Desktop (AVD) Application Group Application.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "appGroupName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Application Group to create the application(s) in. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Application to be created in the Application Group."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of Application.."
- }
- },
- "friendlyName": {
- "type": "string",
- "metadata": {
- "description": "Required. Friendly name of Application.."
- }
- },
- "filePath": {
- "type": "string",
- "metadata": {
- "description": "Required. Specifies a path for the executable file for the application."
- }
- },
- "commandLineSetting": {
- "type": "string",
- "defaultValue": "DoNotAllow",
- "allowedValues": [
- "Allow",
- "DoNotAllow",
- "Require"
- ],
- "metadata": {
- "description": "Optional. Specifies whether this published application can be launched with command-line arguments provided by the client, command-line arguments specified at publish time, or no command-line arguments at all."
- }
- },
- "commandLineArguments": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Command-Line Arguments for Application."
- }
- },
- "showInPortal": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Specifies whether to show the RemoteApp program in the RD Web Access server."
- }
- },
- "iconPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Path to icon."
- }
- },
- "iconIndex": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Index of the icon."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DesktopVirtualization/applicationGroups/applications",
- "apiVersion": "2022-09-09",
- "name": "[format('{0}/{1}', parameters('appGroupName'), parameters('name'))]",
- "properties": {
- "description": "[parameters('description')]",
- "friendlyName": "[parameters('friendlyName')]",
- "filePath": "[parameters('filePath')]",
- "commandLineSetting": "[parameters('commandLineSetting')]",
- "commandLineArguments": "[parameters('commandLineArguments')]",
- "showInPortal": "[parameters('showInPortal')]",
- "iconPath": "[parameters('iconPath')]",
- "iconIndex": "[parameters('iconIndex')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed Application."
- },
- "value": "[resourceId('Microsoft.DesktopVirtualization/applicationGroups/applications', parameters('appGroupName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the AVD Application was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the Application Group to register the Application in."
- },
- "value": "[parameters('appGroupName')]"
- }
- }
- }
- },
- "dependsOn": [
- "appGroup"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the AVD application group."
- },
- "value": "[resourceId('Microsoft.DesktopVirtualization/applicationGroups', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the AVD application group was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the AVD application group."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('appGroup', '2022-09-09', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/desktop-virtualization/application-group/tests/e2e/defaults/dependencies.bicep b/modules/desktop-virtualization/application-group/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index c97eeab034..0000000000
--- a/modules/desktop-virtualization/application-group/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,18 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Host Pool to create.')
-param hostPoolName string
-
-resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' = {
- name: hostPoolName
- location: location
- properties: {
- hostPoolType: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- preferredAppGroupType: 'Desktop'
- }
-}
-
-@description('The name of the created Host Pool.')
-output hostPoolName string = hostPool.name
diff --git a/modules/desktop-virtualization/application-group/tests/e2e/defaults/main.test.bicep b/modules/desktop-virtualization/application-group/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 54746b0764..0000000000
--- a/modules/desktop-virtualization/application-group/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,59 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.applicationgroups-${serviceShort}-rg'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
-param serviceShort string = 'dvagmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- hostPoolName: 'dep-${namePrefix}-hp-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- applicationGroupType: 'RemoteApp'
- hostpoolName: nestedDependencies.outputs.hostPoolName
- }
-}]
diff --git a/modules/desktop-virtualization/application-group/tests/e2e/max/dependencies.bicep b/modules/desktop-virtualization/application-group/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 41ca94022b..0000000000
--- a/modules/desktop-virtualization/application-group/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,29 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Host Pool to create.')
-param hostPoolName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' = {
- name: hostPoolName
- location: location
- properties: {
- hostPoolType: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- preferredAppGroupType: 'Desktop'
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The name of the created Host Pool.')
-output hostPoolName string = hostPool.name
diff --git a/modules/desktop-virtualization/application-group/tests/e2e/max/main.test.bicep b/modules/desktop-virtualization/application-group/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 3529748317..0000000000
--- a/modules/desktop-virtualization/application-group/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,130 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.applicationgroups-${serviceShort}-rg'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
-param serviceShort string = 'dvagmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- hostPoolName: 'dep-${namePrefix}-hp-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- applicationGroupType: 'RemoteApp'
- hostpoolName: nestedDependencies.outputs.hostPoolName
- applications: [
- {
- commandLineArguments: ''
- commandLineSetting: 'DoNotAllow'
- description: 'Notepad by ARM template'
- filePath: 'C:\\Windows\\System32\\notepad.exe'
- friendlyName: 'Notepad'
- iconIndex: 0
- iconPath: 'C:\\Windows\\System32\\notepad.exe'
- name: 'notepad'
- showInPortal: true
- }
- {
- filePath: 'C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe'
- friendlyName: 'Wordpad'
- name: 'wordpad'
- }
- ]
- description: 'This is my first Remote Applications bundle'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- friendlyName: 'Remote Applications 1'
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/desktop-virtualization/application-group/tests/e2e/waf-aligned/dependencies.bicep b/modules/desktop-virtualization/application-group/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 41ca94022b..0000000000
--- a/modules/desktop-virtualization/application-group/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,29 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Host Pool to create.')
-param hostPoolName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' = {
- name: hostPoolName
- location: location
- properties: {
- hostPoolType: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- preferredAppGroupType: 'Desktop'
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The name of the created Host Pool.')
-output hostPoolName string = hostPool.name
diff --git a/modules/desktop-virtualization/application-group/tests/e2e/waf-aligned/main.test.bicep b/modules/desktop-virtualization/application-group/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 8bfb658ff8..0000000000
--- a/modules/desktop-virtualization/application-group/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,113 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.applicationgroups-${serviceShort}-rg'
-
-@description('Optional. The location to deploy resources to.')
-param location string = deployment().location
-
-@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
-param serviceShort string = 'dvagwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- hostPoolName: 'dep-${namePrefix}-hp-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- applicationGroupType: 'RemoteApp'
- hostpoolName: nestedDependencies.outputs.hostPoolName
- applications: [
- {
- commandLineArguments: ''
- commandLineSetting: 'DoNotAllow'
- description: 'Notepad by ARM template'
- filePath: 'C:\\Windows\\System32\\notepad.exe'
- friendlyName: 'Notepad'
- iconIndex: 0
- iconPath: 'C:\\Windows\\System32\\notepad.exe'
- name: 'notepad'
- showInPortal: true
- }
- {
- filePath: 'C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe'
- friendlyName: 'Wordpad'
- name: 'wordpad'
- }
- ]
- description: 'This is my first Remote Applications bundle'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- friendlyName: 'Remote Applications 1'
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/desktop-virtualization/application-group/version.json b/modules/desktop-virtualization/application-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/desktop-virtualization/application-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/desktop-virtualization/host-pool/README.md b/modules/desktop-virtualization/host-pool/README.md
index 38c5d530d4..18d08b6806 100644
--- a/modules/desktop-virtualization/host-pool/README.md
+++ b/modules/desktop-virtualization/host-pool/README.md
@@ -1,1075 +1,7 @@
-# Azure Virtual Desktop (AVD) Host Pools `[Microsoft.DesktopVirtualization/hostPools]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Host Pool. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`agentUpdate`](#parameter-agentupdate) | object | The session host configuration for updating agent, monitoring agent, and stack component. |
-| [`agentUpdateMaintenanceWindowDayOfWeek`](#parameter-agentupdatemaintenancewindowdayofweek) | string | Update day for scheduled agent updates. |
-| [`agentUpdateMaintenanceWindowHour`](#parameter-agentupdatemaintenancewindowhour) | int | Update hour for scheduled agent updates. |
-| [`agentUpdateMaintenanceWindows`](#parameter-agentupdatemaintenancewindows) | array | List of maintenance windows for scheduled agent updates. |
-| [`agentUpdateMaintenanceWindowTimeZone`](#parameter-agentupdatemaintenancewindowtimezone) | string | Time zone for scheduled agent updates. |
-| [`agentUpdateType`](#parameter-agentupdatetype) | string | Enable scheduled agent updates, Default means agent updates will automatically be installed by AVD when they become available. |
-| [`agentUpdateUseSessionHostLocalTime`](#parameter-agentupdateusesessionhostlocaltime) | bool | Whether to use localTime of the virtual machine for scheduled agent updates. |
-| [`customRdpProperty`](#parameter-customrdpproperty) | string | Host Pool RDP properties. |
-| [`description`](#parameter-description) | string | The description of the Host Pool to be created. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`friendlyName`](#parameter-friendlyname) | string | The friendly name of the Host Pool to be created. |
-| [`loadBalancerType`](#parameter-loadbalancertype) | string | Type of load balancer algorithm. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`maxSessionLimit`](#parameter-maxsessionlimit) | int | Maximum number of sessions. |
-| [`personalDesktopAssignmentType`](#parameter-personaldesktopassignmenttype) | string | Set the type of assignment for a Personal Host Pool type. |
-| [`preferredAppGroupType`](#parameter-preferredappgrouptype) | string | The type of preferred application group type, default to Desktop Application Group. |
-| [`ring`](#parameter-ring) | int | The ring number of HostPool. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`ssoadfsAuthority`](#parameter-ssoadfsauthority) | string | URL to customer ADFS server for signing WVD SSO certificates. |
-| [`ssoClientId`](#parameter-ssoclientid) | string | ClientId for the registered Relying Party used to issue WVD SSO certificates. |
-| [`ssoClientSecretKeyVaultPath`](#parameter-ssoclientsecretkeyvaultpath) | string | Path to Azure KeyVault storing the secret used for communication to ADFS. |
-| [`ssoSecretType`](#parameter-ssosecrettype) | string | The type of single sign on Secret Type. |
-| [`startVMOnConnect`](#parameter-startvmonconnect) | bool | Enable Start VM on connect to allow users to start the virtual machine from a deallocated state. Important: Custom RBAC role required to power manage VMs. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`tokenValidityLength`](#parameter-tokenvaliditylength) | string | Host Pool token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the token will be valid for 8 hours. |
-| [`type`](#parameter-type) | string | Set this parameter to Personal if you would like to enable Persistent Desktop experience. Defaults to Pooled. |
-| [`validationEnvironment`](#parameter-validationenvironment) | bool | Validation host pools allows you to test service changes before they are deployed to production. When set to true, the Host Pool will be deployed in a validation 'ring' (environment) that receives all the new features (might be less stable). Defaults to false that stands for the stable, production-ready environment. |
-| [`vmTemplate`](#parameter-vmtemplate) | object | The necessary information for adding more VMs to this Host Pool. The object is converted to an in-line string when handed over to the resource deployment, since that only takes strings. |
-
-**Generated parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`baseTime`](#parameter-basetime) | string | Do not provide a value! This date value is used to generate a registration token. |
-
-### Parameter: `name`
-
-Name of the Host Pool.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `agentUpdate`
-
-The session host configuration for updating agent, monitoring agent, and stack component.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- maintenanceWindows: '[parameters(\'agentUpdateMaintenanceWindows\')]'
- maintenanceWindowTimeZone: '[parameters(\'agentUpdateMaintenanceWindowTimeZone\')]'
- type: '[parameters(\'agentUpdateType\')]'
- useSessionHostLocalTime: '[parameters(\'agentUpdateUseSessionHostLocalTime\')]'
- }
- ```
-
-### Parameter: `agentUpdateMaintenanceWindowDayOfWeek`
-
-Update day for scheduled agent updates.
-
-- Required: No
-- Type: string
-- Default: `'Sunday'`
-- Allowed:
- ```Bicep
- [
- 'Friday'
- 'Monday'
- 'Saturday'
- 'Sunday'
- 'Thursday'
- 'Tuesday'
- 'Wednesday'
- ]
- ```
-
-### Parameter: `agentUpdateMaintenanceWindowHour`
-
-Update hour for scheduled agent updates.
-
-- Required: No
-- Type: int
-- Default: `22`
-
-### Parameter: `agentUpdateMaintenanceWindows`
-
-List of maintenance windows for scheduled agent updates.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- {
- dayOfWeek: '[parameters(\'agentUpdateMaintenanceWindowDayOfWeek\')]'
- hour: '[parameters(\'agentUpdateMaintenanceWindowHour\')]'
- }
- ]
- ```
-
-### Parameter: `agentUpdateMaintenanceWindowTimeZone`
-
-Time zone for scheduled agent updates.
-
-- Required: No
-- Type: string
-- Default: `'Central Standard Time'`
-
-### Parameter: `agentUpdateType`
-
-Enable scheduled agent updates, Default means agent updates will automatically be installed by AVD when they become available.
-
-- Required: No
-- Type: string
-- Default: `'Default'`
-- Allowed:
- ```Bicep
- [
- 'Default'
- 'Scheduled'
- ]
- ```
-
-### Parameter: `agentUpdateUseSessionHostLocalTime`
-
-Whether to use localTime of the virtual machine for scheduled agent updates.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `customRdpProperty`
-
-Host Pool RDP properties.
-
-- Required: No
-- Type: string
-- Default: `'audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;'`
-
-### Parameter: `description`
-
-The description of the Host Pool to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `friendlyName`
-
-The friendly name of the Host Pool to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `loadBalancerType`
-
-Type of load balancer algorithm.
-
-- Required: No
-- Type: string
-- Default: `'BreadthFirst'`
-- Allowed:
- ```Bicep
- [
- 'BreadthFirst'
- 'DepthFirst'
- 'Persistent'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `maxSessionLimit`
-
-Maximum number of sessions.
-
-- Required: No
-- Type: int
-- Default: `99999`
-
-### Parameter: `personalDesktopAssignmentType`
-
-Set the type of assignment for a Personal Host Pool type.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Automatic'
- 'Direct'
- ]
- ```
-
-### Parameter: `preferredAppGroupType`
-
-The type of preferred application group type, default to Desktop Application Group.
-
-- Required: No
-- Type: string
-- Default: `'Desktop'`
-- Allowed:
- ```Bicep
- [
- 'Desktop'
- 'None'
- 'RailApplications'
- ]
- ```
-
-### Parameter: `ring`
-
-The ring number of HostPool.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `ssoadfsAuthority`
-
-URL to customer ADFS server for signing WVD SSO certificates.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `ssoClientId`
-
-ClientId for the registered Relying Party used to issue WVD SSO certificates.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `ssoClientSecretKeyVaultPath`
-
-Path to Azure KeyVault storing the secret used for communication to ADFS.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `ssoSecretType`
-
-The type of single sign on Secret Type.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Certificate'
- 'CertificateInKeyVault'
- 'SharedKey'
- 'SharedKeyInKeyVault'
- ]
- ```
-
-### Parameter: `startVMOnConnect`
-
-Enable Start VM on connect to allow users to start the virtual machine from a deallocated state. Important: Custom RBAC role required to power manage VMs.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `tokenValidityLength`
-
-Host Pool token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the token will be valid for 8 hours.
-
-- Required: No
-- Type: string
-- Default: `'PT8H'`
-
-### Parameter: `type`
-
-Set this parameter to Personal if you would like to enable Persistent Desktop experience. Defaults to Pooled.
-
-- Required: No
-- Type: string
-- Default: `'Pooled'`
-- Allowed:
- ```Bicep
- [
- 'Personal'
- 'Pooled'
- ]
- ```
-
-### Parameter: `validationEnvironment`
-
-Validation host pools allows you to test service changes before they are deployed to production. When set to true, the Host Pool will be deployed in a validation 'ring' (environment) that receives all the new features (might be less stable). Defaults to false that stands for the stable, production-ready environment.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `vmTemplate`
-
-The necessary information for adding more VMs to this Host Pool. The object is converted to an in-line string when handed over to the resource deployment, since that only takes strings.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `baseTime`
-
-Do not provide a value! This date value is used to generate a registration token.
-
-- Required: No
-- Type: string
-- Default: `[utcNow('u')]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the AVD host pool. |
-| `resourceGroupName` | string | The resource group the AVD host pool was deployed into. |
-| `resourceId` | string | The resource ID of the AVD host pool. |
-| `tokenExpirationTime` | string | The expiration time for the registration token. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/desktop-virtualization/host-pool/main.bicep b/modules/desktop-virtualization/host-pool/main.bicep
deleted file mode 100644
index 1af44b1e15..0000000000
--- a/modules/desktop-virtualization/host-pool/main.bicep
+++ /dev/null
@@ -1,343 +0,0 @@
-metadata name = 'Azure Virtual Desktop (AVD) Host Pools'
-metadata description = 'This module deploys an Azure Virtual Desktop (AVD) Host Pool.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. Name of the Host Pool.')
-@minLength(1)
-param name string
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. The friendly name of the Host Pool to be created.')
-param friendlyName string = ''
-
-@sys.description('Optional. The description of the Host Pool to be created.')
-param description string = ''
-
-@sys.description('Optional. Set this parameter to Personal if you would like to enable Persistent Desktop experience. Defaults to Pooled.')
-@allowed([
- 'Personal'
- 'Pooled'
-])
-param type string = 'Pooled'
-
-@sys.description('Optional. Set the type of assignment for a Personal Host Pool type.')
-@allowed([
- 'Automatic'
- 'Direct'
- ''
-])
-param personalDesktopAssignmentType string = ''
-
-@sys.description('Optional. Type of load balancer algorithm.')
-@allowed([
- 'BreadthFirst'
- 'DepthFirst'
- 'Persistent'
-])
-param loadBalancerType string = 'BreadthFirst'
-
-@sys.description('Optional. Maximum number of sessions.')
-param maxSessionLimit int = 99999
-
-@sys.description('Optional. Host Pool RDP properties.')
-param customRdpProperty string = 'audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;'
-
-@sys.description('Optional. Validation host pools allows you to test service changes before they are deployed to production. When set to true, the Host Pool will be deployed in a validation \'ring\' (environment) that receives all the new features (might be less stable). Defaults to false that stands for the stable, production-ready environment.')
-param validationEnvironment bool = false
-
-@sys.description('Optional. The necessary information for adding more VMs to this Host Pool. The object is converted to an in-line string when handed over to the resource deployment, since that only takes strings.')
-param vmTemplate object = {}
-
-@sys.description('Optional. Host Pool token validity length. Usage: \'PT8H\' - valid for 8 hours; \'P5D\' - valid for 5 days; \'P1Y\' - valid for 1 year. When not provided, the token will be valid for 8 hours.')
-param tokenValidityLength string = 'PT8H'
-
-@sys.description('Generated. Do not provide a value! This date value is used to generate a registration token.')
-param baseTime string = utcNow('u')
-
-@sys.description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@sys.description('Optional. The lock settings of the service.')
-param lock lockType
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. The type of preferred application group type, default to Desktop Application Group.')
-@allowed([
- 'Desktop'
- 'None'
- 'RailApplications'
-])
-param preferredAppGroupType string = 'Desktop'
-
-@sys.description('Optional. Enable Start VM on connect to allow users to start the virtual machine from a deallocated state. Important: Custom RBAC role required to power manage VMs.')
-param startVMOnConnect bool = false
-
-@sys.description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@sys.description('Optional. Enable scheduled agent updates, Default means agent updates will automatically be installed by AVD when they become available.')
-@allowed([
- 'Default'
- 'Scheduled'
-])
-param agentUpdateType string = 'Default'
-
-@sys.description('Optional. Update hour for scheduled agent updates.')
-@minValue(1)
-@maxValue(23)
-param agentUpdateMaintenanceWindowHour int = 22
-
-@sys.description('Optional. Update day for scheduled agent updates.')
-@allowed([
- 'Sunday'
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- 'Saturday'
-])
-param agentUpdateMaintenanceWindowDayOfWeek string = 'Sunday'
-
-@sys.description('Optional. List of maintenance windows for scheduled agent updates.')
-param agentUpdateMaintenanceWindows array = [
- {
- hour: agentUpdateMaintenanceWindowHour
- dayOfWeek: agentUpdateMaintenanceWindowDayOfWeek
- }
-]
-
-@sys.description('Optional. Time zone for scheduled agent updates.')
-param agentUpdateMaintenanceWindowTimeZone string = 'Central Standard Time'
-
-@sys.description('Optional. Whether to use localTime of the virtual machine for scheduled agent updates.')
-param agentUpdateUseSessionHostLocalTime bool = false
-
-@sys.description('Optional. The session host configuration for updating agent, monitoring agent, and stack component.')
-param agentUpdate object = {
- type: agentUpdateType
- maintenanceWindows: agentUpdateMaintenanceWindows
- maintenanceWindowTimeZone: agentUpdateMaintenanceWindowTimeZone
- useSessionHostLocalTime: agentUpdateUseSessionHostLocalTime
-}
-
-@sys.description('Optional. The ring number of HostPool.')
-param ring int = -1
-
-@sys.description('Optional. URL to customer ADFS server for signing WVD SSO certificates.')
-param ssoadfsAuthority string = ''
-
-@sys.description('Optional. ClientId for the registered Relying Party used to issue WVD SSO certificates.')
-param ssoClientId string = ''
-
-@sys.description('Optional. Path to Azure KeyVault storing the secret used for communication to ADFS.')
-#disable-next-line secure-secrets-in-params
-param ssoClientSecretKeyVaultPath string = ''
-
-@sys.description('Optional. The type of single sign on Secret Type.')
-@allowed([
- ''
- 'Certificate'
- 'CertificateInKeyVault'
- 'SharedKey'
- 'SharedKeyInKeyVault'
-])
-#disable-next-line secure-secrets-in-params
-param ssoSecretType string = ''
-
-var tokenExpirationTime = dateTimeAdd(baseTime, tokenValidityLength)
-
-var builtInRoleNames = {
- 'Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Desktop Virtualization Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')
- 'Desktop Virtualization Application Group Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')
- 'Desktop Virtualization Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')
- 'Desktop Virtualization Host Pool Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')
- 'Desktop Virtualization Host Pool Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')
- 'Desktop Virtualization Power On Off Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')
- 'Desktop Virtualization Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')
- 'Desktop Virtualization Session Host Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')
- 'Desktop Virtualization User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')
- 'Desktop Virtualization User Session Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')
- 'Desktop Virtualization Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')
- 'Desktop Virtualization Workspace Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')
- 'Desktop Virtualization Workspace Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' = {
- name: name
- location: location
- tags: tags
- properties: {
- friendlyName: friendlyName
- description: description
- hostPoolType: type
- customRdpProperty: customRdpProperty
- personalDesktopAssignmentType: any(personalDesktopAssignmentType)
- preferredAppGroupType: preferredAppGroupType
- maxSessionLimit: maxSessionLimit
- loadBalancerType: loadBalancerType
- startVMOnConnect: startVMOnConnect
- validationEnvironment: validationEnvironment
- registrationInfo: {
- expirationTime: tokenExpirationTime
- token: null
- registrationTokenOperation: 'Update'
- }
- vmTemplate: ((!empty(vmTemplate)) ? null : string(vmTemplate))
- agentUpdate: (agentUpdateType == 'Scheduled') ? agentUpdate : null
- ring: ring != -1 ? ring : null
- ssoadfsAuthority: ssoadfsAuthority
- ssoClientId: ssoClientId
- ssoClientSecretKeyVaultPath: ssoClientSecretKeyVaultPath
- ssoSecretType: !empty(ssoSecretType) ? ssoSecretType : null
- }
-}
-
-resource hostPool_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: hostPool
-}
-
-resource hostPool_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: hostPool
-}]
-
-resource hostPool_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(hostPool.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: hostPool
-}]
-
-@sys.description('The resource ID of the AVD host pool.')
-output resourceId string = hostPool.id
-
-@sys.description('The resource group the AVD host pool was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The name of the AVD host pool.')
-output name string = hostPool.name
-
-@sys.description('The expiration time for the registration token.')
-output tokenExpirationTime string = dateTimeAdd(baseTime, tokenValidityLength)
-
-@sys.description('The location the resource was deployed into.')
-output location string = hostPool.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @sys.description('Optional. Specify the name of lock.')
- name: string?
-
- @sys.description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @sys.description('Optional. The name of diagnostic setting.')
- name: string?
-
- @sys.description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @sys.description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @sys.description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @sys.description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @sys.description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @sys.description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @sys.description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/desktop-virtualization/host-pool/main.json b/modules/desktop-virtualization/host-pool/main.json
deleted file mode 100644
index 3e319b32f0..0000000000
--- a/modules/desktop-virtualization/host-pool/main.json
+++ /dev/null
@@ -1,636 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14589445999747413105"
- },
- "name": "Azure Virtual Desktop (AVD) Host Pools",
- "description": "This module deploys an Azure Virtual Desktop (AVD) Host Pool.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Required. Name of the Host Pool."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "friendlyName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The friendly name of the Host Pool to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the Host Pool to be created."
- }
- },
- "type": {
- "type": "string",
- "defaultValue": "Pooled",
- "allowedValues": [
- "Personal",
- "Pooled"
- ],
- "metadata": {
- "description": "Optional. Set this parameter to Personal if you would like to enable Persistent Desktop experience. Defaults to Pooled."
- }
- },
- "personalDesktopAssignmentType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Automatic",
- "Direct",
- ""
- ],
- "metadata": {
- "description": "Optional. Set the type of assignment for a Personal Host Pool type."
- }
- },
- "loadBalancerType": {
- "type": "string",
- "defaultValue": "BreadthFirst",
- "allowedValues": [
- "BreadthFirst",
- "DepthFirst",
- "Persistent"
- ],
- "metadata": {
- "description": "Optional. Type of load balancer algorithm."
- }
- },
- "maxSessionLimit": {
- "type": "int",
- "defaultValue": 99999,
- "metadata": {
- "description": "Optional. Maximum number of sessions."
- }
- },
- "customRdpProperty": {
- "type": "string",
- "defaultValue": "audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;",
- "metadata": {
- "description": "Optional. Host Pool RDP properties."
- }
- },
- "validationEnvironment": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Validation host pools allows you to test service changes before they are deployed to production. When set to true, the Host Pool will be deployed in a validation 'ring' (environment) that receives all the new features (might be less stable). Defaults to false that stands for the stable, production-ready environment."
- }
- },
- "vmTemplate": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The necessary information for adding more VMs to this Host Pool. The object is converted to an in-line string when handed over to the resource deployment, since that only takes strings."
- }
- },
- "tokenValidityLength": {
- "type": "string",
- "defaultValue": "PT8H",
- "metadata": {
- "description": "Optional. Host Pool token validity length. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the token will be valid for 8 hours."
- }
- },
- "baseTime": {
- "type": "string",
- "defaultValue": "[utcNow('u')]",
- "metadata": {
- "description": "Generated. Do not provide a value! This date value is used to generate a registration token."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "preferredAppGroupType": {
- "type": "string",
- "defaultValue": "Desktop",
- "allowedValues": [
- "Desktop",
- "None",
- "RailApplications"
- ],
- "metadata": {
- "description": "Optional. The type of preferred application group type, default to Desktop Application Group."
- }
- },
- "startVMOnConnect": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Enable Start VM on connect to allow users to start the virtual machine from a deallocated state. Important: Custom RBAC role required to power manage VMs."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "agentUpdateType": {
- "type": "string",
- "defaultValue": "Default",
- "allowedValues": [
- "Default",
- "Scheduled"
- ],
- "metadata": {
- "description": "Optional. Enable scheduled agent updates, Default means agent updates will automatically be installed by AVD when they become available."
- }
- },
- "agentUpdateMaintenanceWindowHour": {
- "type": "int",
- "defaultValue": 22,
- "minValue": 1,
- "maxValue": 23,
- "metadata": {
- "description": "Optional. Update hour for scheduled agent updates."
- }
- },
- "agentUpdateMaintenanceWindowDayOfWeek": {
- "type": "string",
- "defaultValue": "Sunday",
- "allowedValues": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "metadata": {
- "description": "Optional. Update day for scheduled agent updates."
- }
- },
- "agentUpdateMaintenanceWindows": {
- "type": "array",
- "defaultValue": [
- {
- "hour": "[parameters('agentUpdateMaintenanceWindowHour')]",
- "dayOfWeek": "[parameters('agentUpdateMaintenanceWindowDayOfWeek')]"
- }
- ],
- "metadata": {
- "description": "Optional. List of maintenance windows for scheduled agent updates."
- }
- },
- "agentUpdateMaintenanceWindowTimeZone": {
- "type": "string",
- "defaultValue": "Central Standard Time",
- "metadata": {
- "description": "Optional. Time zone for scheduled agent updates."
- }
- },
- "agentUpdateUseSessionHostLocalTime": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether to use localTime of the virtual machine for scheduled agent updates."
- }
- },
- "agentUpdate": {
- "type": "object",
- "defaultValue": {
- "type": "[parameters('agentUpdateType')]",
- "maintenanceWindows": "[parameters('agentUpdateMaintenanceWindows')]",
- "maintenanceWindowTimeZone": "[parameters('agentUpdateMaintenanceWindowTimeZone')]",
- "useSessionHostLocalTime": "[parameters('agentUpdateUseSessionHostLocalTime')]"
- },
- "metadata": {
- "description": "Optional. The session host configuration for updating agent, monitoring agent, and stack component."
- }
- },
- "ring": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The ring number of HostPool."
- }
- },
- "ssoadfsAuthority": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. URL to customer ADFS server for signing WVD SSO certificates."
- }
- },
- "ssoClientId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ClientId for the registered Relying Party used to issue WVD SSO certificates."
- }
- },
- "ssoClientSecretKeyVaultPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Path to Azure KeyVault storing the secret used for communication to ADFS."
- }
- },
- "ssoSecretType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Certificate",
- "CertificateInKeyVault",
- "SharedKey",
- "SharedKeyInKeyVault"
- ],
- "metadata": {
- "description": "Optional. The type of single sign on Secret Type."
- }
- }
- },
- "variables": {
- "tokenExpirationTime": "[dateTimeAdd(parameters('baseTime'), parameters('tokenValidityLength'))]",
- "builtInRoleNames": {
- "Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Desktop Virtualization Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')]",
- "Desktop Virtualization Application Group Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')]",
- "Desktop Virtualization Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')]",
- "Desktop Virtualization Host Pool Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')]",
- "Desktop Virtualization Host Pool Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')]",
- "Desktop Virtualization Power On Off Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')]",
- "Desktop Virtualization Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')]",
- "Desktop Virtualization Session Host Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')]",
- "Desktop Virtualization User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')]",
- "Desktop Virtualization User Session Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')]",
- "Desktop Virtualization Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')]",
- "Desktop Virtualization Workspace Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')]",
- "Desktop Virtualization Workspace Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "hostPool": {
- "type": "Microsoft.DesktopVirtualization/hostPools",
- "apiVersion": "2022-09-09",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "friendlyName": "[parameters('friendlyName')]",
- "description": "[parameters('description')]",
- "hostPoolType": "[parameters('type')]",
- "customRdpProperty": "[parameters('customRdpProperty')]",
- "personalDesktopAssignmentType": "[parameters('personalDesktopAssignmentType')]",
- "preferredAppGroupType": "[parameters('preferredAppGroupType')]",
- "maxSessionLimit": "[parameters('maxSessionLimit')]",
- "loadBalancerType": "[parameters('loadBalancerType')]",
- "startVMOnConnect": "[parameters('startVMOnConnect')]",
- "validationEnvironment": "[parameters('validationEnvironment')]",
- "registrationInfo": {
- "expirationTime": "[variables('tokenExpirationTime')]",
- "token": null,
- "registrationTokenOperation": "Update"
- },
- "vmTemplate": "[if(not(empty(parameters('vmTemplate'))), null(), string(parameters('vmTemplate')))]",
- "agentUpdate": "[if(equals(parameters('agentUpdateType'), 'Scheduled'), parameters('agentUpdate'), null())]",
- "ring": "[if(not(equals(parameters('ring'), -1)), parameters('ring'), null())]",
- "ssoadfsAuthority": "[parameters('ssoadfsAuthority')]",
- "ssoClientId": "[parameters('ssoClientId')]",
- "ssoClientSecretKeyVaultPath": "[parameters('ssoClientSecretKeyVaultPath')]",
- "ssoSecretType": "[if(not(empty(parameters('ssoSecretType'))), parameters('ssoSecretType'), null())]"
- }
- },
- "hostPool_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DesktopVirtualization/hostPools/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "hostPool"
- ]
- },
- "hostPool_diagnosticSettings": {
- "copy": {
- "name": "hostPool_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DesktopVirtualization/hostPools/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "hostPool"
- ]
- },
- "hostPool_roleAssignments": {
- "copy": {
- "name": "hostPool_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DesktopVirtualization/hostPools/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DesktopVirtualization/hostPools', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "hostPool"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the AVD host pool."
- },
- "value": "[resourceId('Microsoft.DesktopVirtualization/hostPools', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the AVD host pool was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the AVD host pool."
- },
- "value": "[parameters('name')]"
- },
- "tokenExpirationTime": {
- "type": "string",
- "metadata": {
- "description": "The expiration time for the registration token."
- },
- "value": "[dateTimeAdd(parameters('baseTime'), parameters('tokenValidityLength'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('hostPool', '2022-09-09', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/desktop-virtualization/host-pool/tests/e2e/defaults/main.test.bicep b/modules/desktop-virtualization/host-pool/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index fc3402a8a1..0000000000
--- a/modules/desktop-virtualization/host-pool/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.hostpools-${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 = 'dvhpmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/desktop-virtualization/host-pool/tests/e2e/max/dependencies.bicep b/modules/desktop-virtualization/host-pool/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/desktop-virtualization/host-pool/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/desktop-virtualization/host-pool/tests/e2e/max/main.test.bicep b/modules/desktop-virtualization/host-pool/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 07996d49e3..0000000000
--- a/modules/desktop-virtualization/host-pool/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,146 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.hostpools-${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 = 'dvhpmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- customRdpProperty: 'audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- description: 'My first AVD Host Pool'
- friendlyName: 'AVDv2'
- type: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- maxSessionLimit: 99999
- personalDesktopAssignmentType: 'Automatic'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- vmTemplate: {
- customImageId: null
- domain: 'domainname.onmicrosoft.com'
- galleryImageOffer: 'office-365'
- galleryImagePublisher: 'microsoftwindowsdesktop'
- galleryImageSKU: '20h1-evd-o365pp'
- imageType: 'Gallery'
- imageUri: null
- namePrefix: 'avdv2'
- osDiskType: 'StandardSSD_LRS'
- useManagedDisks: true
- vmSize: {
- cores: 2
- id: 'Standard_D2s_v3'
- ram: 8
- }
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- agentUpdate: {
- type: 'Scheduled'
- useSessionHostLocalTime: false
- maintenanceWindowTimeZone: 'Alaskan Standard Time'
- maintenanceWindows: [
- {
- hour: 7
- dayOfWeek: 'Friday'
- }
- {
- hour: 8
- dayOfWeek: 'Saturday'
- }
- ]
- }
- }
-}]
diff --git a/modules/desktop-virtualization/host-pool/tests/e2e/waf-aligned/dependencies.bicep b/modules/desktop-virtualization/host-pool/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/desktop-virtualization/host-pool/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/desktop-virtualization/host-pool/tests/e2e/waf-aligned/main.test.bicep b/modules/desktop-virtualization/host-pool/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 05123d5d47..0000000000
--- a/modules/desktop-virtualization/host-pool/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,129 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.hostpools-${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 = 'dvhpwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- customRdpProperty: 'audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- description: 'My first AVD Host Pool'
- friendlyName: 'AVDv2'
- type: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- maxSessionLimit: 99999
- personalDesktopAssignmentType: 'Automatic'
- vmTemplate: {
- customImageId: null
- domain: 'domainname.onmicrosoft.com'
- galleryImageOffer: 'office-365'
- galleryImagePublisher: 'microsoftwindowsdesktop'
- galleryImageSKU: '20h1-evd-o365pp'
- imageType: 'Gallery'
- imageUri: null
- namePrefix: 'avdv2'
- osDiskType: 'StandardSSD_LRS'
- useManagedDisks: true
- vmSize: {
- cores: 2
- id: 'Standard_D2s_v3'
- ram: 8
- }
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- agentUpdate: {
- type: 'Scheduled'
- useSessionHostLocalTime: false
- maintenanceWindowTimeZone: 'Alaskan Standard Time'
- maintenanceWindows: [
- {
- hour: 7
- dayOfWeek: 'Friday'
- }
- {
- hour: 8
- dayOfWeek: 'Saturday'
- }
- ]
- }
- }
-}]
diff --git a/modules/desktop-virtualization/host-pool/version.json b/modules/desktop-virtualization/host-pool/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/desktop-virtualization/host-pool/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/desktop-virtualization/scaling-plan/README.md b/modules/desktop-virtualization/scaling-plan/README.md
index a9ffd616df..4bc70d39c2 100644
--- a/modules/desktop-virtualization/scaling-plan/README.md
+++ b/modules/desktop-virtualization/scaling-plan/README.md
@@ -1,809 +1,7 @@
-# Azure Virtual Desktop (AVD) Scaling Plans `[Microsoft.DesktopVirtualization/scalingPlans]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the scaling plan. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | Description of the scaling plan. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exclusionTag`](#parameter-exclusiontag) | string | Provide a tag to be used for hosts that should not be affected by the scaling plan. |
-| [`friendlyName`](#parameter-friendlyname) | string | Friendly Name of the scaling plan. |
-| [`hostPoolReferences`](#parameter-hostpoolreferences) | array | An array of references to hostpools. |
-| [`hostPoolType`](#parameter-hostpooltype) | string | The type of hostpool where this scaling plan should be applied. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`schedules`](#parameter-schedules) | array | The schedules related to this scaling plan. If no value is provided a default schedule will be provided. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`timeZone`](#parameter-timezone) | string | Timezone to be used for the scaling plan. |
-
-### Parameter: `name`
-
-Name of the scaling plan.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-Description of the scaling plan.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exclusionTag`
-
-Provide a tag to be used for hosts that should not be affected by the scaling plan.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `friendlyName`
-
-Friendly Name of the scaling plan.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `hostPoolReferences`
-
-An array of references to hostpools.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `hostPoolType`
-
-The type of hostpool where this scaling plan should be applied.
-
-- Required: No
-- Type: string
-- Default: `'Pooled'`
-- Allowed:
- ```Bicep
- [
- 'Pooled'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `schedules`
-
-The schedules related to this scaling plan. If no value is provided a default schedule will be provided.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- {
- daysOfWeek: [
- 'Friday'
- 'Monday'
- 'Thursday'
- 'Tuesday'
- 'Wednesday'
- ]
- name: 'weekdays_schedule'
- offPeakLoadBalancingAlgorithm: 'DepthFirst'
- offPeakStartTime: {
- hour: 20
- minute: 0
- }
- peakLoadBalancingAlgorithm: 'DepthFirst'
- peakStartTime: {
- hour: 9
- minute: 0
- }
- rampDownCapacityThresholdPct: 90
- rampDownForceLogoffUsers: true
- rampDownLoadBalancingAlgorithm: 'DepthFirst'
- rampDownMinimumHostsPct: 10
- rampDownNotificationMessage: 'You will be logged off in 30 min. Make sure to save your work.'
- rampDownStartTime: {
- hour: 18
- minute: 0
- }
- rampDownStopHostsWhen: 'ZeroSessions'
- rampDownWaitTimeMinutes: 30
- rampUpCapacityThresholdPct: 60
- rampUpLoadBalancingAlgorithm: 'DepthFirst'
- rampUpMinimumHostsPct: 20
- rampUpStartTime: {
- hour: 7
- minute: 0
- }
- }
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `timeZone`
-
-Timezone to be used for the scaling plan.
-
-- Required: No
-- Type: string
-- Default: `'W. Europe Standard Time'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the AVD scaling plan. |
-| `resourceGroupName` | string | The resource group the AVD scaling plan was deployed into. |
-| `resourceId` | string | The resource ID of the AVD scaling plan. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/desktop-virtualization/scaling-plan/main.bicep b/modules/desktop-virtualization/scaling-plan/main.bicep
deleted file mode 100644
index 69551d44a8..0000000000
--- a/modules/desktop-virtualization/scaling-plan/main.bicep
+++ /dev/null
@@ -1,237 +0,0 @@
-metadata name = 'Azure Virtual Desktop (AVD) Scaling Plans'
-metadata description = 'This module deploys an Azure Virtual Desktop (AVD) Scaling Plan.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. Name of the scaling plan.')
-@minLength(1)
-param name string
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. Friendly Name of the scaling plan.')
-param friendlyName string = name
-
-@sys.description('Optional. Description of the scaling plan.')
-param description string = name
-
-@sys.description('Optional. Timezone to be used for the scaling plan.')
-param timeZone string = 'W. Europe Standard Time'
-
-@allowed([
- 'Pooled'
-])
-@sys.description('Optional. The type of hostpool where this scaling plan should be applied.')
-param hostPoolType string = 'Pooled'
-
-@sys.description('Optional. Provide a tag to be used for hosts that should not be affected by the scaling plan.')
-param exclusionTag string = ''
-
-@sys.description('Optional. The schedules related to this scaling plan. If no value is provided a default schedule will be provided.')
-param schedules array = [
- {
- rampUpStartTime: {
- hour: 7
- minute: 0
- }
- peakStartTime: {
- hour: 9
- minute: 0
- }
- rampDownStartTime: {
- hour: 18
- minute: 0
- }
- offPeakStartTime: {
- hour: 20
- minute: 0
- }
- name: 'weekdays_schedule'
- daysOfWeek: [
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- ]
- rampUpLoadBalancingAlgorithm: 'DepthFirst'
- rampUpMinimumHostsPct: 20
- rampUpCapacityThresholdPct: 60
- peakLoadBalancingAlgorithm: 'DepthFirst'
- rampDownLoadBalancingAlgorithm: 'DepthFirst'
- rampDownMinimumHostsPct: 10
- rampDownCapacityThresholdPct: 90
- rampDownForceLogoffUsers: true
- rampDownWaitTimeMinutes: 30
- rampDownNotificationMessage: 'You will be logged off in 30 min. Make sure to save your work.'
- rampDownStopHostsWhen: 'ZeroSessions'
- offPeakLoadBalancingAlgorithm: 'DepthFirst'
- }
-]
-
-@sys.description('Optional. An array of references to hostpools.')
-param hostPoolReferences array = []
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@sys.description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- 'Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Desktop Virtualization Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')
- 'Desktop Virtualization Application Group Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')
- 'Desktop Virtualization Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')
- 'Desktop Virtualization Host Pool Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')
- 'Desktop Virtualization Host Pool Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')
- 'Desktop Virtualization Power On Off Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')
- 'Desktop Virtualization Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')
- 'Desktop Virtualization Session Host Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')
- 'Desktop Virtualization User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')
- 'Desktop Virtualization User Session Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')
- 'Desktop Virtualization Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')
- 'Desktop Virtualization Workspace Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')
- 'Desktop Virtualization Workspace Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource scalingPlan 'Microsoft.DesktopVirtualization/scalingPlans@2022-09-09' = {
- name: name
- location: location
- tags: tags
- properties: {
- friendlyName: friendlyName
- timeZone: timeZone
- hostPoolType: hostPoolType
- exclusionTag: exclusionTag
- schedules: schedules
- hostPoolReferences: hostPoolReferences
- description: description
- }
-}
-
-resource scalingPlan_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: scalingPlan
-}]
-
-resource scalingplan_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(scalingPlan.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: scalingPlan
-}]
-
-@sys.description('The resource ID of the AVD scaling plan.')
-output resourceId string = scalingPlan.id
-
-@sys.description('The resource group the AVD scaling plan was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The name of the AVD scaling plan.')
-output name string = scalingPlan.name
-
-@sys.description('The location the resource was deployed into.')
-output location string = scalingPlan.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @sys.description('Optional. The name of diagnostic setting.')
- name: string?
-
- @sys.description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @sys.description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @sys.description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @sys.description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @sys.description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @sys.description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @sys.description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/desktop-virtualization/scaling-plan/main.json b/modules/desktop-virtualization/scaling-plan/main.json
deleted file mode 100644
index 8a5a0b2063..0000000000
--- a/modules/desktop-virtualization/scaling-plan/main.json
+++ /dev/null
@@ -1,433 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16049673590929985376"
- },
- "name": "Azure Virtual Desktop (AVD) Scaling Plans",
- "description": "This module deploys an Azure Virtual Desktop (AVD) Scaling Plan.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Required. Name of the scaling plan."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "friendlyName": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. Friendly Name of the scaling plan."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. Description of the scaling plan."
- }
- },
- "timeZone": {
- "type": "string",
- "defaultValue": "W. Europe Standard Time",
- "metadata": {
- "description": "Optional. Timezone to be used for the scaling plan."
- }
- },
- "hostPoolType": {
- "type": "string",
- "defaultValue": "Pooled",
- "allowedValues": [
- "Pooled"
- ],
- "metadata": {
- "description": "Optional. The type of hostpool where this scaling plan should be applied."
- }
- },
- "exclusionTag": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Provide a tag to be used for hosts that should not be affected by the scaling plan."
- }
- },
- "schedules": {
- "type": "array",
- "defaultValue": [
- {
- "rampUpStartTime": {
- "hour": 7,
- "minute": 0
- },
- "peakStartTime": {
- "hour": 9,
- "minute": 0
- },
- "rampDownStartTime": {
- "hour": 18,
- "minute": 0
- },
- "offPeakStartTime": {
- "hour": 20,
- "minute": 0
- },
- "name": "weekdays_schedule",
- "daysOfWeek": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
- ],
- "rampUpLoadBalancingAlgorithm": "DepthFirst",
- "rampUpMinimumHostsPct": 20,
- "rampUpCapacityThresholdPct": 60,
- "peakLoadBalancingAlgorithm": "DepthFirst",
- "rampDownLoadBalancingAlgorithm": "DepthFirst",
- "rampDownMinimumHostsPct": 10,
- "rampDownCapacityThresholdPct": 90,
- "rampDownForceLogoffUsers": true,
- "rampDownWaitTimeMinutes": 30,
- "rampDownNotificationMessage": "You will be logged off in 30 min. Make sure to save your work.",
- "rampDownStopHostsWhen": "ZeroSessions",
- "offPeakLoadBalancingAlgorithm": "DepthFirst"
- }
- ],
- "metadata": {
- "description": "Optional. The schedules related to this scaling plan. If no value is provided a default schedule will be provided."
- }
- },
- "hostPoolReferences": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of references to hostpools."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Desktop Virtualization Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')]",
- "Desktop Virtualization Application Group Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')]",
- "Desktop Virtualization Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')]",
- "Desktop Virtualization Host Pool Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')]",
- "Desktop Virtualization Host Pool Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')]",
- "Desktop Virtualization Power On Off Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')]",
- "Desktop Virtualization Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')]",
- "Desktop Virtualization Session Host Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')]",
- "Desktop Virtualization User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')]",
- "Desktop Virtualization User Session Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')]",
- "Desktop Virtualization Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')]",
- "Desktop Virtualization Workspace Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')]",
- "Desktop Virtualization Workspace Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "scalingPlan": {
- "type": "Microsoft.DesktopVirtualization/scalingPlans",
- "apiVersion": "2022-09-09",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "friendlyName": "[parameters('friendlyName')]",
- "timeZone": "[parameters('timeZone')]",
- "hostPoolType": "[parameters('hostPoolType')]",
- "exclusionTag": "[parameters('exclusionTag')]",
- "schedules": "[parameters('schedules')]",
- "hostPoolReferences": "[parameters('hostPoolReferences')]",
- "description": "[parameters('description')]"
- }
- },
- "scalingPlan_diagnosticSettings": {
- "copy": {
- "name": "scalingPlan_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DesktopVirtualization/scalingPlans/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "scalingPlan"
- ]
- },
- "scalingplan_roleAssignments": {
- "copy": {
- "name": "scalingplan_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DesktopVirtualization/scalingPlans/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DesktopVirtualization/scalingPlans', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "scalingPlan"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the AVD scaling plan."
- },
- "value": "[resourceId('Microsoft.DesktopVirtualization/scalingPlans', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the AVD scaling plan was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the AVD scaling plan."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('scalingPlan', '2022-09-09', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/desktop-virtualization/scaling-plan/tests/e2e/defaults/main.test.bicep b/modules/desktop-virtualization/scaling-plan/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 160a5f13a3..0000000000
--- a/modules/desktop-virtualization/scaling-plan/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.scalingplans-${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 = 'dvspmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/desktop-virtualization/scaling-plan/tests/e2e/max/dependencies.bicep b/modules/desktop-virtualization/scaling-plan/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/desktop-virtualization/scaling-plan/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/desktop-virtualization/scaling-plan/tests/e2e/max/main.test.bicep b/modules/desktop-virtualization/scaling-plan/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 73f13bcc7f..0000000000
--- a/modules/desktop-virtualization/scaling-plan/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,144 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.scalingplans-${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 = 'dvspmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- hostPoolType: 'Pooled'
- friendlyName: 'My Scaling Plan'
- description: 'My Scaling Plan Description'
- schedules: [ {
- rampUpStartTime: {
- hour: 7
- minute: 0
- }
- peakStartTime: {
- hour: 9
- minute: 0
- }
- rampDownStartTime: {
- hour: 18
- minute: 0
- }
- offPeakStartTime: {
- hour: 20
- minute: 0
- }
- name: 'weekdays_schedule'
- daysOfWeek: [
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- ]
- rampUpLoadBalancingAlgorithm: 'DepthFirst'
- rampUpMinimumHostsPct: 20
- rampUpCapacityThresholdPct: 60
- peakLoadBalancingAlgorithm: 'DepthFirst'
- rampDownLoadBalancingAlgorithm: 'DepthFirst'
- rampDownMinimumHostsPct: 10
- rampDownCapacityThresholdPct: 90
- rampDownForceLogoffUsers: true
- rampDownWaitTimeMinutes: 30
- rampDownNotificationMessage: 'You will be logged off in 30 min. Make sure to save your work.'
- rampDownStopHostsWhen: 'ZeroSessions'
- offPeakLoadBalancingAlgorithm: 'DepthFirst'
- }
- ]
- }
-}]
diff --git a/modules/desktop-virtualization/scaling-plan/tests/e2e/waf-aligned/dependencies.bicep b/modules/desktop-virtualization/scaling-plan/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/desktop-virtualization/scaling-plan/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/desktop-virtualization/scaling-plan/tests/e2e/waf-aligned/main.test.bicep b/modules/desktop-virtualization/scaling-plan/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 5eedc422fe..0000000000
--- a/modules/desktop-virtualization/scaling-plan/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,127 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.scalingplans-${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 = 'dvspwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- hostPoolType: 'Pooled'
- friendlyName: 'My Scaling Plan'
- description: 'My Scaling Plan Description'
- schedules: [ {
- rampUpStartTime: {
- hour: 7
- minute: 0
- }
- peakStartTime: {
- hour: 9
- minute: 0
- }
- rampDownStartTime: {
- hour: 18
- minute: 0
- }
- offPeakStartTime: {
- hour: 20
- minute: 0
- }
- name: 'weekdays_schedule'
- daysOfWeek: [
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- ]
- rampUpLoadBalancingAlgorithm: 'DepthFirst'
- rampUpMinimumHostsPct: 20
- rampUpCapacityThresholdPct: 60
- peakLoadBalancingAlgorithm: 'DepthFirst'
- rampDownLoadBalancingAlgorithm: 'DepthFirst'
- rampDownMinimumHostsPct: 10
- rampDownCapacityThresholdPct: 90
- rampDownForceLogoffUsers: true
- rampDownWaitTimeMinutes: 30
- rampDownNotificationMessage: 'You will be logged off in 30 min. Make sure to save your work.'
- rampDownStopHostsWhen: 'ZeroSessions'
- offPeakLoadBalancingAlgorithm: 'DepthFirst'
- }
- ]
- }
-}]
diff --git a/modules/desktop-virtualization/scaling-plan/version.json b/modules/desktop-virtualization/scaling-plan/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/desktop-virtualization/scaling-plan/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/desktop-virtualization/workspace/README.md b/modules/desktop-virtualization/workspace/README.md
index 6e0fe0f8c8..60a90e780f 100644
--- a/modules/desktop-virtualization/workspace/README.md
+++ b/modules/desktop-virtualization/workspace/README.md
@@ -1,635 +1,7 @@
-# Azure Virtual Desktop (AVD) Workspaces `[Microsoft.DesktopVirtualization/workspaces]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the workspace to be attach to new Application Group. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`appGroupResourceIds`](#parameter-appgroupresourceids) | array | Resource IDs for the existing Application groups this workspace will group together. |
-| [`description`](#parameter-description) | string | The description of the Workspace to be created. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`friendlyName`](#parameter-friendlyname) | string | The friendly name of the Workspace to be created. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the workspace to be attach to new Application Group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `appGroupResourceIds`
-
-Resource IDs for the existing Application groups this workspace will group together.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-The description of the Workspace to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `friendlyName`
-
-The friendly name of the Workspace to be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the AVD workspace. |
-| `resourceGroupName` | string | The resource group the AVD workspace was deployed into. |
-| `resourceId` | string | The resource ID of the AVD workspace. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/desktop-virtualization/workspace/main.bicep b/modules/desktop-virtualization/workspace/main.bicep
deleted file mode 100644
index 418a5c72d4..0000000000
--- a/modules/desktop-virtualization/workspace/main.bicep
+++ /dev/null
@@ -1,199 +0,0 @@
-metadata name = 'Azure Virtual Desktop (AVD) Workspaces'
-metadata description = 'This module deploys an Azure Virtual Desktop (AVD) Workspace.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. The name of the workspace to be attach to new Application Group.')
-param name string
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. Resource IDs for the existing Application groups this workspace will group together.')
-param appGroupResourceIds array = []
-
-@sys.description('Optional. The friendly name of the Workspace to be created.')
-param friendlyName string = ''
-
-@sys.description('Optional. The description of the Workspace to be created.')
-param description string = ''
-
-@sys.description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@sys.description('Optional. The lock settings of the service.')
-param lock lockType
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-var builtInRoleNames = {
- 'Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Desktop Virtualization Application Group Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')
- 'Desktop Virtualization Application Group Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')
- 'Desktop Virtualization Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')
- 'Desktop Virtualization Host Pool Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')
- 'Desktop Virtualization Host Pool Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')
- 'Desktop Virtualization Power On Off Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')
- 'Desktop Virtualization Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')
- 'Desktop Virtualization Session Host Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')
- 'Desktop Virtualization User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')
- 'Desktop Virtualization User Session Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')
- 'Desktop Virtualization Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')
- 'Desktop Virtualization Workspace Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')
- 'Desktop Virtualization Workspace Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource workspace 'Microsoft.DesktopVirtualization/workspaces@2022-09-09' = {
- name: name
- location: location
- tags: tags
- properties: {
- applicationGroupReferences: appGroupResourceIds
- description: description
- friendlyName: friendlyName
- }
-}
-
-resource workspace_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: workspace
-}
-
-resource workspace_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: workspace
-}]
-
-resource workspace_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(workspace.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: workspace
-}]
-
-@sys.description('The resource ID of the AVD workspace.')
-output resourceId string = workspace.id
-
-@sys.description('The resource group the AVD workspace was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The name of the AVD workspace.')
-output name string = workspace.name
-
-@sys.description('The location the resource was deployed into.')
-output location string = workspace.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @sys.description('Optional. Specify the name of lock.')
- name: string?
-
- @sys.description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @sys.description('Optional. The name of diagnostic setting.')
- name: string?
-
- @sys.description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @sys.description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @sys.description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @sys.description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @sys.description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @sys.description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @sys.description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/desktop-virtualization/workspace/main.json b/modules/desktop-virtualization/workspace/main.json
deleted file mode 100644
index dab0738414..0000000000
--- a/modules/desktop-virtualization/workspace/main.json
+++ /dev/null
@@ -1,403 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13505731187520194526"
- },
- "name": "Azure Virtual Desktop (AVD) Workspaces",
- "description": "This module deploys an Azure Virtual Desktop (AVD) Workspace.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the workspace to be attach to new Application Group."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "appGroupResourceIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Resource IDs for the existing Application groups this workspace will group together."
- }
- },
- "friendlyName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The friendly name of the Workspace to be created."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the Workspace to be created."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ca6382a4-1721-4bcf-a114-ff0c70227b6b')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Desktop Virtualization Application Group Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '86240b0e-9422-4c43-887b-b61143f32ba8')]",
- "Desktop Virtualization Application Group Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'aebf23d0-b568-4e86-b8f9-fe83a2c6ab55')]",
- "Desktop Virtualization Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '082f0a83-3be5-4ba1-904c-961cca79b387')]",
- "Desktop Virtualization Host Pool Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e307426c-f9b6-4e81-87de-d99efb3c32bc')]",
- "Desktop Virtualization Host Pool Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ceadfde2-b300-400a-ab7b-6143895aa822')]",
- "Desktop Virtualization Power On Off Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '40c5ff49-9181-41f8-ae61-143b0e78555e')]",
- "Desktop Virtualization Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '49a72310-ab8d-41df-bbb0-79b649203868')]",
- "Desktop Virtualization Session Host Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2ad6aaab-ead9-4eaa-8ac5-da422f562408')]",
- "Desktop Virtualization User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1d18fff3-a72a-46b5-b4a9-0b38a3cd7e63')]",
- "Desktop Virtualization User Session Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ea4bfff8-7fb4-485a-aadd-d4129a0ffaa6')]",
- "Desktop Virtualization Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a959dbd1-f747-45e3-8ba6-dd80f235f97c')]",
- "Desktop Virtualization Workspace Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21efdde3-836f-432b-bf3d-3e8e734d4b2b')]",
- "Desktop Virtualization Workspace Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0fa44ee9-7a7d-466b-9bb2-2bf446b1204d')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "workspace": {
- "type": "Microsoft.DesktopVirtualization/workspaces",
- "apiVersion": "2022-09-09",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "applicationGroupReferences": "[parameters('appGroupResourceIds')]",
- "description": "[parameters('description')]",
- "friendlyName": "[parameters('friendlyName')]"
- }
- },
- "workspace_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DesktopVirtualization/workspaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_diagnosticSettings": {
- "copy": {
- "name": "workspace_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DesktopVirtualization/workspaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_roleAssignments": {
- "copy": {
- "name": "workspace_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DesktopVirtualization/workspaces/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DesktopVirtualization/workspaces', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "workspace"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the AVD workspace."
- },
- "value": "[resourceId('Microsoft.DesktopVirtualization/workspaces', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the AVD workspace was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the AVD workspace."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('workspace', '2022-09-09', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/desktop-virtualization/workspace/tests/e2e/defaults/main.test.bicep b/modules/desktop-virtualization/workspace/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 3eb2840ed1..0000000000
--- a/modules/desktop-virtualization/workspace/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.workspaces-${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 = 'dvwmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/desktop-virtualization/workspace/tests/e2e/max/dependencies.bicep b/modules/desktop-virtualization/workspace/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 8e753087b2..0000000000
--- a/modules/desktop-virtualization/workspace/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,41 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Application Group to create.')
-param applicationGroupName string
-
-@description('Required. The name of the Host Pool to create.')
-param hostPoolName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' = {
- name: hostPoolName
- location: location
- properties: {
- hostPoolType: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- preferredAppGroupType: 'Desktop'
- }
-}
-
-resource applicationGroup 'Microsoft.DesktopVirtualization/applicationGroups@2022-09-09' = {
- name: applicationGroupName
- location: location
- properties: {
- applicationGroupType: 'Desktop'
- hostPoolArmPath: hostPool.id
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Application Group.')
-output applicationGroupResourceId string = applicationGroup.id
diff --git a/modules/desktop-virtualization/workspace/tests/e2e/max/main.test.bicep b/modules/desktop-virtualization/workspace/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 7e08439b65..0000000000
--- a/modules/desktop-virtualization/workspace/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,114 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.workspaces-${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 = 'dvwmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- applicationGroupName: 'dep-${namePrefix}-appGroup-${serviceShort}'
- hostPoolName: 'dep-${namePrefix}-hp-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- appGroupResourceIds: [
- nestedDependencies.outputs.applicationGroupResourceId
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- description: 'This is my first AVD Workspace'
- friendlyName: 'My first AVD Workspace'
- }
-}]
diff --git a/modules/desktop-virtualization/workspace/tests/e2e/waf-aligned/dependencies.bicep b/modules/desktop-virtualization/workspace/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 8e753087b2..0000000000
--- a/modules/desktop-virtualization/workspace/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,41 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Application Group to create.')
-param applicationGroupName string
-
-@description('Required. The name of the Host Pool to create.')
-param hostPoolName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' = {
- name: hostPoolName
- location: location
- properties: {
- hostPoolType: 'Pooled'
- loadBalancerType: 'BreadthFirst'
- preferredAppGroupType: 'Desktop'
- }
-}
-
-resource applicationGroup 'Microsoft.DesktopVirtualization/applicationGroups@2022-09-09' = {
- name: applicationGroupName
- location: location
- properties: {
- applicationGroupType: 'Desktop'
- hostPoolArmPath: hostPool.id
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Application Group.')
-output applicationGroupResourceId string = applicationGroup.id
diff --git a/modules/desktop-virtualization/workspace/tests/e2e/waf-aligned/main.test.bicep b/modules/desktop-virtualization/workspace/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 78a62c1b38..0000000000
--- a/modules/desktop-virtualization/workspace/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,97 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-desktopvirtualization.workspaces-${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 = 'dvwwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- applicationGroupName: 'dep-${namePrefix}-appGroup-${serviceShort}'
- hostPoolName: 'dep-${namePrefix}-hp-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- appGroupResourceIds: [
- nestedDependencies.outputs.applicationGroupResourceId
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- location: location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- description: 'This is my first AVD Workspace'
- friendlyName: 'My first AVD Workspace'
- }
-}]
diff --git a/modules/desktop-virtualization/workspace/version.json b/modules/desktop-virtualization/workspace/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/desktop-virtualization/workspace/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/README.md b/modules/dev-test-lab/lab/README.md
index 2735d1bdfc..7780d26c04 100644
--- a/modules/dev-test-lab/lab/README.md
+++ b/modules/dev-test-lab/lab/README.md
@@ -1,1630 +1,7 @@
-# DevTest Labs `[Microsoft.DevTestLab/labs]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the lab. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`encryptionDiskEncryptionSetId`](#parameter-encryptiondiskencryptionsetid) | string | The Disk Encryption Set Resource ID used to encrypt OS and data disks created as part of the the lab. Required if encryptionType is set to "EncryptionAtRestWithCustomerKey". |
-| [`notificationchannels`](#parameter-notificationchannels) | array | Notification Channels to create for the lab. Required if the schedules property "notificationSettingsStatus" is set to "Enabled. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`announcement`](#parameter-announcement) | object | The properties of any lab announcement associated with this lab. |
-| [`artifactsources`](#parameter-artifactsources) | array | Artifact sources to create for the lab. |
-| [`artifactsStorageAccount`](#parameter-artifactsstorageaccount) | string | The resource ID of the storage account used to store artifacts and images by the lab. Also used for defaultStorageAccount, defaultPremiumStorageAccount and premiumDataDiskStorageAccount properties. If left empty, a default storage account will be created by the lab and used. |
-| [`browserConnect`](#parameter-browserconnect) | string | Enable browser connect on virtual machines if the lab's VNETs have configured Azure Bastion. |
-| [`costs`](#parameter-costs) | object | Costs to create for the lab. |
-| [`disableAutoUpgradeCseMinorVersion`](#parameter-disableautoupgradecseminorversion) | bool | Disable auto upgrade custom script extension minor version. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`encryptionType`](#parameter-encryptiontype) | string | Specify how OS and data disks created as part of the lab are encrypted. |
-| [`environmentPermission`](#parameter-environmentpermission) | string | The access rights to be granted to the user when provisioning an environment. |
-| [`extendedProperties`](#parameter-extendedproperties) | object | Extended properties of the lab used for experimental features. |
-| [`isolateLabResources`](#parameter-isolatelabresources) | string | Enable lab resources isolation from the public internet. |
-| [`labStorageType`](#parameter-labstoragetype) | string | Type of storage used by the lab. It can be either Premium or Standard. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`managementIdentitiesResourceIds`](#parameter-managementidentitiesresourceids) | array | The resource ID(s) to assign to the virtual machines associated with this lab. |
-| [`mandatoryArtifactsResourceIdsLinux`](#parameter-mandatoryartifactsresourceidslinux) | array | The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user. |
-| [`mandatoryArtifactsResourceIdsWindows`](#parameter-mandatoryartifactsresourceidswindows) | array | The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user. |
-| [`policies`](#parameter-policies) | array | Policies to create for the lab. |
-| [`premiumDataDisks`](#parameter-premiumdatadisks) | string | The setting to enable usage of premium data disks. When its value is "Enabled", creation of standard or premium data disks is allowed. When its value is "Disabled", only creation of standard data disks is allowed. Default is "Disabled". |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`schedules`](#parameter-schedules) | array | Schedules to create for the lab. |
-| [`support`](#parameter-support) | object | The properties of any lab support message associated with this lab. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`virtualnetworks`](#parameter-virtualnetworks) | array | Virtual networks to create for the lab. |
-| [`vmCreationResourceGroupId`](#parameter-vmcreationresourcegroupid) | string | Resource Group allocation for virtual machines. If left empty, virtual machines will be deployed in their own Resource Groups. Default is the same Resource Group for DevTest Lab. |
-
-### Parameter: `name`
-
-The name of the lab.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `encryptionDiskEncryptionSetId`
-
-The Disk Encryption Set Resource ID used to encrypt OS and data disks created as part of the the lab. Required if encryptionType is set to "EncryptionAtRestWithCustomerKey".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `notificationchannels`
-
-Notification Channels to create for the lab. Required if the schedules property "notificationSettingsStatus" is set to "Enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `announcement`
-
-The properties of any lab announcement associated with this lab.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `artifactsources`
-
-Artifact sources to create for the lab.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `artifactsStorageAccount`
-
-The resource ID of the storage account used to store artifacts and images by the lab. Also used for defaultStorageAccount, defaultPremiumStorageAccount and premiumDataDiskStorageAccount properties. If left empty, a default storage account will be created by the lab and used.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `browserConnect`
-
-Enable browser connect on virtual machines if the lab's VNETs have configured Azure Bastion.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `costs`
-
-Costs to create for the lab.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `disableAutoUpgradeCseMinorVersion`
-
-Disable auto upgrade custom script extension minor version.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `encryptionType`
-
-Specify how OS and data disks created as part of the lab are encrypted.
-
-- Required: No
-- Type: string
-- Default: `'EncryptionAtRestWithPlatformKey'`
-- Allowed:
- ```Bicep
- [
- 'EncryptionAtRestWithCustomerKey'
- 'EncryptionAtRestWithPlatformKey'
- ]
- ```
-
-### Parameter: `environmentPermission`
-
-The access rights to be granted to the user when provisioning an environment.
-
-- Required: No
-- Type: string
-- Default: `'Reader'`
-- Allowed:
- ```Bicep
- [
- 'Contributor'
- 'Reader'
- ]
- ```
-
-### Parameter: `extendedProperties`
-
-Extended properties of the lab used for experimental features.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `isolateLabResources`
-
-Enable lab resources isolation from the public internet.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `labStorageType`
-
-Type of storage used by the lab. It can be either Premium or Standard.
-
-- Required: No
-- Type: string
-- Default: `'Premium'`
-- Allowed:
- ```Bicep
- [
- 'Premium'
- 'Standard'
- 'StandardSSD'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `managementIdentitiesResourceIds`
-
-The resource ID(s) to assign to the virtual machines associated with this lab.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `mandatoryArtifactsResourceIdsLinux`
-
-The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `mandatoryArtifactsResourceIdsWindows`
-
-The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `policies`
-
-Policies to create for the lab.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `premiumDataDisks`
-
-The setting to enable usage of premium data disks. When its value is "Enabled", creation of standard or premium data disks is allowed. When its value is "Disabled", only creation of standard data disks is allowed. Default is "Disabled".
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `schedules`
-
-Schedules to create for the lab.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `support`
-
-The properties of any lab support message associated with this lab.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `virtualnetworks`
-
-Virtual networks to create for the lab.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `vmCreationResourceGroupId`
-
-Resource Group allocation for virtual machines. If left empty, virtual machines will be deployed in their own Resource Groups. Default is the same Resource Group for DevTest Lab.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().id]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the lab. |
-| `resourceGroupName` | string | The resource group the lab was deployed into. |
-| `resourceId` | string | The resource ID of the lab. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-| `uniqueIdentifier` | string | The unique identifier for the lab. Used to track tags that the lab applies to each resource that it creates. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/dev-test-lab/lab/artifactsource/README.md b/modules/dev-test-lab/lab/artifactsource/README.md
deleted file mode 100644
index 0a5d74362c..0000000000
--- a/modules/dev-test-lab/lab/artifactsource/README.md
+++ /dev/null
@@ -1,168 +0,0 @@
-# DevTest Lab Artifact Sources `[Microsoft.DevTestLab/labs/artifactsources]`
-
-This module deploys a DevTest Lab Artifact Source.
-
-An artifact source allows you to create custom artifacts for the VMs in the lab, or use Azure Resource Manager templates to create a custom test environment. You must add a private Git repository for the artifacts or Resource Manager templates that your team creates. The repository can be hosted on GitHub or on Azure DevOps Services.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DevTestLab/labs/artifactsources` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/artifactsources) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the artifact source. |
-| [`uri`](#parameter-uri) | string | The artifact source's URI. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`armTemplateFolderPath`](#parameter-armtemplatefolderpath) | string | The folder containing Azure Resource Manager templates. Required if "folderPath" is empty. |
-| [`folderPath`](#parameter-folderpath) | string | The folder containing artifacts. At least one folder path is required. Required if "armTemplateFolderPath" is empty. |
-| [`labName`](#parameter-labname) | string | The name of the parent lab. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`branchRef`](#parameter-branchref) | string | The artifact source's branch reference (e.g. main or master). |
-| [`displayName`](#parameter-displayname) | string | The artifact source's display name. Default is the name of the artifact source. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`securityToken`](#parameter-securitytoken) | securestring | The security token to authenticate to the artifact source. |
-| [`sourceType`](#parameter-sourcetype) | string | The artifact source's type. |
-| [`status`](#parameter-status) | string | Indicates if the artifact source is enabled (values: Enabled, Disabled). Default is "Enabled". |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the artifact source.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `uri`
-
-The artifact source's URI.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `armTemplateFolderPath`
-
-The folder containing Azure Resource Manager templates. Required if "folderPath" is empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `folderPath`
-
-The folder containing artifacts. At least one folder path is required. Required if "armTemplateFolderPath" is empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `labName`
-
-The name of the parent lab. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `branchRef`
-
-The artifact source's branch reference (e.g. main or master).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `displayName`
-
-The artifact source's display name. Default is the name of the artifact source.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `securityToken`
-
-The security token to authenticate to the artifact source.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `sourceType`
-
-The artifact source's type.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'GitHub'
- 'StorageAccount'
- 'VsoGit'
- ]
- ```
-
-### Parameter: `status`
-
-Indicates if the artifact source is enabled (values: Enabled, Disabled). Default is "Enabled".
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the artifact source. |
-| `resourceGroupName` | string | The name of the resource group the artifact source was created in. |
-| `resourceId` | string | The resource ID of the artifact source. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/dev-test-lab/lab/artifactsource/main.bicep b/modules/dev-test-lab/lab/artifactsource/main.bicep
deleted file mode 100644
index e2c5e2f540..0000000000
--- a/modules/dev-test-lab/lab/artifactsource/main.bicep
+++ /dev/null
@@ -1,93 +0,0 @@
-metadata name = 'DevTest Lab Artifact Sources'
-metadata description = '''This module deploys a DevTest Lab Artifact Source.
-
-An artifact source allows you to create custom artifacts for the VMs in the lab, or use Azure Resource Manager templates to create a custom test environment. You must add a private Git repository for the artifacts or Resource Manager templates that your team creates. The repository can be hosted on GitHub or on Azure DevOps Services.'''
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent lab. Required if the template is used in a standalone deployment.')
-param labName string
-
-@sys.description('Required. The name of the artifact source.')
-param name string
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. The artifact source\'s display name. Default is the name of the artifact source.')
-param displayName string = name
-
-@sys.description('Optional. The artifact source\'s branch reference (e.g. main or master).')
-param branchRef string = ''
-
-@sys.description('Conditional. The folder containing artifacts. At least one folder path is required. Required if "armTemplateFolderPath" is empty.')
-param folderPath string = ''
-
-@sys.description('Conditional. The folder containing Azure Resource Manager templates. Required if "folderPath" is empty.')
-param armTemplateFolderPath string = ''
-
-@sys.description('Optional. The security token to authenticate to the artifact source.')
-@secure()
-param securityToken string = ''
-
-@allowed([
- ''
- 'GitHub'
- 'StorageAccount'
- 'VsoGit'
-])
-@sys.description('Optional. The artifact source\'s type.')
-param sourceType string = ''
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Indicates if the artifact source is enabled (values: Enabled, Disabled). Default is "Enabled".')
-param status string = 'Enabled'
-
-@sys.description('Required. The artifact source\'s URI.')
-param uri string
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
- name: labName
-}
-
-resource artifactsource 'Microsoft.DevTestLab/labs/artifactsources@2018-09-15' = {
- name: name
- parent: lab
- tags: tags
- properties: {
- displayName: displayName
- branchRef: !empty(branchRef) ? branchRef : null
- folderPath: !empty(folderPath) ? folderPath : null
- armTemplateFolderPath: !empty(armTemplateFolderPath) ? armTemplateFolderPath : null
- securityToken: !empty(securityToken) ? securityToken : null
- sourceType: !empty(sourceType) ? sourceType : null
- status: status
- uri: uri
- }
-}
-
-@sys.description('The name of the artifact source.')
-output name string = artifactsource.name
-
-@sys.description('The resource ID of the artifact source.')
-output resourceId string = artifactsource.id
-
-@sys.description('The name of the resource group the artifact source was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/dev-test-lab/lab/artifactsource/main.json b/modules/dev-test-lab/lab/artifactsource/main.json
deleted file mode 100644
index 734c1e482d..0000000000
--- a/modules/dev-test-lab/lab/artifactsource/main.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12165020180713564819"
- },
- "name": "DevTest Lab Artifact Sources",
- "description": "This module deploys a DevTest Lab Artifact Source.\r\n\r\nAn artifact source allows you to create custom artifacts for the VMs in the lab, or use Azure Resource Manager templates to create a custom test environment. You must add a private Git repository for the artifacts or Resource Manager templates that your team creates. The repository can be hosted on GitHub or on Azure DevOps Services.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the artifact source."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. The artifact source's display name. Default is the name of the artifact source."
- }
- },
- "branchRef": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The artifact source's branch reference (e.g. main or master)."
- }
- },
- "folderPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The folder containing artifacts. At least one folder path is required. Required if \"armTemplateFolderPath\" is empty."
- }
- },
- "armTemplateFolderPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The folder containing Azure Resource Manager templates. Required if \"folderPath\" is empty."
- }
- },
- "securityToken": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The security token to authenticate to the artifact source."
- }
- },
- "sourceType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "GitHub",
- "StorageAccount",
- "VsoGit"
- ],
- "metadata": {
- "description": "Optional. The artifact source's type."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Indicates if the artifact source is enabled (values: Enabled, Disabled). Default is \"Enabled\"."
- }
- },
- "uri": {
- "type": "string",
- "metadata": {
- "description": "Required. The artifact source's URI."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "artifactsource": {
- "type": "Microsoft.DevTestLab/labs/artifactsources",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "displayName": "[parameters('displayName')]",
- "branchRef": "[if(not(empty(parameters('branchRef'))), parameters('branchRef'), null())]",
- "folderPath": "[if(not(empty(parameters('folderPath'))), parameters('folderPath'), null())]",
- "armTemplateFolderPath": "[if(not(empty(parameters('armTemplateFolderPath'))), parameters('armTemplateFolderPath'), null())]",
- "securityToken": "[if(not(empty(parameters('securityToken'))), parameters('securityToken'), null())]",
- "sourceType": "[if(not(empty(parameters('sourceType'))), parameters('sourceType'), null())]",
- "status": "[parameters('status')]",
- "uri": "[parameters('uri')]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the artifact source."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the artifact source."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/artifactsources', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the artifact source was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/artifactsource/version.json b/modules/dev-test-lab/lab/artifactsource/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/artifactsource/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/cost/README.md b/modules/dev-test-lab/lab/cost/README.md
deleted file mode 100644
index d2950dda2b..0000000000
--- a/modules/dev-test-lab/lab/cost/README.md
+++ /dev/null
@@ -1,300 +0,0 @@
-# DevTest Lab Costs `[Microsoft.DevTestLab/labs/costs]`
-
-This module deploys a DevTest Lab Cost.
-
-Manage lab costs by setting a spending target that can be viewed in the Monthly Estimated Cost Trend chart. DevTest Labs can send a notification when spending reaches the specified target threshold.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DevTestLab/labs/costs` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/costs) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`cycleType`](#parameter-cycletype) | string | Reporting cycle type. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`cycleEndDateTime`](#parameter-cycleenddatetime) | string | Reporting cycle end date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to "Custom". |
-| [`cycleStartDateTime`](#parameter-cyclestartdatetime) | string | Reporting cycle start date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to "Custom". |
-| [`labName`](#parameter-labname) | string | The name of the parent lab. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`currencyCode`](#parameter-currencycode) | string | The currency code of the cost. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`status`](#parameter-status) | string | Target cost status. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`target`](#parameter-target) | int | Lab target cost (e.g. 100). The target cost will appear in the "Cost trend" chart to allow tracking lab spending relative to the target cost for the current reporting cycleSetting the target cost to 0 will disable all thresholds. |
-| [`thresholdValue100DisplayOnChart`](#parameter-thresholdvalue100displayonchart) | string | Target Cost threshold at 100% display on chart. Indicates whether this threshold will be displayed on cost charts. |
-| [`thresholdValue100SendNotificationWhenExceeded`](#parameter-thresholdvalue100sendnotificationwhenexceeded) | string | Target cost threshold at 100% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded. |
-| [`thresholdValue125DisplayOnChart`](#parameter-thresholdvalue125displayonchart) | string | Target Cost threshold at 125% display on chart. Indicates whether this threshold will be displayed on cost charts. |
-| [`thresholdValue125SendNotificationWhenExceeded`](#parameter-thresholdvalue125sendnotificationwhenexceeded) | string | Target cost threshold at 125% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded. |
-| [`thresholdValue25DisplayOnChart`](#parameter-thresholdvalue25displayonchart) | string | Target Cost threshold at 25% display on chart. Indicates whether this threshold will be displayed on cost charts. |
-| [`thresholdValue25SendNotificationWhenExceeded`](#parameter-thresholdvalue25sendnotificationwhenexceeded) | string | Target cost threshold at 25% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded. |
-| [`thresholdValue50DisplayOnChart`](#parameter-thresholdvalue50displayonchart) | string | Target Cost threshold at 50% display on chart. Indicates whether this threshold will be displayed on cost charts. |
-| [`thresholdValue50SendNotificationWhenExceeded`](#parameter-thresholdvalue50sendnotificationwhenexceeded) | string | Target cost threshold at 50% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded. |
-| [`thresholdValue75DisplayOnChart`](#parameter-thresholdvalue75displayonchart) | string | Target Cost threshold at 75% display on chart. Indicates whether this threshold will be displayed on cost charts. |
-| [`thresholdValue75SendNotificationWhenExceeded`](#parameter-thresholdvalue75sendnotificationwhenexceeded) | string | Target cost threshold at 75% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded. |
-
-### Parameter: `cycleType`
-
-Reporting cycle type.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CalendarMonth'
- 'Custom'
- ]
- ```
-
-### Parameter: `cycleEndDateTime`
-
-Reporting cycle end date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to "Custom".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `cycleStartDateTime`
-
-Reporting cycle start date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to "Custom".
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `labName`
-
-The name of the parent lab. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `currencyCode`
-
-The currency code of the cost.
-
-- Required: No
-- Type: string
-- Default: `'USD'`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `status`
-
-Target cost status.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `target`
-
-Lab target cost (e.g. 100). The target cost will appear in the "Cost trend" chart to allow tracking lab spending relative to the target cost for the current reporting cycleSetting the target cost to 0 will disable all thresholds.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `thresholdValue100DisplayOnChart`
-
-Target Cost threshold at 100% display on chart. Indicates whether this threshold will be displayed on cost charts.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue100SendNotificationWhenExceeded`
-
-Target cost threshold at 100% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue125DisplayOnChart`
-
-Target Cost threshold at 125% display on chart. Indicates whether this threshold will be displayed on cost charts.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue125SendNotificationWhenExceeded`
-
-Target cost threshold at 125% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue25DisplayOnChart`
-
-Target Cost threshold at 25% display on chart. Indicates whether this threshold will be displayed on cost charts.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue25SendNotificationWhenExceeded`
-
-Target cost threshold at 25% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue50DisplayOnChart`
-
-Target Cost threshold at 50% display on chart. Indicates whether this threshold will be displayed on cost charts.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue50SendNotificationWhenExceeded`
-
-Target cost threshold at 50% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue75DisplayOnChart`
-
-Target Cost threshold at 75% display on chart. Indicates whether this threshold will be displayed on cost charts.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `thresholdValue75SendNotificationWhenExceeded`
-
-Target cost threshold at 75% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the cost. |
-| `resourceGroupName` | string | The name of the resource group the cost was created in. |
-| `resourceId` | string | The resource ID of the cost. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/dev-test-lab/lab/cost/main.bicep b/modules/dev-test-lab/lab/cost/main.bicep
deleted file mode 100644
index c0e7f7cb18..0000000000
--- a/modules/dev-test-lab/lab/cost/main.bicep
+++ /dev/null
@@ -1,195 +0,0 @@
-metadata name = 'DevTest Lab Costs'
-metadata description = '''This module deploys a DevTest Lab Cost.
-
-Manage lab costs by setting a spending target that can be viewed in the Monthly Estimated Cost Trend chart. DevTest Labs can send a notification when spending reaches the specified target threshold.'''
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent lab. Required if the template is used in a standalone deployment.')
-param labName string
-
-@allowed([
- 'Custom'
- 'CalendarMonth'
-])
-@sys.description('Required. Reporting cycle type.')
-param cycleType string
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Conditional. Reporting cycle start date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to "Custom".')
-param cycleStartDateTime string = ''
-
-@sys.description('Conditional. Reporting cycle end date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to "Custom".')
-param cycleEndDateTime string = ''
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target cost status.')
-param status string = 'Enabled'
-
-@sys.description('Optional. Lab target cost (e.g. 100). The target cost will appear in the "Cost trend" chart to allow tracking lab spending relative to the target cost for the current reporting cycleSetting the target cost to 0 will disable all thresholds.')
-param target int = 0
-
-@sys.description('Optional. The currency code of the cost.')
-param currencyCode string = 'USD'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target Cost threshold at 25% display on chart. Indicates whether this threshold will be displayed on cost charts.')
-param thresholdValue25DisplayOnChart string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target cost threshold at 25% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.')
-param thresholdValue25SendNotificationWhenExceeded string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target Cost threshold at 50% display on chart. Indicates whether this threshold will be displayed on cost charts.')
-param thresholdValue50DisplayOnChart string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target cost threshold at 50% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.')
-param thresholdValue50SendNotificationWhenExceeded string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target Cost threshold at 75% display on chart. Indicates whether this threshold will be displayed on cost charts.')
-param thresholdValue75DisplayOnChart string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target cost threshold at 75% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.')
-param thresholdValue75SendNotificationWhenExceeded string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target Cost threshold at 100% display on chart. Indicates whether this threshold will be displayed on cost charts.')
-param thresholdValue100DisplayOnChart string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target cost threshold at 100% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.')
-param thresholdValue100SendNotificationWhenExceeded string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target Cost threshold at 125% display on chart. Indicates whether this threshold will be displayed on cost charts.')
-param thresholdValue125DisplayOnChart string = 'Disabled'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. Target cost threshold at 125% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded.')
-param thresholdValue125SendNotificationWhenExceeded string = 'Disabled'
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
- name: labName
-}
-
-resource cost 'Microsoft.DevTestLab/labs/costs@2018-09-15' = {
- name: 'targetCost'
- parent: lab
- tags: tags
- properties: {
- currencyCode: currencyCode
- startDateTime: cycleStartDateTime
- endDateTime: cycleEndDateTime
- targetCost: {
- target: target
- cycleStartDateTime: cycleStartDateTime
- cycleEndDateTime: cycleEndDateTime
- cycleType: cycleType
- status: status
- costThresholds: [
- {
- thresholdId: '00000000-0000-0000-0000-000000000001'
- percentageThreshold: {
- thresholdValue: 25
- }
- displayOnChart: thresholdValue25DisplayOnChart
- sendNotificationWhenExceeded: thresholdValue25SendNotificationWhenExceeded
- }
- {
- thresholdId: '00000000-0000-0000-0000-000000000002'
- percentageThreshold: {
- thresholdValue: 50
- }
- displayOnChart: thresholdValue50DisplayOnChart
- sendNotificationWhenExceeded: thresholdValue50SendNotificationWhenExceeded
- }
- {
- thresholdId: '00000000-0000-0000-0000-000000000003'
- percentageThreshold: {
- thresholdValue: 75
- }
- displayOnChart: thresholdValue75DisplayOnChart
- sendNotificationWhenExceeded: thresholdValue75SendNotificationWhenExceeded
- }
- {
- thresholdId: '00000000-0000-0000-0000-000000000004'
- percentageThreshold: {
- thresholdValue: 100
- }
- displayOnChart: thresholdValue100DisplayOnChart
- sendNotificationWhenExceeded: thresholdValue100SendNotificationWhenExceeded
- }
- {
- thresholdId: '00000000-0000-0000-0000-000000000005'
- percentageThreshold: {
- thresholdValue: 125
- }
- displayOnChart: thresholdValue125DisplayOnChart
- sendNotificationWhenExceeded: thresholdValue125SendNotificationWhenExceeded
- }
- ]
- }
- }
-}
-
-@sys.description('The name of the cost.')
-output name string = cost.name
-
-@sys.description('The resource ID of the cost.')
-output resourceId string = cost.id
-
-@sys.description('The name of the resource group the cost was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/dev-test-lab/lab/cost/main.json b/modules/dev-test-lab/lab/cost/main.json
deleted file mode 100644
index 3ec2b33776..0000000000
--- a/modules/dev-test-lab/lab/cost/main.json
+++ /dev/null
@@ -1,304 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12104430168487418019"
- },
- "name": "DevTest Lab Costs",
- "description": "This module deploys a DevTest Lab Cost.\r\n\r\nManage lab costs by setting a spending target that can be viewed in the Monthly Estimated Cost Trend chart. DevTest Labs can send a notification when spending reaches the specified target threshold.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "cycleType": {
- "type": "string",
- "allowedValues": [
- "Custom",
- "CalendarMonth"
- ],
- "metadata": {
- "description": "Required. Reporting cycle type."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "cycleStartDateTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Reporting cycle start date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to \"Custom\"."
- }
- },
- "cycleEndDateTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Reporting cycle end date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to \"Custom\"."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost status."
- }
- },
- "target": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Lab target cost (e.g. 100). The target cost will appear in the \"Cost trend\" chart to allow tracking lab spending relative to the target cost for the current reporting cycleSetting the target cost to 0 will disable all thresholds."
- }
- },
- "currencyCode": {
- "type": "string",
- "defaultValue": "USD",
- "metadata": {
- "description": "Optional. The currency code of the cost."
- }
- },
- "thresholdValue25DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 25% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue25SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 25% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue50DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 50% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue50SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 50% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue75DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 75% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue75SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 75% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue100DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 100% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue100SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 100% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue125DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 125% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue125SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 125% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "cost": {
- "type": "Microsoft.DevTestLab/labs/costs",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), 'targetCost')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "currencyCode": "[parameters('currencyCode')]",
- "startDateTime": "[parameters('cycleStartDateTime')]",
- "endDateTime": "[parameters('cycleEndDateTime')]",
- "targetCost": {
- "target": "[parameters('target')]",
- "cycleStartDateTime": "[parameters('cycleStartDateTime')]",
- "cycleEndDateTime": "[parameters('cycleEndDateTime')]",
- "cycleType": "[parameters('cycleType')]",
- "status": "[parameters('status')]",
- "costThresholds": [
- {
- "thresholdId": "00000000-0000-0000-0000-000000000001",
- "percentageThreshold": {
- "thresholdValue": 25
- },
- "displayOnChart": "[parameters('thresholdValue25DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue25SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000002",
- "percentageThreshold": {
- "thresholdValue": 50
- },
- "displayOnChart": "[parameters('thresholdValue50DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue50SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000003",
- "percentageThreshold": {
- "thresholdValue": 75
- },
- "displayOnChart": "[parameters('thresholdValue75DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue75SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000004",
- "percentageThreshold": {
- "thresholdValue": 100
- },
- "displayOnChart": "[parameters('thresholdValue100DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue100SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000005",
- "percentageThreshold": {
- "thresholdValue": 125
- },
- "displayOnChart": "[parameters('thresholdValue125DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue125SendNotificationWhenExceeded')]"
- }
- ]
- }
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the cost."
- },
- "value": "targetCost"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the cost."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/costs', parameters('labName'), 'targetCost')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the cost was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/cost/version.json b/modules/dev-test-lab/lab/cost/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/cost/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/main.bicep b/modules/dev-test-lab/lab/main.bicep
deleted file mode 100644
index 75e9e340d9..0000000000
--- a/modules/dev-test-lab/lab/main.bicep
+++ /dev/null
@@ -1,362 +0,0 @@
-metadata name = 'DevTest Labs'
-metadata description = 'This module deploys a DevTest Lab.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the lab.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. The properties of any lab announcement associated with this lab.')
-param announcement object = {}
-
-@allowed([
- 'Contributor'
- 'Reader'
-])
-@description('Optional. The access rights to be granted to the user when provisioning an environment.')
-param environmentPermission string = 'Reader'
-
-@description('Optional. Extended properties of the lab used for experimental features.')
-param extendedProperties object = {}
-
-@allowed([
- 'Standard'
- 'StandardSSD'
- 'Premium'
-])
-@description('Optional. Type of storage used by the lab. It can be either Premium or Standard.')
-param labStorageType string = 'Premium'
-
-@description('Optional. The resource ID of the storage account used to store artifacts and images by the lab. Also used for defaultStorageAccount, defaultPremiumStorageAccount and premiumDataDiskStorageAccount properties. If left empty, a default storage account will be created by the lab and used.')
-param artifactsStorageAccount string = ''
-
-@description('Optional. The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.')
-param mandatoryArtifactsResourceIdsLinux array = []
-
-@description('Optional. The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.')
-param mandatoryArtifactsResourceIdsWindows array = []
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@description('Optional. The setting to enable usage of premium data disks. When its value is "Enabled", creation of standard or premium data disks is allowed. When its value is "Disabled", only creation of standard data disks is allowed. Default is "Disabled".')
-param premiumDataDisks string = 'Disabled'
-
-@description('Optional. The properties of any lab support message associated with this lab.')
-param support object = {}
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The resource ID(s) to assign to the virtual machines associated with this lab.')
-param managementIdentitiesResourceIds string[] = []
-
-@description('Optional. Resource Group allocation for virtual machines. If left empty, virtual machines will be deployed in their own Resource Groups. Default is the same Resource Group for DevTest Lab.')
-param vmCreationResourceGroupId string = resourceGroup().id
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@description('Optional. Enable browser connect on virtual machines if the lab\'s VNETs have configured Azure Bastion.')
-param browserConnect string = 'Disabled'
-
-@description('Optional. Disable auto upgrade custom script extension minor version.')
-param disableAutoUpgradeCseMinorVersion bool = false
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@description('Optional. Enable lab resources isolation from the public internet.')
-param isolateLabResources string = 'Enabled'
-
-@allowed([
- 'EncryptionAtRestWithPlatformKey'
- 'EncryptionAtRestWithCustomerKey'
-])
-@description('Optional. Specify how OS and data disks created as part of the lab are encrypted.')
-param encryptionType string = 'EncryptionAtRestWithPlatformKey'
-
-@description('Conditional. The Disk Encryption Set Resource ID used to encrypt OS and data disks created as part of the the lab. Required if encryptionType is set to "EncryptionAtRestWithCustomerKey".')
-param encryptionDiskEncryptionSetId string = ''
-
-@description('Optional. Virtual networks to create for the lab.')
-param virtualnetworks array = []
-
-@description('Optional. Policies to create for the lab.')
-param policies array = []
-
-@description('Optional. Schedules to create for the lab.')
-param schedules array = []
-
-@description('Conditional. Notification Channels to create for the lab. Required if the schedules property "notificationSettingsStatus" is set to "Enabled.')
-param notificationchannels array = []
-
-@description('Optional. Artifact sources to create for the lab.')
-param artifactsources array = []
-
-@description('Optional. Costs to create for the lab.')
-param costs object = {}
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: !empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned'
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : any(null)
-
-var formattedManagementIdentities = !empty(managementIdentitiesResourceIds) ? reduce(map((managementIdentitiesResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) : {} // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'DevTest Labs User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
- 'Virtual Machine Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-10-15-preview' = {
- name: name
- location: location
- tags: tags
- identity: identity
- properties: {
- artifactsStorageAccount: artifactsStorageAccount
- announcement: announcement
- environmentPermission: environmentPermission
- extendedProperties: extendedProperties
- labStorageType: labStorageType
- mandatoryArtifactsResourceIdsLinux: mandatoryArtifactsResourceIdsLinux
- mandatoryArtifactsResourceIdsWindows: mandatoryArtifactsResourceIdsWindows
- premiumDataDisks: premiumDataDisks
- support: support
- managementIdentities: formattedManagementIdentities
- vmCreationResourceGroupId: vmCreationResourceGroupId
- browserConnect: browserConnect
- disableAutoUpgradeCseMinorVersion: disableAutoUpgradeCseMinorVersion
- isolateLabResources: isolateLabResources
- encryption: {
- type: encryptionType
- diskEncryptionSetId: !empty(encryptionDiskEncryptionSetId) ? encryptionDiskEncryptionSetId : null
- }
- }
-}
-
-resource lab_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: lab
-}
-
-module lab_virtualNetworks 'virtualnetwork/main.bicep' = [for (virtualNetwork, index) in virtualnetworks: {
- name: '${uniqueString(deployment().name, location)}-Lab-VirtualNetwork-${index}'
- params: {
- labName: lab.name
- name: virtualNetwork.name
- tags: virtualNetwork.?tags ?? tags
- externalProviderResourceId: virtualNetwork.externalProviderResourceId
- description: contains(virtualNetwork, 'description') ? virtualNetwork.description : ''
- allowedSubnets: contains(virtualNetwork, 'allowedSubnets') ? virtualNetwork.allowedSubnets : []
- subnetOverrides: contains(virtualNetwork, 'subnetOverrides') ? virtualNetwork.subnetOverrides : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module lab_policies 'policyset/policy/main.bicep' = [for (policy, index) in policies: {
- name: '${uniqueString(deployment().name, location)}-Lab-PolicySets-Policy-${index}'
- params: {
- labName: lab.name
- name: policy.name
- tags: policy.?tags ?? tags
- description: contains(policy, 'description') ? policy.description : ''
- evaluatorType: policy.evaluatorType
- factData: contains(policy, 'factData') ? policy.factData : ''
- factName: policy.factName
- status: contains(policy, 'status') ? policy.status : 'Enabled'
- threshold: policy.threshold
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module lab_schedules 'schedule/main.bicep' = [for (schedule, index) in schedules: {
- name: '${uniqueString(deployment().name, location)}-Lab-Schedules-${index}'
- params: {
- labName: lab.name
- name: schedule.name
- tags: schedule.?tags ?? tags
- taskType: schedule.taskType
- dailyRecurrence: contains(schedule, 'dailyRecurrence') ? schedule.dailyRecurrence : {}
- hourlyRecurrence: contains(schedule, 'hourlyRecurrence') ? schedule.hourlyRecurrence : {}
- weeklyRecurrence: contains(schedule, 'weeklyRecurrence') ? schedule.weeklyRecurrence : {}
- status: contains(schedule, 'status') ? schedule.status : 'Enabled'
- targetResourceId: contains(schedule, 'targetResourceId') ? schedule.targetResourceId : ''
- timeZoneId: contains(schedule, 'timeZoneId') ? schedule.timeZoneId : 'Pacific Standard time'
- notificationSettingsStatus: contains(schedule, 'notificationSettingsStatus') ? schedule.notificationSettingsStatus : 'Disabled'
- notificationSettingsTimeInMinutes: contains(schedule, 'notificationSettingsTimeInMinutes') ? schedule.notificationSettingsTimeInMinutes : 30
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module lab_notificationChannels 'notificationchannel/main.bicep' = [for (notificationChannel, index) in notificationchannels: {
- name: '${uniqueString(deployment().name, location)}-Lab-NotificationChannels-${index}'
- params: {
- labName: lab.name
- name: notificationChannel.name
- tags: notificationChannel.?tags ?? tags
- description: contains(notificationChannel, 'description') ? notificationChannel.description : ''
- events: notificationChannel.events
- emailRecipient: contains(notificationChannel, 'emailRecipient') ? notificationChannel.emailRecipient : ''
- webHookUrl: contains(notificationChannel, 'webhookUrl') ? notificationChannel.webhookUrl : ''
- notificationLocale: contains(notificationChannel, 'notificationLocale') ? notificationChannel.notificationLocale : 'en'
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module lab_artifactSources 'artifactsource/main.bicep' = [for (artifactSource, index) in artifactsources: {
- name: '${uniqueString(deployment().name, location)}-Lab-ArtifactSources-${index}'
- params: {
- labName: lab.name
- name: artifactSource.name
- tags: artifactSource.?tags ?? tags
- displayName: contains(artifactSource, 'displayName') ? artifactSource.displayName : artifactSource.name
- branchRef: contains(artifactSource, 'branchRef') ? artifactSource.branchRef : ''
- folderPath: contains(artifactSource, 'folderPath') ? artifactSource.folderPath : ''
- armTemplateFolderPath: contains(artifactSource, 'armTemplateFolderPath') ? artifactSource.armTemplateFolderPath : ''
- sourceType: contains(artifactSource, 'sourceType') ? artifactSource.sourceType : ''
- status: contains(artifactSource, 'status') ? artifactSource.status : 'Enabled'
- uri: artifactSource.uri
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module lab_costs 'cost/main.bicep' = if (!empty(costs)) {
- name: '${uniqueString(deployment().name, location)}-Lab-Costs'
- params: {
- labName: lab.name
- tags: costs.?tags ?? tags
- currencyCode: contains(costs, 'currencyCode') ? costs.currencyCode : 'USD'
- cycleType: costs.cycleType
- cycleStartDateTime: contains(costs, 'cycleStartDateTime') ? costs.cycleStartDateTime : ''
- cycleEndDateTime: contains(costs, 'cycleEndDateTime') ? costs.cycleEndDateTime : ''
- status: contains(costs, 'status') ? costs.status : 'Enabled'
- target: contains(costs, 'target') ? costs.target : 0
- thresholdValue25DisplayOnChart: contains(costs, 'thresholdValue25DisplayOnChart') ? costs.thresholdValue25DisplayOnChart : 'Disabled'
- thresholdValue25SendNotificationWhenExceeded: contains(costs, 'thresholdValue25SendNotificationWhenExceeded') ? costs.thresholdValue25SendNotificationWhenExceeded : 'Disabled'
- thresholdValue50DisplayOnChart: contains(costs, 'thresholdValue50DisplayOnChart') ? costs.thresholdValue50DisplayOnChart : 'Disabled'
- thresholdValue50SendNotificationWhenExceeded: contains(costs, 'thresholdValue50SendNotificationWhenExceeded') ? costs.thresholdValue50SendNotificationWhenExceeded : 'Disabled'
- thresholdValue75DisplayOnChart: contains(costs, 'thresholdValue75DisplayOnChart') ? costs.thresholdValue75DisplayOnChart : 'Disabled'
- thresholdValue75SendNotificationWhenExceeded: contains(costs, 'thresholdValue75SendNotificationWhenExceeded') ? costs.thresholdValue75SendNotificationWhenExceeded : 'Disabled'
- thresholdValue100DisplayOnChart: contains(costs, 'thresholdValue100DisplayOnChart') ? costs.thresholdValue100DisplayOnChart : 'Disabled'
- thresholdValue100SendNotificationWhenExceeded: contains(costs, 'thresholdValue100SendNotificationWhenExceeded') ? costs.thresholdValue100SendNotificationWhenExceeded : 'Disabled'
- thresholdValue125DisplayOnChart: contains(costs, 'thresholdValue125DisplayOnChart') ? costs.thresholdValue125DisplayOnChart : 'Disabled'
- thresholdValue125SendNotificationWhenExceeded: contains(costs, 'thresholdValue125SendNotificationWhenExceeded') ? costs.thresholdValue125SendNotificationWhenExceeded : 'Disabled'
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-resource lab_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(lab.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: lab
-}]
-
-@description('The unique identifier for the lab. Used to track tags that the lab applies to each resource that it creates.')
-output uniqueIdentifier string = lab.properties.uniqueIdentifier
-
-@description('The resource group the lab was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The resource ID of the lab.')
-output resourceId string = lab.id
-
-@description('The name of the lab.')
-output name string = lab.name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = contains(lab.identity, 'principalId') ? lab.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = lab.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/dev-test-lab/lab/main.json b/modules/dev-test-lab/lab/main.json
deleted file mode 100644
index a5bb38da18..0000000000
--- a/modules/dev-test-lab/lab/main.json
+++ /dev/null
@@ -1,1835 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "335466902333101649"
- },
- "name": "DevTest Labs",
- "description": "This module deploys a DevTest Lab.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the lab."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "announcement": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of any lab announcement associated with this lab."
- }
- },
- "environmentPermission": {
- "type": "string",
- "defaultValue": "Reader",
- "allowedValues": [
- "Contributor",
- "Reader"
- ],
- "metadata": {
- "description": "Optional. The access rights to be granted to the user when provisioning an environment."
- }
- },
- "extendedProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Extended properties of the lab used for experimental features."
- }
- },
- "labStorageType": {
- "type": "string",
- "defaultValue": "Premium",
- "allowedValues": [
- "Standard",
- "StandardSSD",
- "Premium"
- ],
- "metadata": {
- "description": "Optional. Type of storage used by the lab. It can be either Premium or Standard."
- }
- },
- "artifactsStorageAccount": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the storage account used to store artifacts and images by the lab. Also used for defaultStorageAccount, defaultPremiumStorageAccount and premiumDataDiskStorageAccount properties. If left empty, a default storage account will be created by the lab and used."
- }
- },
- "mandatoryArtifactsResourceIdsLinux": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user."
- }
- },
- "mandatoryArtifactsResourceIdsWindows": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user."
- }
- },
- "premiumDataDisks": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. The setting to enable usage of premium data disks. When its value is \"Enabled\", creation of standard or premium data disks is allowed. When its value is \"Disabled\", only creation of standard data disks is allowed. Default is \"Disabled\"."
- }
- },
- "support": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of any lab support message associated with this lab."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "managementIdentitiesResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the virtual machines associated with this lab."
- }
- },
- "vmCreationResourceGroupId": {
- "type": "string",
- "defaultValue": "[resourceGroup().id]",
- "metadata": {
- "description": "Optional. Resource Group allocation for virtual machines. If left empty, virtual machines will be deployed in their own Resource Groups. Default is the same Resource Group for DevTest Lab."
- }
- },
- "browserConnect": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Enable browser connect on virtual machines if the lab's VNETs have configured Azure Bastion."
- }
- },
- "disableAutoUpgradeCseMinorVersion": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Disable auto upgrade custom script extension minor version."
- }
- },
- "isolateLabResources": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Enable lab resources isolation from the public internet."
- }
- },
- "encryptionType": {
- "type": "string",
- "defaultValue": "EncryptionAtRestWithPlatformKey",
- "allowedValues": [
- "EncryptionAtRestWithPlatformKey",
- "EncryptionAtRestWithCustomerKey"
- ],
- "metadata": {
- "description": "Optional. Specify how OS and data disks created as part of the lab are encrypted."
- }
- },
- "encryptionDiskEncryptionSetId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The Disk Encryption Set Resource ID used to encrypt OS and data disks created as part of the the lab. Required if encryptionType is set to \"EncryptionAtRestWithCustomerKey\"."
- }
- },
- "virtualnetworks": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Virtual networks to create for the lab."
- }
- },
- "policies": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Policies to create for the lab."
- }
- },
- "schedules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Schedules to create for the lab."
- }
- },
- "notificationchannels": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Conditional. Notification Channels to create for the lab. Required if the schedules property \"notificationSettingsStatus\" is set to \"Enabled."
- }
- },
- "artifactsources": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Artifact sources to create for the lab."
- }
- },
- "costs": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Costs to create for the lab."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "formattedManagementIdentities": "[if(not(empty(parameters('managementIdentitiesResourceIds'))), reduce(map(coalesce(parameters('managementIdentitiesResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next')))), createObject())]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DevTest Labs User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '76283e04-6283-4c54-8f91-bcf1374a3c64')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]",
- "Virtual Machine Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '9980e02c-c2be-4d73-94e8-173b1dc7cf3c')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-10-15-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "artifactsStorageAccount": "[parameters('artifactsStorageAccount')]",
- "announcement": "[parameters('announcement')]",
- "environmentPermission": "[parameters('environmentPermission')]",
- "extendedProperties": "[parameters('extendedProperties')]",
- "labStorageType": "[parameters('labStorageType')]",
- "mandatoryArtifactsResourceIdsLinux": "[parameters('mandatoryArtifactsResourceIdsLinux')]",
- "mandatoryArtifactsResourceIdsWindows": "[parameters('mandatoryArtifactsResourceIdsWindows')]",
- "premiumDataDisks": "[parameters('premiumDataDisks')]",
- "support": "[parameters('support')]",
- "managementIdentities": "[variables('formattedManagementIdentities')]",
- "vmCreationResourceGroupId": "[parameters('vmCreationResourceGroupId')]",
- "browserConnect": "[parameters('browserConnect')]",
- "disableAutoUpgradeCseMinorVersion": "[parameters('disableAutoUpgradeCseMinorVersion')]",
- "isolateLabResources": "[parameters('isolateLabResources')]",
- "encryption": {
- "type": "[parameters('encryptionType')]",
- "diskEncryptionSetId": "[if(not(empty(parameters('encryptionDiskEncryptionSetId'))), parameters('encryptionDiskEncryptionSetId'), null())]"
- }
- }
- },
- "lab_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DevTestLab/labs/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_roleAssignments": {
- "copy": {
- "name": "lab_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DevTestLab/labs/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DevTestLab/labs', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_virtualNetworks": {
- "copy": {
- "name": "lab_virtualNetworks",
- "count": "[length(parameters('virtualnetworks'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lab-VirtualNetwork-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "labName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('virtualnetworks')[copyIndex()].name]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('virtualnetworks')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "externalProviderResourceId": {
- "value": "[parameters('virtualnetworks')[copyIndex()].externalProviderResourceId]"
- },
- "description": "[if(contains(parameters('virtualnetworks')[copyIndex()], 'description'), createObject('value', parameters('virtualnetworks')[copyIndex()].description), createObject('value', ''))]",
- "allowedSubnets": "[if(contains(parameters('virtualnetworks')[copyIndex()], 'allowedSubnets'), createObject('value', parameters('virtualnetworks')[copyIndex()].allowedSubnets), createObject('value', createArray()))]",
- "subnetOverrides": "[if(contains(parameters('virtualnetworks')[copyIndex()], 'subnetOverrides'), createObject('value', parameters('virtualnetworks')[copyIndex()].subnetOverrides), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "2685254804143459925"
- },
- "name": "DevTest Lab Virtual Networks",
- "description": "This module deploys a DevTest Lab Virtual Network.\n\nLab virtual machines must be deployed into a virtual network. This resource type allows configuring the virtual network and subnet settings used for the lab virtual machines.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual network."
- }
- },
- "externalProviderResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the virtual network."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the virtual network."
- }
- },
- "allowedSubnets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The allowed subnets of the virtual network."
- }
- },
- "subnetOverrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The subnet overrides of the virtual network."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "virtualNetwork": {
- "type": "Microsoft.DevTestLab/labs/virtualnetworks",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('description')]",
- "externalProviderResourceId": "[parameters('externalProviderResourceId')]",
- "allowedSubnets": "[parameters('allowedSubnets')]",
- "subnetOverrides": "[parameters('subnetOverrides')]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lab virtual network."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lab virtual network."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/virtualnetworks', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the lab virtual network was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_policies": {
- "copy": {
- "name": "lab_policies",
- "count": "[length(parameters('policies'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lab-PolicySets-Policy-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "labName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('policies')[copyIndex()].name]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('policies')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "description": "[if(contains(parameters('policies')[copyIndex()], 'description'), createObject('value', parameters('policies')[copyIndex()].description), createObject('value', ''))]",
- "evaluatorType": {
- "value": "[parameters('policies')[copyIndex()].evaluatorType]"
- },
- "factData": "[if(contains(parameters('policies')[copyIndex()], 'factData'), createObject('value', parameters('policies')[copyIndex()].factData), createObject('value', ''))]",
- "factName": {
- "value": "[parameters('policies')[copyIndex()].factName]"
- },
- "status": "[if(contains(parameters('policies')[copyIndex()], 'status'), createObject('value', parameters('policies')[copyIndex()].status), createObject('value', 'Enabled'))]",
- "threshold": {
- "value": "[parameters('policies')[copyIndex()].threshold]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5652685942577853564"
- },
- "name": "DevTest Lab Policy Sets Policies",
- "description": "This module deploys a DevTest Lab Policy Sets Policy.\n\nDevTest lab policies are used to modify the lab settings such as only allowing certain VM Size SKUs, marketplace image types, number of VMs allowed per user and other settings.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "policySetName": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the parent policy set."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the policy."
- }
- },
- "tags": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy."
- }
- },
- "evaluatorType": {
- "type": "string",
- "allowedValues": [
- "AllowedValuesPolicy",
- "MaxValuePolicy"
- ],
- "metadata": {
- "description": "Required. The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy)."
- }
- },
- "factData": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The fact data of the policy."
- }
- },
- "factName": {
- "type": "string",
- "allowedValues": [
- "EnvironmentTemplate",
- "GalleryImage",
- "LabPremiumVmCount",
- "LabTargetCost",
- "LabVmCount",
- "LabVmSize",
- "ScheduleEditPermission",
- "UserOwnedLabPremiumVmCount",
- "UserOwnedLabVmCount",
- "UserOwnedLabVmCountInSubnet"
- ],
- "metadata": {
- "description": "Required. The fact name of the policy."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. The status of the policy."
- }
- },
- "threshold": {
- "type": "string",
- "metadata": {
- "description": "Required. The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy)."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DevTestLab/labs/policysets/policies",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}/{2}', parameters('labName'), parameters('policySetName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('description')]",
- "evaluatorType": "[parameters('evaluatorType')]",
- "factData": "[parameters('factData')]",
- "factName": "[parameters('factName')]",
- "status": "[parameters('status')]",
- "threshold": "[parameters('threshold')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the policy."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the policy."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/policysets/policies', parameters('labName'), parameters('policySetName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the policy was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_schedules": {
- "copy": {
- "name": "lab_schedules",
- "count": "[length(parameters('schedules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lab-Schedules-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "labName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('schedules')[copyIndex()].name]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('schedules')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "taskType": {
- "value": "[parameters('schedules')[copyIndex()].taskType]"
- },
- "dailyRecurrence": "[if(contains(parameters('schedules')[copyIndex()], 'dailyRecurrence'), createObject('value', parameters('schedules')[copyIndex()].dailyRecurrence), createObject('value', createObject()))]",
- "hourlyRecurrence": "[if(contains(parameters('schedules')[copyIndex()], 'hourlyRecurrence'), createObject('value', parameters('schedules')[copyIndex()].hourlyRecurrence), createObject('value', createObject()))]",
- "weeklyRecurrence": "[if(contains(parameters('schedules')[copyIndex()], 'weeklyRecurrence'), createObject('value', parameters('schedules')[copyIndex()].weeklyRecurrence), createObject('value', createObject()))]",
- "status": "[if(contains(parameters('schedules')[copyIndex()], 'status'), createObject('value', parameters('schedules')[copyIndex()].status), createObject('value', 'Enabled'))]",
- "targetResourceId": "[if(contains(parameters('schedules')[copyIndex()], 'targetResourceId'), createObject('value', parameters('schedules')[copyIndex()].targetResourceId), createObject('value', ''))]",
- "timeZoneId": "[if(contains(parameters('schedules')[copyIndex()], 'timeZoneId'), createObject('value', parameters('schedules')[copyIndex()].timeZoneId), createObject('value', 'Pacific Standard time'))]",
- "notificationSettingsStatus": "[if(contains(parameters('schedules')[copyIndex()], 'notificationSettingsStatus'), createObject('value', parameters('schedules')[copyIndex()].notificationSettingsStatus), createObject('value', 'Disabled'))]",
- "notificationSettingsTimeInMinutes": "[if(contains(parameters('schedules')[copyIndex()], 'notificationSettingsTimeInMinutes'), createObject('value', parameters('schedules')[copyIndex()].notificationSettingsTimeInMinutes), createObject('value', 30))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "1015942076148002236"
- },
- "name": "DevTest Lab Schedules",
- "description": "This module deploys a DevTest Lab Schedule.\n\nLab schedules are used to modify the settings for auto-shutdown, auto-start for lab virtual machines.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "allowedValues": [
- "LabVmsShutdown",
- "LabVmAutoStart"
- ],
- "metadata": {
- "description": "Required. The name of the schedule."
- }
- },
- "taskType": {
- "type": "string",
- "allowedValues": [
- "LabVmsShutdownTask",
- "LabVmsStartupTask"
- ],
- "metadata": {
- "description": "Required. The task type of the schedule (e.g. LabVmsShutdownTask, LabVmsStartupTask)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "dailyRecurrence": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. If the schedule will occur once each day of the week, specify the daily recurrence."
- }
- },
- "hourlyRecurrence": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. If the schedule will occur multiple times a day, specify the hourly recurrence."
- }
- },
- "weeklyRecurrence": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. If the schedule will occur only some days of the week, specify the weekly recurrence."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. The status of the schedule (i.e. Enabled, Disabled)."
- }
- },
- "targetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID to which the schedule belongs."
- }
- },
- "timeZoneId": {
- "type": "string",
- "defaultValue": "Pacific Standard time",
- "metadata": {
- "description": "Optional. The time zone ID (e.g. Pacific Standard time)."
- }
- },
- "notificationSettingsStatus": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. If notifications are enabled for this schedule (i.e. Enabled, Disabled)."
- }
- },
- "notificationSettingsTimeInMinutes": {
- "type": "int",
- "defaultValue": 30,
- "metadata": {
- "description": "Optional. Time in minutes before event at which notification will be sent. Optional if \"notificationSettingsStatus\" is set to \"Enabled\". Default is 30 minutes."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "schedule": {
- "type": "Microsoft.DevTestLab/labs/schedules",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "taskType": "[parameters('taskType')]",
- "dailyRecurrence": "[if(not(empty(parameters('dailyRecurrence'))), parameters('dailyRecurrence'), null())]",
- "hourlyRecurrence": "[if(not(empty(parameters('hourlyRecurrence'))), parameters('hourlyRecurrence'), null())]",
- "weeklyRecurrence": "[if(not(empty(parameters('weeklyRecurrence'))), parameters('weeklyRecurrence'), null())]",
- "status": "[parameters('status')]",
- "targetResourceId": "[if(not(empty(parameters('targetResourceId'))), parameters('targetResourceId'), null())]",
- "timeZoneId": "[parameters('timeZoneId')]",
- "notificationSettings": "[if(equals(parameters('notificationSettingsStatus'), 'Enabled'), createObject('status', parameters('notificationSettingsStatus'), 'timeInMinutes', parameters('notificationSettingsTimeInMinutes')), createObject())]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the schedule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the schedule."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/schedules', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the schedule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_notificationChannels": {
- "copy": {
- "name": "lab_notificationChannels",
- "count": "[length(parameters('notificationchannels'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lab-NotificationChannels-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "labName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('notificationchannels')[copyIndex()].name]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('notificationchannels')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "description": "[if(contains(parameters('notificationchannels')[copyIndex()], 'description'), createObject('value', parameters('notificationchannels')[copyIndex()].description), createObject('value', ''))]",
- "events": {
- "value": "[parameters('notificationchannels')[copyIndex()].events]"
- },
- "emailRecipient": "[if(contains(parameters('notificationchannels')[copyIndex()], 'emailRecipient'), createObject('value', parameters('notificationchannels')[copyIndex()].emailRecipient), createObject('value', ''))]",
- "webHookUrl": "[if(contains(parameters('notificationchannels')[copyIndex()], 'webhookUrl'), createObject('value', parameters('notificationchannels')[copyIndex()].webhookUrl), createObject('value', ''))]",
- "notificationLocale": "[if(contains(parameters('notificationchannels')[copyIndex()], 'notificationLocale'), createObject('value', parameters('notificationchannels')[copyIndex()].notificationLocale), createObject('value', 'en'))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "421100563759718119"
- },
- "name": "DevTest Lab Notification Channels",
- "description": "This module deploys a DevTest Lab Notification Channel.\n\nNotification channels are used by the schedule resource type in order to send notifications or events to email addresses and/or webhooks.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "allowedValues": [
- "autoShutdown",
- "costThreshold"
- ],
- "metadata": {
- "description": "Required. The name of the notification channel."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of notification."
- }
- },
- "events": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Required. The list of event for which this notification is enabled."
- }
- },
- "emailRecipient": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The email recipient to send notifications to (can be a list of semi-colon separated email addresses). Required if \"webHookUrl\" is empty."
- }
- },
- "webHookUrl": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The webhook URL to which the notification will be sent. Required if \"emailRecipient\" is empty."
- }
- },
- "notificationLocale": {
- "type": "string",
- "defaultValue": "en",
- "metadata": {
- "description": "Optional. The locale to use when sending a notification (fallback for unsupported languages is EN)."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "notificationChannel": {
- "type": "Microsoft.DevTestLab/labs/notificationchannels",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('description')]",
- "events": "[parameters('events')]",
- "emailRecipient": "[parameters('emailRecipient')]",
- "webHookUrl": "[parameters('webHookUrl')]",
- "notificationLocale": "[parameters('notificationLocale')]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the notification channel."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the notification channel."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/notificationchannels', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the notification channel was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_artifactSources": {
- "copy": {
- "name": "lab_artifactSources",
- "count": "[length(parameters('artifactsources'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lab-ArtifactSources-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "labName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('artifactsources')[copyIndex()].name]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('artifactsources')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "displayName": "[if(contains(parameters('artifactsources')[copyIndex()], 'displayName'), createObject('value', parameters('artifactsources')[copyIndex()].displayName), createObject('value', parameters('artifactsources')[copyIndex()].name))]",
- "branchRef": "[if(contains(parameters('artifactsources')[copyIndex()], 'branchRef'), createObject('value', parameters('artifactsources')[copyIndex()].branchRef), createObject('value', ''))]",
- "folderPath": "[if(contains(parameters('artifactsources')[copyIndex()], 'folderPath'), createObject('value', parameters('artifactsources')[copyIndex()].folderPath), createObject('value', ''))]",
- "armTemplateFolderPath": "[if(contains(parameters('artifactsources')[copyIndex()], 'armTemplateFolderPath'), createObject('value', parameters('artifactsources')[copyIndex()].armTemplateFolderPath), createObject('value', ''))]",
- "sourceType": "[if(contains(parameters('artifactsources')[copyIndex()], 'sourceType'), createObject('value', parameters('artifactsources')[copyIndex()].sourceType), createObject('value', ''))]",
- "status": "[if(contains(parameters('artifactsources')[copyIndex()], 'status'), createObject('value', parameters('artifactsources')[copyIndex()].status), createObject('value', 'Enabled'))]",
- "uri": {
- "value": "[parameters('artifactsources')[copyIndex()].uri]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7965418783863447380"
- },
- "name": "DevTest Lab Artifact Sources",
- "description": "This module deploys a DevTest Lab Artifact Source.\n\nAn artifact source allows you to create custom artifacts for the VMs in the lab, or use Azure Resource Manager templates to create a custom test environment. You must add a private Git repository for the artifacts or Resource Manager templates that your team creates. The repository can be hosted on GitHub or on Azure DevOps Services.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the artifact source."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "displayName": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. The artifact source's display name. Default is the name of the artifact source."
- }
- },
- "branchRef": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The artifact source's branch reference (e.g. main or master)."
- }
- },
- "folderPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The folder containing artifacts. At least one folder path is required. Required if \"armTemplateFolderPath\" is empty."
- }
- },
- "armTemplateFolderPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The folder containing Azure Resource Manager templates. Required if \"folderPath\" is empty."
- }
- },
- "securityToken": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The security token to authenticate to the artifact source."
- }
- },
- "sourceType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "GitHub",
- "StorageAccount",
- "VsoGit"
- ],
- "metadata": {
- "description": "Optional. The artifact source's type."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Indicates if the artifact source is enabled (values: Enabled, Disabled). Default is \"Enabled\"."
- }
- },
- "uri": {
- "type": "string",
- "metadata": {
- "description": "Required. The artifact source's URI."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "artifactsource": {
- "type": "Microsoft.DevTestLab/labs/artifactsources",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "displayName": "[parameters('displayName')]",
- "branchRef": "[if(not(empty(parameters('branchRef'))), parameters('branchRef'), null())]",
- "folderPath": "[if(not(empty(parameters('folderPath'))), parameters('folderPath'), null())]",
- "armTemplateFolderPath": "[if(not(empty(parameters('armTemplateFolderPath'))), parameters('armTemplateFolderPath'), null())]",
- "securityToken": "[if(not(empty(parameters('securityToken'))), parameters('securityToken'), null())]",
- "sourceType": "[if(not(empty(parameters('sourceType'))), parameters('sourceType'), null())]",
- "status": "[parameters('status')]",
- "uri": "[parameters('uri')]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the artifact source."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the artifact source."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/artifactsources', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the artifact source was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "lab"
- ]
- },
- "lab_costs": {
- "condition": "[not(empty(parameters('costs')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Lab-Costs', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "labName": {
- "value": "[parameters('name')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(parameters('costs'), 'tags'), parameters('tags'))]"
- },
- "currencyCode": "[if(contains(parameters('costs'), 'currencyCode'), createObject('value', parameters('costs').currencyCode), createObject('value', 'USD'))]",
- "cycleType": {
- "value": "[parameters('costs').cycleType]"
- },
- "cycleStartDateTime": "[if(contains(parameters('costs'), 'cycleStartDateTime'), createObject('value', parameters('costs').cycleStartDateTime), createObject('value', ''))]",
- "cycleEndDateTime": "[if(contains(parameters('costs'), 'cycleEndDateTime'), createObject('value', parameters('costs').cycleEndDateTime), createObject('value', ''))]",
- "status": "[if(contains(parameters('costs'), 'status'), createObject('value', parameters('costs').status), createObject('value', 'Enabled'))]",
- "target": "[if(contains(parameters('costs'), 'target'), createObject('value', parameters('costs').target), createObject('value', 0))]",
- "thresholdValue25DisplayOnChart": "[if(contains(parameters('costs'), 'thresholdValue25DisplayOnChart'), createObject('value', parameters('costs').thresholdValue25DisplayOnChart), createObject('value', 'Disabled'))]",
- "thresholdValue25SendNotificationWhenExceeded": "[if(contains(parameters('costs'), 'thresholdValue25SendNotificationWhenExceeded'), createObject('value', parameters('costs').thresholdValue25SendNotificationWhenExceeded), createObject('value', 'Disabled'))]",
- "thresholdValue50DisplayOnChart": "[if(contains(parameters('costs'), 'thresholdValue50DisplayOnChart'), createObject('value', parameters('costs').thresholdValue50DisplayOnChart), createObject('value', 'Disabled'))]",
- "thresholdValue50SendNotificationWhenExceeded": "[if(contains(parameters('costs'), 'thresholdValue50SendNotificationWhenExceeded'), createObject('value', parameters('costs').thresholdValue50SendNotificationWhenExceeded), createObject('value', 'Disabled'))]",
- "thresholdValue75DisplayOnChart": "[if(contains(parameters('costs'), 'thresholdValue75DisplayOnChart'), createObject('value', parameters('costs').thresholdValue75DisplayOnChart), createObject('value', 'Disabled'))]",
- "thresholdValue75SendNotificationWhenExceeded": "[if(contains(parameters('costs'), 'thresholdValue75SendNotificationWhenExceeded'), createObject('value', parameters('costs').thresholdValue75SendNotificationWhenExceeded), createObject('value', 'Disabled'))]",
- "thresholdValue100DisplayOnChart": "[if(contains(parameters('costs'), 'thresholdValue100DisplayOnChart'), createObject('value', parameters('costs').thresholdValue100DisplayOnChart), createObject('value', 'Disabled'))]",
- "thresholdValue100SendNotificationWhenExceeded": "[if(contains(parameters('costs'), 'thresholdValue100SendNotificationWhenExceeded'), createObject('value', parameters('costs').thresholdValue100SendNotificationWhenExceeded), createObject('value', 'Disabled'))]",
- "thresholdValue125DisplayOnChart": "[if(contains(parameters('costs'), 'thresholdValue125DisplayOnChart'), createObject('value', parameters('costs').thresholdValue125DisplayOnChart), createObject('value', 'Disabled'))]",
- "thresholdValue125SendNotificationWhenExceeded": "[if(contains(parameters('costs'), 'thresholdValue125SendNotificationWhenExceeded'), createObject('value', parameters('costs').thresholdValue125SendNotificationWhenExceeded), createObject('value', 'Disabled'))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14581778776350915706"
- },
- "name": "DevTest Lab Costs",
- "description": "This module deploys a DevTest Lab Cost.\n\nManage lab costs by setting a spending target that can be viewed in the Monthly Estimated Cost Trend chart. DevTest Labs can send a notification when spending reaches the specified target threshold.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "cycleType": {
- "type": "string",
- "allowedValues": [
- "Custom",
- "CalendarMonth"
- ],
- "metadata": {
- "description": "Required. Reporting cycle type."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "cycleStartDateTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Reporting cycle start date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to \"Custom\"."
- }
- },
- "cycleEndDateTime": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. Reporting cycle end date in the zulu time format (e.g. 2023-12-01T00:00:00.000Z). Required if cycleType is set to \"Custom\"."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost status."
- }
- },
- "target": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Lab target cost (e.g. 100). The target cost will appear in the \"Cost trend\" chart to allow tracking lab spending relative to the target cost for the current reporting cycleSetting the target cost to 0 will disable all thresholds."
- }
- },
- "currencyCode": {
- "type": "string",
- "defaultValue": "USD",
- "metadata": {
- "description": "Optional. The currency code of the cost."
- }
- },
- "thresholdValue25DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 25% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue25SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 25% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue50DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 50% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue50SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 50% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue75DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 75% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue75SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 75% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue100DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 100% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue100SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 100% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "thresholdValue125DisplayOnChart": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target Cost threshold at 125% display on chart. Indicates whether this threshold will be displayed on cost charts."
- }
- },
- "thresholdValue125SendNotificationWhenExceeded": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Target cost threshold at 125% send notification when exceeded. Indicates whether notifications will be sent when this threshold is exceeded."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "cost": {
- "type": "Microsoft.DevTestLab/labs/costs",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), 'targetCost')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "currencyCode": "[parameters('currencyCode')]",
- "startDateTime": "[parameters('cycleStartDateTime')]",
- "endDateTime": "[parameters('cycleEndDateTime')]",
- "targetCost": {
- "target": "[parameters('target')]",
- "cycleStartDateTime": "[parameters('cycleStartDateTime')]",
- "cycleEndDateTime": "[parameters('cycleEndDateTime')]",
- "cycleType": "[parameters('cycleType')]",
- "status": "[parameters('status')]",
- "costThresholds": [
- {
- "thresholdId": "00000000-0000-0000-0000-000000000001",
- "percentageThreshold": {
- "thresholdValue": 25
- },
- "displayOnChart": "[parameters('thresholdValue25DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue25SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000002",
- "percentageThreshold": {
- "thresholdValue": 50
- },
- "displayOnChart": "[parameters('thresholdValue50DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue50SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000003",
- "percentageThreshold": {
- "thresholdValue": 75
- },
- "displayOnChart": "[parameters('thresholdValue75DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue75SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000004",
- "percentageThreshold": {
- "thresholdValue": 100
- },
- "displayOnChart": "[parameters('thresholdValue100DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue100SendNotificationWhenExceeded')]"
- },
- {
- "thresholdId": "00000000-0000-0000-0000-000000000005",
- "percentageThreshold": {
- "thresholdValue": 125
- },
- "displayOnChart": "[parameters('thresholdValue125DisplayOnChart')]",
- "sendNotificationWhenExceeded": "[parameters('thresholdValue125SendNotificationWhenExceeded')]"
- }
- ]
- }
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the cost."
- },
- "value": "targetCost"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the cost."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/costs', parameters('labName'), 'targetCost')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the cost was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "uniqueIdentifier": {
- "type": "string",
- "metadata": {
- "description": "The unique identifier for the lab. Used to track tags that the lab applies to each resource that it creates."
- },
- "value": "[reference('lab').uniqueIdentifier]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the lab was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lab."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lab."
- },
- "value": "[parameters('name')]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(contains(reference('lab', '2018-10-15-preview', 'full').identity, 'principalId'), reference('lab', '2018-10-15-preview', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('lab', '2018-10-15-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/notificationchannel/README.md b/modules/dev-test-lab/lab/notificationchannel/README.md
deleted file mode 100644
index fa378b420e..0000000000
--- a/modules/dev-test-lab/lab/notificationchannel/README.md
+++ /dev/null
@@ -1,133 +0,0 @@
-# DevTest Lab Notification Channels `[Microsoft.DevTestLab/labs/notificationchannels]`
-
-This module deploys a DevTest Lab Notification Channel.
-
-Notification channels are used by the schedule resource type in order to send notifications or events to email addresses and/or webhooks.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DevTestLab/labs/notificationchannels` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/notificationchannels) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`events`](#parameter-events) | array | The list of event for which this notification is enabled. |
-| [`name`](#parameter-name) | string | The name of the notification channel. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`emailRecipient`](#parameter-emailrecipient) | string | The email recipient to send notifications to (can be a list of semi-colon separated email addresses). Required if "webHookUrl" is empty. |
-| [`labName`](#parameter-labname) | string | The name of the parent lab. Required if the template is used in a standalone deployment. |
-| [`webHookUrl`](#parameter-webhookurl) | string | The webhook URL to which the notification will be sent. Required if "emailRecipient" is empty. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | Description of notification. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`notificationLocale`](#parameter-notificationlocale) | string | The locale to use when sending a notification (fallback for unsupported languages is EN). |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `events`
-
-The list of event for which this notification is enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `name`
-
-The name of the notification channel.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'autoShutdown'
- 'costThreshold'
- ]
- ```
-
-### Parameter: `emailRecipient`
-
-The email recipient to send notifications to (can be a list of semi-colon separated email addresses). Required if "webHookUrl" is empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `labName`
-
-The name of the parent lab. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `webHookUrl`
-
-The webhook URL to which the notification will be sent. Required if "emailRecipient" is empty.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `description`
-
-Description of notification.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `notificationLocale`
-
-The locale to use when sending a notification (fallback for unsupported languages is EN).
-
-- Required: No
-- Type: string
-- Default: `'en'`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the notification channel. |
-| `resourceGroupName` | string | The name of the resource group the notification channel was created in. |
-| `resourceId` | string | The resource ID of the notification channel. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/dev-test-lab/lab/notificationchannel/main.bicep b/modules/dev-test-lab/lab/notificationchannel/main.bicep
deleted file mode 100644
index cae5615737..0000000000
--- a/modules/dev-test-lab/lab/notificationchannel/main.bicep
+++ /dev/null
@@ -1,74 +0,0 @@
-metadata name = 'DevTest Lab Notification Channels'
-metadata description = '''This module deploys a DevTest Lab Notification Channel.
-
-Notification channels are used by the schedule resource type in order to send notifications or events to email addresses and/or webhooks.'''
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent lab. Required if the template is used in a standalone deployment.')
-param labName string
-
-@allowed([
- 'autoShutdown'
- 'costThreshold'
-])
-@sys.description('Required. The name of the notification channel.')
-param name string
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. Description of notification.')
-param description string = ''
-
-@sys.description('Required. The list of event for which this notification is enabled.')
-param events array = []
-
-@sys.description('Conditional. The email recipient to send notifications to (can be a list of semi-colon separated email addresses). Required if "webHookUrl" is empty.')
-param emailRecipient string = ''
-
-@sys.description('Conditional. The webhook URL to which the notification will be sent. Required if "emailRecipient" is empty.')
-param webHookUrl string = ''
-
-@sys.description('Optional. The locale to use when sending a notification (fallback for unsupported languages is EN).')
-param notificationLocale string = 'en'
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
- name: labName
-}
-
-resource notificationChannel 'Microsoft.DevTestLab/labs/notificationchannels@2018-09-15' = {
- name: name
- parent: lab
- tags: tags
- properties: {
- description: description
- events: events
- emailRecipient: emailRecipient
- webHookUrl: webHookUrl
- notificationLocale: notificationLocale
- }
-}
-
-@sys.description('The name of the notification channel.')
-output name string = notificationChannel.name
-
-@sys.description('The resource ID of the notification channel.')
-output resourceId string = notificationChannel.id
-
-@sys.description('The name of the resource group the notification channel was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/dev-test-lab/lab/notificationchannel/main.json b/modules/dev-test-lab/lab/notificationchannel/main.json
deleted file mode 100644
index bfab5a4069..0000000000
--- a/modules/dev-test-lab/lab/notificationchannel/main.json
+++ /dev/null
@@ -1,143 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5225332129791836269"
- },
- "name": "DevTest Lab Notification Channels",
- "description": "This module deploys a DevTest Lab Notification Channel.\r\n\r\nNotification channels are used by the schedule resource type in order to send notifications or events to email addresses and/or webhooks.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "allowedValues": [
- "autoShutdown",
- "costThreshold"
- ],
- "metadata": {
- "description": "Required. The name of the notification channel."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of notification."
- }
- },
- "events": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Required. The list of event for which this notification is enabled."
- }
- },
- "emailRecipient": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The email recipient to send notifications to (can be a list of semi-colon separated email addresses). Required if \"webHookUrl\" is empty."
- }
- },
- "webHookUrl": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The webhook URL to which the notification will be sent. Required if \"emailRecipient\" is empty."
- }
- },
- "notificationLocale": {
- "type": "string",
- "defaultValue": "en",
- "metadata": {
- "description": "Optional. The locale to use when sending a notification (fallback for unsupported languages is EN)."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "notificationChannel": {
- "type": "Microsoft.DevTestLab/labs/notificationchannels",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('description')]",
- "events": "[parameters('events')]",
- "emailRecipient": "[parameters('emailRecipient')]",
- "webHookUrl": "[parameters('webHookUrl')]",
- "notificationLocale": "[parameters('notificationLocale')]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the notification channel."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the notification channel."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/notificationchannels', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the notification channel was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/notificationchannel/version.json b/modules/dev-test-lab/lab/notificationchannel/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/notificationchannel/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/policyset/policy/README.md b/modules/dev-test-lab/lab/policyset/policy/README.md
deleted file mode 100644
index 0cc9ece256..0000000000
--- a/modules/dev-test-lab/lab/policyset/policy/README.md
+++ /dev/null
@@ -1,171 +0,0 @@
-# DevTest Lab Policy Sets Policies `[Microsoft.DevTestLab/labs/policysets/policies]`
-
-This module deploys a DevTest Lab Policy Sets Policy.
-
-DevTest lab policies are used to modify the lab settings such as only allowing certain VM Size SKUs, marketplace image types, number of VMs allowed per user and other settings.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DevTestLab/labs/policysets/policies` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/policysets/policies) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`evaluatorType`](#parameter-evaluatortype) | string | The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy). |
-| [`factName`](#parameter-factname) | string | The fact name of the policy. |
-| [`name`](#parameter-name) | string | The name of the policy. |
-| [`threshold`](#parameter-threshold) | string | The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy). |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`labName`](#parameter-labname) | string | The name of the parent lab. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`description`](#parameter-description) | string | The description of the policy. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`factData`](#parameter-factdata) | string | The fact data of the policy. |
-| [`policySetName`](#parameter-policysetname) | string | The name of the parent policy set. |
-| [`status`](#parameter-status) | string | The status of the policy. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `evaluatorType`
-
-The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AllowedValuesPolicy'
- 'MaxValuePolicy'
- ]
- ```
-
-### Parameter: `factName`
-
-The fact name of the policy.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'EnvironmentTemplate'
- 'GalleryImage'
- 'LabPremiumVmCount'
- 'LabTargetCost'
- 'LabVmCount'
- 'LabVmSize'
- 'ScheduleEditPermission'
- 'UserOwnedLabPremiumVmCount'
- 'UserOwnedLabVmCount'
- 'UserOwnedLabVmCountInSubnet'
- ]
- ```
-
-### Parameter: `name`
-
-The name of the policy.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `threshold`
-
-The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
-
-- Required: Yes
-- Type: string
-
-### Parameter: `labName`
-
-The name of the parent lab. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `description`
-
-The description of the policy.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `factData`
-
-The fact data of the policy.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `policySetName`
-
-The name of the parent policy set.
-
-- Required: No
-- Type: string
-- Default: `'default'`
-
-### Parameter: `status`
-
-The status of the policy.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the policy. |
-| `resourceGroupName` | string | The name of the resource group the policy was created in. |
-| `resourceId` | string | The resource ID of the policy. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/dev-test-lab/lab/policyset/policy/main.bicep b/modules/dev-test-lab/lab/policyset/policy/main.bicep
deleted file mode 100644
index e76ee76f9b..0000000000
--- a/modules/dev-test-lab/lab/policyset/policy/main.bicep
+++ /dev/null
@@ -1,101 +0,0 @@
-metadata name = 'DevTest Lab Policy Sets Policies'
-metadata description = '''This module deploys a DevTest Lab Policy Sets Policy.
-
-DevTest lab policies are used to modify the lab settings such as only allowing certain VM Size SKUs, marketplace image types, number of VMs allowed per user and other settings.'''
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent lab. Required if the template is used in a standalone deployment.')
-param labName string
-
-@sys.description('Optional. The name of the parent policy set.')
-param policySetName string = 'default'
-
-@sys.description('Required. The name of the policy.')
-param name string
-
-@sys.description('Optional. Tags of the resource.')
-param tags object = {}
-
-@sys.description('Optional. The description of the policy.')
-param description string = ''
-
-@allowed([
- 'AllowedValuesPolicy'
- 'MaxValuePolicy'
-])
-@sys.description('Required. The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).')
-param evaluatorType string
-
-@sys.description('Optional. The fact data of the policy.')
-param factData string = ''
-
-@allowed([
- 'EnvironmentTemplate'
- 'GalleryImage'
- 'LabPremiumVmCount'
- 'LabTargetCost'
- 'LabVmCount'
- 'LabVmSize'
- 'ScheduleEditPermission'
- 'UserOwnedLabPremiumVmCount'
- 'UserOwnedLabVmCount'
- 'UserOwnedLabVmCountInSubnet'
-])
-@sys.description('Required. The fact name of the policy.')
-param factName string
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@sys.description('Optional. The status of the policy.')
-param status string = 'Enabled'
-
-@sys.description('Required. The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).')
-param threshold string
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
- name: labName
-
- resource policySets 'policysets@2018-09-15' existing = {
- name: policySetName
- }
-}
-
-resource policy 'Microsoft.DevTestLab/labs/policysets/policies@2018-09-15' = {
- name: name
- parent: lab::policySets
- tags: tags
- properties: {
- description: description
- evaluatorType: evaluatorType
- factData: factData
- factName: factName
- status: status
- threshold: threshold
- }
-}
-
-@sys.description('The name of the policy.')
-output name string = policy.name
-
-@sys.description('The resource ID of the policy.')
-output resourceId string = policy.id
-
-@sys.description('The name of the resource group the policy was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/dev-test-lab/lab/policyset/policy/main.json b/modules/dev-test-lab/lab/policyset/policy/main.json
deleted file mode 100644
index 18e4b827e3..0000000000
--- a/modules/dev-test-lab/lab/policyset/policy/main.json
+++ /dev/null
@@ -1,161 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "7402281637422771358"
- },
- "name": "DevTest Lab Policy Sets Policies",
- "description": "This module deploys a DevTest Lab Policy Sets Policy.\r\n\r\nDevTest lab policies are used to modify the lab settings such as only allowing certain VM Size SKUs, marketplace image types, number of VMs allowed per user and other settings.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "policySetName": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the parent policy set."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the policy."
- }
- },
- "tags": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the policy."
- }
- },
- "evaluatorType": {
- "type": "string",
- "allowedValues": [
- "AllowedValuesPolicy",
- "MaxValuePolicy"
- ],
- "metadata": {
- "description": "Required. The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy)."
- }
- },
- "factData": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The fact data of the policy."
- }
- },
- "factName": {
- "type": "string",
- "allowedValues": [
- "EnvironmentTemplate",
- "GalleryImage",
- "LabPremiumVmCount",
- "LabTargetCost",
- "LabVmCount",
- "LabVmSize",
- "ScheduleEditPermission",
- "UserOwnedLabPremiumVmCount",
- "UserOwnedLabVmCount",
- "UserOwnedLabVmCountInSubnet"
- ],
- "metadata": {
- "description": "Required. The fact name of the policy."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. The status of the policy."
- }
- },
- "threshold": {
- "type": "string",
- "metadata": {
- "description": "Required. The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy)."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DevTestLab/labs/policysets/policies",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}/{2}', parameters('labName'), parameters('policySetName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('description')]",
- "evaluatorType": "[parameters('evaluatorType')]",
- "factData": "[parameters('factData')]",
- "factName": "[parameters('factName')]",
- "status": "[parameters('status')]",
- "threshold": "[parameters('threshold')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the policy."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the policy."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/policysets/policies', parameters('labName'), parameters('policySetName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the policy was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/policyset/policy/version.json b/modules/dev-test-lab/lab/policyset/policy/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/policyset/policy/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/schedule/README.md b/modules/dev-test-lab/lab/schedule/README.md
deleted file mode 100644
index ba6b6479ba..0000000000
--- a/modules/dev-test-lab/lab/schedule/README.md
+++ /dev/null
@@ -1,189 +0,0 @@
-# DevTest Lab Schedules `[Microsoft.DevTestLab/labs/schedules]`
-
-This module deploys a DevTest Lab Schedule.
-
-Lab schedules are used to modify the settings for auto-shutdown, auto-start for lab virtual machines.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DevTestLab/labs/schedules` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/schedules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the schedule. |
-| [`taskType`](#parameter-tasktype) | string | The task type of the schedule (e.g. LabVmsShutdownTask, LabVmsStartupTask). |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`labName`](#parameter-labname) | string | The name of the parent lab. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dailyRecurrence`](#parameter-dailyrecurrence) | object | If the schedule will occur once each day of the week, specify the daily recurrence. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`hourlyRecurrence`](#parameter-hourlyrecurrence) | object | If the schedule will occur multiple times a day, specify the hourly recurrence. |
-| [`notificationSettingsStatus`](#parameter-notificationsettingsstatus) | string | If notifications are enabled for this schedule (i.e. Enabled, Disabled). |
-| [`notificationSettingsTimeInMinutes`](#parameter-notificationsettingstimeinminutes) | int | Time in minutes before event at which notification will be sent. Optional if "notificationSettingsStatus" is set to "Enabled". Default is 30 minutes. |
-| [`status`](#parameter-status) | string | The status of the schedule (i.e. Enabled, Disabled). |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`targetResourceId`](#parameter-targetresourceid) | string | The resource ID to which the schedule belongs. |
-| [`timeZoneId`](#parameter-timezoneid) | string | The time zone ID (e.g. Pacific Standard time). |
-| [`weeklyRecurrence`](#parameter-weeklyrecurrence) | object | If the schedule will occur only some days of the week, specify the weekly recurrence. |
-
-### Parameter: `name`
-
-The name of the schedule.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'LabVmAutoStart'
- 'LabVmsShutdown'
- ]
- ```
-
-### Parameter: `taskType`
-
-The task type of the schedule (e.g. LabVmsShutdownTask, LabVmsStartupTask).
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'LabVmsShutdownTask'
- 'LabVmsStartupTask'
- ]
- ```
-
-### Parameter: `labName`
-
-The name of the parent lab. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `dailyRecurrence`
-
-If the schedule will occur once each day of the week, specify the daily recurrence.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `hourlyRecurrence`
-
-If the schedule will occur multiple times a day, specify the hourly recurrence.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `notificationSettingsStatus`
-
-If notifications are enabled for this schedule (i.e. Enabled, Disabled).
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `notificationSettingsTimeInMinutes`
-
-Time in minutes before event at which notification will be sent. Optional if "notificationSettingsStatus" is set to "Enabled". Default is 30 minutes.
-
-- Required: No
-- Type: int
-- Default: `30`
-
-### Parameter: `status`
-
-The status of the schedule (i.e. Enabled, Disabled).
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `targetResourceId`
-
-The resource ID to which the schedule belongs.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `timeZoneId`
-
-The time zone ID (e.g. Pacific Standard time).
-
-- Required: No
-- Type: string
-- Default: `'Pacific Standard time'`
-
-### Parameter: `weeklyRecurrence`
-
-If the schedule will occur only some days of the week, specify the weekly recurrence.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the schedule. |
-| `resourceGroupName` | string | The name of the resource group the schedule was created in. |
-| `resourceId` | string | The resource ID of the schedule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/dev-test-lab/lab/schedule/main.bicep b/modules/dev-test-lab/lab/schedule/main.bicep
deleted file mode 100644
index 7b4df85c7b..0000000000
--- a/modules/dev-test-lab/lab/schedule/main.bicep
+++ /dev/null
@@ -1,104 +0,0 @@
-metadata name = 'DevTest Lab Schedules'
-metadata description = '''This module deploys a DevTest Lab Schedule.
-
-Lab schedules are used to modify the settings for auto-shutdown, auto-start for lab virtual machines.'''
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent lab. Required if the template is used in a standalone deployment.')
-param labName string
-
-@allowed([
- 'LabVmsShutdown'
- 'LabVmAutoStart'
-])
-@sys.description('Required. The name of the schedule.')
-param name string
-
-@allowed([
- 'LabVmsShutdownTask'
- 'LabVmsStartupTask'
-])
-@sys.description('Required. The task type of the schedule (e.g. LabVmsShutdownTask, LabVmsStartupTask).')
-param taskType string
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. If the schedule will occur once each day of the week, specify the daily recurrence.')
-param dailyRecurrence object = {}
-
-@sys.description('Optional. If the schedule will occur multiple times a day, specify the hourly recurrence.')
-param hourlyRecurrence object = {}
-
-@sys.description('Optional. If the schedule will occur only some days of the week, specify the weekly recurrence.')
-param weeklyRecurrence object = {}
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. The status of the schedule (i.e. Enabled, Disabled).')
-param status string = 'Enabled'
-
-@sys.description('Optional. The resource ID to which the schedule belongs.')
-param targetResourceId string = ''
-
-@sys.description('Optional. The time zone ID (e.g. Pacific Standard time).')
-param timeZoneId string = 'Pacific Standard time'
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@sys.description('Optional. If notifications are enabled for this schedule (i.e. Enabled, Disabled).')
-param notificationSettingsStatus string = 'Disabled'
-
-@sys.description('Optional. Time in minutes before event at which notification will be sent. Optional if "notificationSettingsStatus" is set to "Enabled". Default is 30 minutes.')
-param notificationSettingsTimeInMinutes int = 30
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
- name: labName
-}
-
-resource schedule 'Microsoft.DevTestLab/labs/schedules@2018-09-15' = {
- name: name
- parent: lab
- tags: tags
- properties: {
- taskType: taskType
- dailyRecurrence: !empty(dailyRecurrence) ? dailyRecurrence : null
- hourlyRecurrence: !empty(hourlyRecurrence) ? hourlyRecurrence : null
- weeklyRecurrence: !empty(weeklyRecurrence) ? weeklyRecurrence : null
- status: status
- targetResourceId: !empty(targetResourceId) ? targetResourceId : null
- timeZoneId: timeZoneId
- notificationSettings: notificationSettingsStatus == 'Enabled' ? {
- status: notificationSettingsStatus
- timeInMinutes: notificationSettingsTimeInMinutes
- } : {}
- }
-}
-
-@sys.description('The name of the schedule.')
-output name string = schedule.name
-
-@sys.description('The resource ID of the schedule.')
-output resourceId string = schedule.id
-
-@sys.description('The name of the resource group the schedule was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/dev-test-lab/lab/schedule/main.json b/modules/dev-test-lab/lab/schedule/main.json
deleted file mode 100644
index dbbccd0c7e..0000000000
--- a/modules/dev-test-lab/lab/schedule/main.json
+++ /dev/null
@@ -1,185 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10592511541548002212"
- },
- "name": "DevTest Lab Schedules",
- "description": "This module deploys a DevTest Lab Schedule.\r\n\r\nLab schedules are used to modify the settings for auto-shutdown, auto-start for lab virtual machines.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "allowedValues": [
- "LabVmsShutdown",
- "LabVmAutoStart"
- ],
- "metadata": {
- "description": "Required. The name of the schedule."
- }
- },
- "taskType": {
- "type": "string",
- "allowedValues": [
- "LabVmsShutdownTask",
- "LabVmsStartupTask"
- ],
- "metadata": {
- "description": "Required. The task type of the schedule (e.g. LabVmsShutdownTask, LabVmsStartupTask)."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "dailyRecurrence": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. If the schedule will occur once each day of the week, specify the daily recurrence."
- }
- },
- "hourlyRecurrence": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. If the schedule will occur multiple times a day, specify the hourly recurrence."
- }
- },
- "weeklyRecurrence": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. If the schedule will occur only some days of the week, specify the weekly recurrence."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. The status of the schedule (i.e. Enabled, Disabled)."
- }
- },
- "targetResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID to which the schedule belongs."
- }
- },
- "timeZoneId": {
- "type": "string",
- "defaultValue": "Pacific Standard time",
- "metadata": {
- "description": "Optional. The time zone ID (e.g. Pacific Standard time)."
- }
- },
- "notificationSettingsStatus": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. If notifications are enabled for this schedule (i.e. Enabled, Disabled)."
- }
- },
- "notificationSettingsTimeInMinutes": {
- "type": "int",
- "defaultValue": 30,
- "metadata": {
- "description": "Optional. Time in minutes before event at which notification will be sent. Optional if \"notificationSettingsStatus\" is set to \"Enabled\". Default is 30 minutes."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "schedule": {
- "type": "Microsoft.DevTestLab/labs/schedules",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "taskType": "[parameters('taskType')]",
- "dailyRecurrence": "[if(not(empty(parameters('dailyRecurrence'))), parameters('dailyRecurrence'), null())]",
- "hourlyRecurrence": "[if(not(empty(parameters('hourlyRecurrence'))), parameters('hourlyRecurrence'), null())]",
- "weeklyRecurrence": "[if(not(empty(parameters('weeklyRecurrence'))), parameters('weeklyRecurrence'), null())]",
- "status": "[parameters('status')]",
- "targetResourceId": "[if(not(empty(parameters('targetResourceId'))), parameters('targetResourceId'), null())]",
- "timeZoneId": "[parameters('timeZoneId')]",
- "notificationSettings": "[if(equals(parameters('notificationSettingsStatus'), 'Enabled'), createObject('status', parameters('notificationSettingsStatus'), 'timeInMinutes', parameters('notificationSettingsTimeInMinutes')), createObject())]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the schedule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the schedule."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/schedules', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the schedule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/schedule/version.json b/modules/dev-test-lab/lab/schedule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/schedule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/tests/e2e/defaults/main.test.bicep b/modules/dev-test-lab/lab/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 9a583e7a24..0000000000
--- a/modules/dev-test-lab/lab/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-devtestlab.labs-${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 = 'dtllmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- enableDefaultTelemetry: enableDefaultTelemetry
- }
-}]
diff --git a/modules/dev-test-lab/lab/tests/e2e/max/dependencies.bicep b/modules/dev-test-lab/lab/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 10d28c8ae6..0000000000
--- a/modules/dev-test-lab/lab/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,134 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Disk Encryption Set to create.')
-param diskEncryptionSetName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required for encrption to work
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2021-04-01' = {
- name: diskEncryptionSetName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- activeKey: {
- sourceVault: {
- id: keyVault.id
- }
- keyUrl: keyVault::key.properties.keyUriWithVersion
- }
- encryptionType: 'EncryptionAtRestWithCustomerKey'
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${diskEncryptionSet.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: diskEncryptionSet.identity.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') // Key Vault Crypto Service Encryption User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- kind: 'StorageV2'
- sku: {
- name: 'Standard_LRS'
- }
- properties: {
- allowBlobPublicAccess: false
- publicNetworkAccess: 'Disabled'
- }
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-@description('The name of the created Virtual Network.')
-output virtualNetworkName string = virtualNetwork.name
-
-@description('The resource ID of the created Virtual Network.')
-output virtualNetworkResourceId string = virtualNetwork.id
-
-@description('The name of the created Virtual Network Subnet.')
-output subnetName string = virtualNetwork.properties.subnets[0].name
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Disk Encryption Set.')
-output diskEncryptionSetResourceId string = diskEncryptionSet.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/dev-test-lab/lab/tests/e2e/max/main.test.bicep b/modules/dev-test-lab/lab/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 21a1faa4f9..0000000000
--- a/modules/dev-test-lab/lab/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,297 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-devtestlab.labs-${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 = 'dtllmax'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- location: resourceGroup.location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'DevTest Lab'
- labName: '${namePrefix}${serviceShort}001'
- }
- announcement: {
- enabled: 'Enabled'
- expirationDate: '2025-12-30T13:00:00.000Z'
- markdown: 'DevTest Lab announcement text.
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Digital Twin Instance. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`eventGridEndpoint`](#parameter-eventgridendpoint) | object | Event Grid Endpoint. |
-| [`eventHubEndpoint`](#parameter-eventhubendpoint) | object | Event Hub Endpoint. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`serviceBusEndpoint`](#parameter-servicebusendpoint) | object | Service Bus Endpoint. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `name`
-
-The name of the Digital Twin Instance.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventGridEndpoint`
-
-Event Grid Endpoint.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `eventHubEndpoint`
-
-Event Hub Endpoint.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `serviceBusEndpoint`
-
-Service Bus Endpoint.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `hostname` | string | The hostname of the Digital Twins Instance. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Digital Twins Instance. |
-| `resourceGroupName` | string | The name of the resource group the resource was created in. |
-| `resourceId` | string | The resource ID of the Digital Twins Instance. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/README.md b/modules/digital-twins/digital-twins-instance/endpoint--event-grid/README.md
deleted file mode 100644
index 7c0b4fd0a5..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/README.md
+++ /dev/null
@@ -1,106 +0,0 @@
-# Digital Twins Instance Event Grid Endpoints `[Microsoft.DigitalTwins/digitalTwinsInstances/endpoints]`
-
-This module deploys a Digital Twins Instance Event Grid Endpoint.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DigitalTwins/digitalTwinsInstances/endpoints` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DigitalTwins/2023-01-31/digitalTwinsInstances/endpoints) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventGridDomainResourceId`](#parameter-eventgriddomainresourceid) | string | The resource ID of the Event Grid to get access keys from. |
-| [`topicEndpoint`](#parameter-topicendpoint) | string | EventGrid Topic Endpoint. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`digitalTwinInstanceName`](#parameter-digitaltwininstancename) | string | The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`deadLetterSecret`](#parameter-deadlettersecret) | securestring | Dead letter storage secret for key-based authentication. Will be obfuscated during read. |
-| [`deadLetterUri`](#parameter-deadletteruri) | string | Dead letter storage URL for identity-based authentication. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`name`](#parameter-name) | string | The name of the Digital Twin Endpoint. |
-
-### Parameter: `eventGridDomainResourceId`
-
-The resource ID of the Event Grid to get access keys from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `topicEndpoint`
-
-EventGrid Topic Endpoint.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `digitalTwinInstanceName`
-
-The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `deadLetterSecret`
-
-Dead letter storage secret for key-based authentication. Will be obfuscated during read.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `deadLetterUri`
-
-Dead letter storage URL for identity-based authentication.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `name`
-
-The name of the Digital Twin Endpoint.
-
-- Required: No
-- Type: string
-- Default: `'EventGridEndpoint'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the Endpoint. |
-| `resourceGroupName` | string | The name of the resource group the resource was created in. |
-| `resourceId` | string | The resource ID of the Endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/main.bicep b/modules/digital-twins/digital-twins-instance/endpoint--event-grid/main.bicep
deleted file mode 100644
index 454d2e5525..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/main.bicep
+++ /dev/null
@@ -1,64 +0,0 @@
-metadata name = 'Digital Twins Instance Event Grid Endpoints'
-metadata description = 'This module deploys a Digital Twins Instance Event Grid Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. The name of the Digital Twin Endpoint.')
-param name string = 'EventGridEndpoint'
-
-@description('Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment.')
-param digitalTwinInstanceName string
-
-@description('Required. EventGrid Topic Endpoint.')
-param topicEndpoint string
-
-@description('Required. The resource ID of the Event Grid to get access keys from.')
-param eventGridDomainResourceId string
-
-@description('Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read.')
-@secure()
-param deadLetterSecret string = ''
-
-@description('Optional. Dead letter storage URL for identity-based authentication.')
-param deadLetterUri string = ''
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource digitalTwinsInstance 'Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31' existing = {
- name: digitalTwinInstanceName
-}
-
-resource endpoint 'Microsoft.DigitalTwins/digitalTwinsInstances/endpoints@2023-01-31' = {
- name: name
- parent: digitalTwinsInstance
- properties: {
- endpointType: 'EventGrid'
- authenticationType: 'KeyBased'
- TopicEndpoint: topicEndpoint
- accessKey1: listkeys(eventGridDomainResourceId, '2022-06-15').key1
- accessKey2: listkeys(eventGridDomainResourceId, '2022-06-15').key2
- deadLetterSecret: deadLetterSecret
- deadLetterUri: deadLetterUri
- }
-}
-
-@description('The resource ID of the Endpoint.')
-output resourceId string = endpoint.id
-
-@description('The name of the resource group the resource was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Endpoint.')
-output name string = endpoint.name
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/main.json b/modules/digital-twins/digital-twins-instance/endpoint--event-grid/main.json
deleted file mode 100644
index 8490ff9e8a..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/main.json
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17503518990299492663"
- },
- "name": "Digital Twins Instance Event Grid Endpoints",
- "description": "This module deploys a Digital Twins Instance Event Grid Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "EventGridEndpoint",
- "metadata": {
- "description": "Optional. The name of the Digital Twin Endpoint."
- }
- },
- "digitalTwinInstanceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment."
- }
- },
- "topicEndpoint": {
- "type": "string",
- "metadata": {
- "description": "Required. EventGrid Topic Endpoint."
- }
- },
- "eventGridDomainResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the Event Grid to get access keys from."
- }
- },
- "deadLetterSecret": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read."
- }
- },
- "deadLetterUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage URL for identity-based authentication."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('digitalTwinInstanceName'), parameters('name'))]",
- "properties": {
- "endpointType": "EventGrid",
- "authenticationType": "KeyBased",
- "TopicEndpoint": "[parameters('topicEndpoint')]",
- "accessKey1": "[listkeys(parameters('eventGridDomainResourceId'), '2022-06-15').key1]",
- "accessKey2": "[listkeys(parameters('eventGridDomainResourceId'), '2022-06-15').key2]",
- "deadLetterSecret": "[parameters('deadLetterSecret')]",
- "deadLetterUri": "[parameters('deadLetterUri')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Endpoint."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances/endpoints', parameters('digitalTwinInstanceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Endpoint."
- },
- "value": "[parameters('name')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/version.json b/modules/digital-twins/digital-twins-instance/endpoint--event-grid/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-grid/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/README.md b/modules/digital-twins/digital-twins-instance/endpoint--event-hub/README.md
deleted file mode 100644
index ee717d8aa1..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/README.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# Digital Twins Instance EventHub Endpoint `[Microsoft.DigitalTwins/digitalTwinsInstances/endpoints]`
-
-This module deploys a Digital Twins Instance EventHub Endpoint.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DigitalTwins/digitalTwinsInstances/endpoints` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DigitalTwins/2023-01-31/digitalTwinsInstances/endpoints) |
-
-## Parameters
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`connectionStringPrimaryKey`](#parameter-connectionstringprimarykey) | securestring | PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is "KeyBased". |
-| [`digitalTwinInstanceName`](#parameter-digitaltwininstancename) | string | The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`authenticationType`](#parameter-authenticationtype) | string | Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified. |
-| [`connectionStringSecondaryKey`](#parameter-connectionstringsecondarykey) | securestring | SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is "KeyBased". |
-| [`deadLetterSecret`](#parameter-deadlettersecret) | securestring | Dead letter storage secret for key-based authentication. Will be obfuscated during read. |
-| [`deadLetterUri`](#parameter-deadletteruri) | string | Dead letter storage URL for identity-based authentication. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`endpointUri`](#parameter-endpointuri) | string | The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://' (i.e. sb://xyz.servicebus.windows.net). |
-| [`entityPath`](#parameter-entitypath) | string | The EventHub name in the EventHub namespace for identity-based authentication. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`name`](#parameter-name) | string | The name of the Digital Twin Endpoint. |
-
-### Parameter: `connectionStringPrimaryKey`
-
-PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is "KeyBased".
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `digitalTwinInstanceName`
-
-The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `authenticationType`
-
-Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified.
-
-- Required: No
-- Type: string
-- Default: `'IdentityBased'`
-- Allowed:
- ```Bicep
- [
- 'IdentityBased'
- 'KeyBased'
- ]
- ```
-
-### Parameter: `connectionStringSecondaryKey`
-
-SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is "KeyBased".
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `deadLetterSecret`
-
-Dead letter storage secret for key-based authentication. Will be obfuscated during read.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `deadLetterUri`
-
-Dead letter storage URL for identity-based authentication.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `endpointUri`
-
-The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://' (i.e. sb://xyz.servicebus.windows.net).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `entityPath`
-
-The EventHub name in the EventHub namespace for identity-based authentication.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceId`](#parameter-managedidentitiesuserassignedresourceid) | string | The resource ID to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceId`
-
-The resource ID to assign to the resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `name`
-
-The name of the Digital Twin Endpoint.
-
-- Required: No
-- Type: string
-- Default: `'EventHubEndpoint'`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the Endpoint. |
-| `resourceGroupName` | string | The name of the resource group the resource was created in. |
-| `resourceId` | string | The resource ID of the Endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/main.bicep b/modules/digital-twins/digital-twins-instance/endpoint--event-hub/main.bicep
deleted file mode 100644
index 44a269cc2b..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/main.bicep
+++ /dev/null
@@ -1,101 +0,0 @@
-metadata name = 'Digital Twins Instance EventHub Endpoint'
-metadata description = 'This module deploys a Digital Twins Instance EventHub Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. The name of the Digital Twin Endpoint.')
-param name string = 'EventHubEndpoint'
-
-@description('Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment.')
-param digitalTwinInstanceName string
-
-@allowed([
- 'IdentityBased'
- 'KeyBased'
-])
-@description('Optional. Specifies the authentication type being used for connecting to the endpoint. If \'KeyBased\' is selected, a connection string must be specified (at least the primary connection string). If \'IdentityBased\' is selected, the endpointUri and entityPath properties must be specified.')
-param authenticationType string = 'IdentityBased'
-
-@description('Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read.')
-@secure()
-param deadLetterSecret string = ''
-
-@description('Optional. Dead letter storage URL for identity-based authentication.')
-param deadLetterUri string = ''
-
-@description('Conditional. PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is "KeyBased".')
-@secure()
-param connectionStringPrimaryKey string = ''
-
-@description('Optional. SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is "KeyBased".')
-@secure()
-param connectionStringSecondaryKey string = ''
-
-@description('Optional. The EventHub name in the EventHub namespace for identity-based authentication.')
-param entityPath string = ''
-
-@description('Optional. The URL of the EventHub namespace for identity-based authentication. It must include the protocol \'sb://\' (i.e. sb://xyz.servicebus.windows.net).')
-param endpointUri string = ''
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceId ?? '') ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceId ?? '') ? 'UserAssigned' : null)
- userAssignedIdentity: !empty(managedIdentities.?userAssignedResourceId) ? managedIdentities.?userAssignedResourceId : null
-} : null
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource digitalTwinsInstance 'Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31' existing = {
- name: digitalTwinInstanceName
-}
-
-resource endpoint 'Microsoft.DigitalTwins/digitalTwinsInstances/endpoints@2023-01-31' = {
- name: name
- parent: digitalTwinsInstance
- properties: {
- endpointType: 'EventHub'
- authenticationType: authenticationType
- connectionStringPrimaryKey: connectionStringPrimaryKey
- connectionStringSecondaryKey: connectionStringSecondaryKey
- deadLetterSecret: deadLetterSecret
- deadLetterUri: deadLetterUri
- endpointUri: endpointUri
- entityPath: entityPath
- identity: identity
- }
-}
-
-@description('The resource ID of the Endpoint.')
-output resourceId string = endpoint.id
-
-@description('The name of the resource group the resource was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Endpoint.')
-output name string = endpoint.name
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID to assign to the resource.')
- userAssignedResourceId: string?
-}?
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/main.json b/modules/digital-twins/digital-twins-instance/endpoint--event-hub/main.json
deleted file mode 100644
index d0299e46f1..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/main.json
+++ /dev/null
@@ -1,185 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3646158227862088931"
- },
- "name": "Digital Twins Instance EventHub Endpoint",
- "description": "This module deploys a Digital Twins Instance EventHub Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "EventHubEndpoint",
- "metadata": {
- "description": "Optional. The name of the Digital Twin Endpoint."
- }
- },
- "digitalTwinInstanceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment."
- }
- },
- "authenticationType": {
- "type": "string",
- "defaultValue": "IdentityBased",
- "allowedValues": [
- "IdentityBased",
- "KeyBased"
- ],
- "metadata": {
- "description": "Optional. Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified."
- }
- },
- "deadLetterSecret": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read."
- }
- },
- "deadLetterUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage URL for identity-based authentication."
- }
- },
- "connectionStringPrimaryKey": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is \"KeyBased\"."
- }
- },
- "connectionStringSecondaryKey": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is \"KeyBased\"."
- }
- },
- "entityPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The EventHub name in the EventHub namespace for identity-based authentication."
- }
- },
- "endpointUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://' (i.e. sb://xyz.servicebus.windows.net)."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- }
- },
- "variables": {
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'UserAssigned', null())), 'userAssignedIdentity', if(not(empty(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'))), tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), null())), null())]"
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "digitalTwinsInstance": {
- "existing": true,
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances",
- "apiVersion": "2023-01-31",
- "name": "[parameters('digitalTwinInstanceName')]"
- },
- "endpoint": {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('digitalTwinInstanceName'), parameters('name'))]",
- "properties": {
- "endpointType": "EventHub",
- "authenticationType": "[parameters('authenticationType')]",
- "connectionStringPrimaryKey": "[parameters('connectionStringPrimaryKey')]",
- "connectionStringSecondaryKey": "[parameters('connectionStringSecondaryKey')]",
- "deadLetterSecret": "[parameters('deadLetterSecret')]",
- "deadLetterUri": "[parameters('deadLetterUri')]",
- "endpointUri": "[parameters('endpointUri')]",
- "entityPath": "[parameters('entityPath')]",
- "identity": "[variables('identity')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Endpoint."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances/endpoints', parameters('digitalTwinInstanceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Endpoint."
- },
- "value": "[parameters('name')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/version.json b/modules/digital-twins/digital-twins-instance/endpoint--event-hub/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--event-hub/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/README.md b/modules/digital-twins/digital-twins-instance/endpoint--service-bus/README.md
deleted file mode 100644
index 040d68825a..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/README.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# Digital Twins Instance ServiceBus Endpoint `[Microsoft.DigitalTwins/digitalTwinsInstances/endpoints]`
-
-This module deploys a Digital Twins Instance ServiceBus Endpoint.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DigitalTwins/digitalTwinsInstances/endpoints` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DigitalTwins/2023-01-31/digitalTwinsInstances/endpoints) |
-
-## Parameters
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`digitalTwinInstanceName`](#parameter-digitaltwininstancename) | string | The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment. |
-| [`primaryConnectionString`](#parameter-primaryconnectionstring) | securestring | PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is "KeyBased". |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`authenticationType`](#parameter-authenticationtype) | string | Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified. |
-| [`deadLetterSecret`](#parameter-deadlettersecret) | securestring | Dead letter storage secret for key-based authentication. Will be obfuscated during read. |
-| [`deadLetterUri`](#parameter-deadletteruri) | string | Dead letter storage URL for identity-based authentication. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`endpointUri`](#parameter-endpointuri) | string | The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://' (e.g. sb://xyz.servicebus.windows.net). |
-| [`entityPath`](#parameter-entitypath) | string | The ServiceBus Topic name for identity-based authentication. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`name`](#parameter-name) | string | The name of the Digital Twin Endpoint. |
-| [`secondaryConnectionString`](#parameter-secondaryconnectionstring) | securestring | SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is "KeyBased". |
-
-### Parameter: `digitalTwinInstanceName`
-
-The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `primaryConnectionString`
-
-PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is "KeyBased".
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `authenticationType`
-
-Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified.
-
-- Required: No
-- Type: string
-- Default: `'IdentityBased'`
-- Allowed:
- ```Bicep
- [
- 'IdentityBased'
- 'KeyBased'
- ]
- ```
-
-### Parameter: `deadLetterSecret`
-
-Dead letter storage secret for key-based authentication. Will be obfuscated during read.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `deadLetterUri`
-
-Dead letter storage URL for identity-based authentication.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `endpointUri`
-
-The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://' (e.g. sb://xyz.servicebus.windows.net).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `entityPath`
-
-The ServiceBus Topic name for identity-based authentication.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceId`](#parameter-managedidentitiesuserassignedresourceid) | string | The resource ID to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceId`
-
-The resource ID to assign to the resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `name`
-
-The name of the Digital Twin Endpoint.
-
-- Required: No
-- Type: string
-- Default: `'ServiceBusEndpoint'`
-
-### Parameter: `secondaryConnectionString`
-
-SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is "KeyBased".
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the Endpoint. |
-| `resourceGroupName` | string | The name of the resource group the resource was created in. |
-| `resourceId` | string | The resource ID of the Endpoint. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/main.bicep b/modules/digital-twins/digital-twins-instance/endpoint--service-bus/main.bicep
deleted file mode 100644
index 633cc7ec3d..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/main.bicep
+++ /dev/null
@@ -1,101 +0,0 @@
-metadata name = 'Digital Twins Instance ServiceBus Endpoint'
-metadata description = 'This module deploys a Digital Twins Instance ServiceBus Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. The name of the Digital Twin Endpoint.')
-param name string = 'ServiceBusEndpoint'
-
-@description('Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment.')
-param digitalTwinInstanceName string
-
-@allowed([
- 'IdentityBased'
- 'KeyBased'
-])
-@description('Optional. Specifies the authentication type being used for connecting to the endpoint. If \'KeyBased\' is selected, a connection string must be specified (at least the primary connection string). If \'IdentityBased\' is selected, the endpointUri and entityPath properties must be specified.')
-param authenticationType string = 'IdentityBased'
-
-@description('Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read.')
-@secure()
-param deadLetterSecret string = ''
-
-@description('Optional. Dead letter storage URL for identity-based authentication.')
-param deadLetterUri string = ''
-
-@description('Optional. The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol \'sb://\' (e.g. sb://xyz.servicebus.windows.net).')
-param endpointUri string = ''
-
-@description('Optional. The ServiceBus Topic name for identity-based authentication.')
-param entityPath string = ''
-
-@description('Conditional. PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is "KeyBased".')
-@secure()
-param primaryConnectionString string = ''
-
-@description('Optional. SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is "KeyBased".')
-@secure()
-param secondaryConnectionString string = ''
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceId ?? '') ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceId ?? '') ? 'UserAssigned' : null)
- userAssignedIdentity: !empty(managedIdentities.?userAssignedResourceId) ? managedIdentities.?userAssignedResourceId : null
-} : null
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource digitalTwinsInstance 'Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31' existing = {
- name: digitalTwinInstanceName
-}
-
-resource endpoint 'Microsoft.DigitalTwins/digitalTwinsInstances/endpoints@2023-01-31' = {
- name: name
- parent: digitalTwinsInstance
- properties: {
- endpointType: 'ServiceBus'
- authenticationType: authenticationType
- deadLetterSecret: deadLetterSecret
- deadLetterUri: deadLetterUri
- endpointUri: endpointUri
- entityPath: entityPath
- primaryConnectionString: primaryConnectionString
- secondaryConnectionString: secondaryConnectionString
- identity: identity
- }
-}
-
-@description('The resource ID of the Endpoint.')
-output resourceId string = endpoint.id
-
-@description('The name of the resource group the resource was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Endpoint.')
-output name string = endpoint.name
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID to assign to the resource.')
- userAssignedResourceId: string?
-}?
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/main.json b/modules/digital-twins/digital-twins-instance/endpoint--service-bus/main.json
deleted file mode 100644
index 6cd452bec3..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/main.json
+++ /dev/null
@@ -1,185 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13121115050219114278"
- },
- "name": "Digital Twins Instance ServiceBus Endpoint",
- "description": "This module deploys a Digital Twins Instance ServiceBus Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "ServiceBusEndpoint",
- "metadata": {
- "description": "Optional. The name of the Digital Twin Endpoint."
- }
- },
- "digitalTwinInstanceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment."
- }
- },
- "authenticationType": {
- "type": "string",
- "defaultValue": "IdentityBased",
- "allowedValues": [
- "IdentityBased",
- "KeyBased"
- ],
- "metadata": {
- "description": "Optional. Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified."
- }
- },
- "deadLetterSecret": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read."
- }
- },
- "deadLetterUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage URL for identity-based authentication."
- }
- },
- "endpointUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://' (e.g. sb://xyz.servicebus.windows.net)."
- }
- },
- "entityPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The ServiceBus Topic name for identity-based authentication."
- }
- },
- "primaryConnectionString": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is \"KeyBased\"."
- }
- },
- "secondaryConnectionString": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is \"KeyBased\"."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- }
- },
- "variables": {
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'UserAssigned', null())), 'userAssignedIdentity', if(not(empty(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'))), tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), null())), null())]"
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "digitalTwinsInstance": {
- "existing": true,
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances",
- "apiVersion": "2023-01-31",
- "name": "[parameters('digitalTwinInstanceName')]"
- },
- "endpoint": {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('digitalTwinInstanceName'), parameters('name'))]",
- "properties": {
- "endpointType": "ServiceBus",
- "authenticationType": "[parameters('authenticationType')]",
- "deadLetterSecret": "[parameters('deadLetterSecret')]",
- "deadLetterUri": "[parameters('deadLetterUri')]",
- "endpointUri": "[parameters('endpointUri')]",
- "entityPath": "[parameters('entityPath')]",
- "primaryConnectionString": "[parameters('primaryConnectionString')]",
- "secondaryConnectionString": "[parameters('secondaryConnectionString')]",
- "identity": "[variables('identity')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Endpoint."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances/endpoints', parameters('digitalTwinInstanceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Endpoint."
- },
- "value": "[parameters('name')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/version.json b/modules/digital-twins/digital-twins-instance/endpoint--service-bus/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/digital-twins/digital-twins-instance/endpoint--service-bus/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/digital-twins/digital-twins-instance/main.bicep b/modules/digital-twins/digital-twins-instance/main.bicep
deleted file mode 100644
index d70d7c7c03..0000000000
--- a/modules/digital-twins/digital-twins-instance/main.bicep
+++ /dev/null
@@ -1,377 +0,0 @@
-metadata name = 'Digital Twins Instances'
-metadata description = 'This module deploys an Azure Digital Twins Instance.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Digital Twin Instance.')
-@minLength(3)
-@maxLength(63)
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Resource tags.')
-param tags object?
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Event Hub Endpoint.')
-param eventHubEndpoint object = {}
-
-@description('Optional. Event Grid Endpoint.')
-param eventGridEndpoint object = {}
-
-@description('Optional. Service Bus Endpoint.')
-param serviceBusEndpoint object = {}
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-var enableReferencedModulesTelemetry = false
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- 'Azure Digital Twins Data Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'bcd981a7-7f74-457b-83e1-cceb9e632ffe')
- 'Azure Digital Twins Data Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd57506d4-4c8d-48b1-8587-93c323f6a5a3')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource digitalTwinsInstance 'Microsoft.DigitalTwins/digitalTwinsInstances@2023-01-31' = {
- name: name
- location: location
- identity: identity
- tags: tags
- properties: {
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) ? 'Disabled' : 'Enabled')
- }
-}
-
-module digitalTwinsInstance_eventHubEndpoint 'endpoint--event-hub/main.bicep' = if (!empty(eventHubEndpoint)) {
- name: '${uniqueString(deployment().name, location)}-DigitalTwinsInstance-Endpoints-EventHub'
- params: {
- digitalTwinInstanceName: digitalTwinsInstance.name
- name: contains(eventHubEndpoint, 'name') ? eventHubEndpoint.name : 'EventHubEndpoint'
- authenticationType: contains(eventHubEndpoint, 'authenticationType') ? eventHubEndpoint.authenticationType : 'KeyBased'
- connectionStringPrimaryKey: contains(eventHubEndpoint, 'connectionStringPrimaryKey') ? eventHubEndpoint.connectionStringPrimaryKey : ''
- connectionStringSecondaryKey: contains(eventHubEndpoint, 'connectionStringSecondaryKey') ? eventHubEndpoint.connectionStringSecondaryKey : ''
- deadLetterSecret: contains(eventHubEndpoint, 'deadLetterSecret') ? eventHubEndpoint.deadLetterSecret : ''
- deadLetterUri: contains(eventHubEndpoint, 'deadLetterUri') ? eventHubEndpoint.deadLetterUri : ''
- endpointUri: contains(eventHubEndpoint, 'endpointUri') ? eventHubEndpoint.endpointUri : ''
- entityPath: contains(eventHubEndpoint, 'entityPath') ? eventHubEndpoint.entityPath : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- managedIdentities: contains(eventHubEndpoint, 'managedIdentities') ? eventHubEndpoint.managedIdentities : {}
- }
-}
-
-module digitalTwinsInstance_eventGridEndpoint 'endpoint--event-grid/main.bicep' = if (!empty(eventGridEndpoint)) {
- name: '${uniqueString(deployment().name, location)}-DigitalTwinsInstance-Endpoints-EventGrid'
- params: {
- digitalTwinInstanceName: digitalTwinsInstance.name
- name: contains(eventGridEndpoint, 'name') ? eventGridEndpoint.name : 'EventGridEndpoint'
- topicEndpoint: contains(eventGridEndpoint, 'topicEndpoint') ? eventGridEndpoint.topicEndpoint : ''
- deadLetterSecret: contains(eventGridEndpoint, 'deadLetterSecret') ? eventGridEndpoint.deadLetterSecret : ''
- deadLetterUri: contains(eventGridEndpoint, 'deadLetterUri') ? eventGridEndpoint.deadLetterUri : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- eventGridDomainResourceId: contains(eventGridEndpoint, 'eventGridDomainId') ? eventGridEndpoint.eventGridDomainId : ''
- }
-}
-
-module digitalTwinsInstance_serviceBusEndpoint 'endpoint--service-bus/main.bicep' = if (!empty(serviceBusEndpoint)) {
- name: '${uniqueString(deployment().name, location)}-DigitalTwinsInstance-Endpoints-ServiceBus'
- params: {
- digitalTwinInstanceName: digitalTwinsInstance.name
- name: contains(serviceBusEndpoint, 'name') ? serviceBusEndpoint.name : 'ServiceBusEndpoint'
- authenticationType: contains(serviceBusEndpoint, 'authenticationType') ? serviceBusEndpoint.authenticationType : ''
- deadLetterSecret: contains(serviceBusEndpoint, 'deadLetterSecret') ? serviceBusEndpoint.deadLetterSecret : ''
- deadLetterUri: contains(serviceBusEndpoint, 'deadLetterUri') ? serviceBusEndpoint.deadLetterUri : ''
- endpointUri: contains(serviceBusEndpoint, 'endpointUri') ? serviceBusEndpoint.endpointUri : ''
- entityPath: contains(serviceBusEndpoint, 'entityPath') ? serviceBusEndpoint.entityPath : ''
- primaryConnectionString: contains(serviceBusEndpoint, 'primaryConnectionString') ? serviceBusEndpoint.primaryConnectionString : ''
- secondaryConnectionString: contains(serviceBusEndpoint, 'secondaryConnectionString') ? serviceBusEndpoint.secondaryConnectionString : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- managedIdentities: contains(serviceBusEndpoint, 'managedIdentities') ? serviceBusEndpoint.managedIdentities : {}
- }
-}
-
-module digitalTwinsInstance_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-digitalTwinsInstance-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'API'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(digitalTwinsInstance.id, '/'))}-${privateEndpoint.?service ?? 'API'}-${index}'
- serviceResourceId: digitalTwinsInstance.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource digitalTwinsInstance_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: digitalTwinsInstance
-}
-
-resource digitalTwinsInstance_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: digitalTwinsInstance
-}]
-
-resource digitalTwinsInstance_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(digitalTwinsInstance.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: digitalTwinsInstance
-}]
-
-@description('The resource ID of the Digital Twins Instance.')
-output resourceId string = digitalTwinsInstance.id
-
-@description('The name of the resource group the resource was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the Digital Twins Instance.')
-output name string = digitalTwinsInstance.name
-
-@description('The hostname of the Digital Twins Instance.')
-output hostname string = digitalTwinsInstance.properties.hostName
-
-@description('The location the resource was deployed into.')
-output location string = digitalTwinsInstance.location
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(digitalTwinsInstance.identity, 'principalId') ? digitalTwinsInstance.identity.principalId : ''
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/digital-twins/digital-twins-instance/main.json b/modules/digital-twins/digital-twins-instance/main.json
deleted file mode 100644
index 418e025eaf..0000000000
--- a/modules/digital-twins/digital-twins-instance/main.json
+++ /dev/null
@@ -1,1843 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10882496143186980105"
- },
- "name": "Digital Twins Instances",
- "description": "This module deploys an Azure Digital Twins Instance.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 3,
- "maxLength": 63,
- "metadata": {
- "description": "Required. The name of the Digital Twin Instance."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "eventHubEndpoint": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Event Hub Endpoint."
- }
- },
- "eventGridEndpoint": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Event Grid Endpoint."
- }
- },
- "serviceBusEndpoint": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Service Bus Endpoint."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Azure Digital Twins Data Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'bcd981a7-7f74-457b-83e1-cceb9e632ffe')]",
- "Azure Digital Twins Data Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd57506d4-4c8d-48b1-8587-93c323f6a5a3')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "digitalTwinsInstance": {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances",
- "apiVersion": "2023-01-31",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(not(empty(parameters('privateEndpoints'))), 'Disabled', 'Enabled'))]"
- }
- },
- "digitalTwinsInstance_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DigitalTwins/digitalTwinsInstances/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- },
- "digitalTwinsInstance_diagnosticSettings": {
- "copy": {
- "name": "digitalTwinsInstance_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DigitalTwins/digitalTwinsInstances/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- },
- "digitalTwinsInstance_roleAssignments": {
- "copy": {
- "name": "digitalTwinsInstance_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DigitalTwins/digitalTwinsInstances/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DigitalTwins/digitalTwinsInstances', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- },
- "digitalTwinsInstance_eventHubEndpoint": {
- "condition": "[not(empty(parameters('eventHubEndpoint')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-DigitalTwinsInstance-Endpoints-EventHub', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "digitalTwinInstanceName": {
- "value": "[parameters('name')]"
- },
- "name": "[if(contains(parameters('eventHubEndpoint'), 'name'), createObject('value', parameters('eventHubEndpoint').name), createObject('value', 'EventHubEndpoint'))]",
- "authenticationType": "[if(contains(parameters('eventHubEndpoint'), 'authenticationType'), createObject('value', parameters('eventHubEndpoint').authenticationType), createObject('value', 'KeyBased'))]",
- "connectionStringPrimaryKey": "[if(contains(parameters('eventHubEndpoint'), 'connectionStringPrimaryKey'), createObject('value', parameters('eventHubEndpoint').connectionStringPrimaryKey), createObject('value', ''))]",
- "connectionStringSecondaryKey": "[if(contains(parameters('eventHubEndpoint'), 'connectionStringSecondaryKey'), createObject('value', parameters('eventHubEndpoint').connectionStringSecondaryKey), createObject('value', ''))]",
- "deadLetterSecret": "[if(contains(parameters('eventHubEndpoint'), 'deadLetterSecret'), createObject('value', parameters('eventHubEndpoint').deadLetterSecret), createObject('value', ''))]",
- "deadLetterUri": "[if(contains(parameters('eventHubEndpoint'), 'deadLetterUri'), createObject('value', parameters('eventHubEndpoint').deadLetterUri), createObject('value', ''))]",
- "endpointUri": "[if(contains(parameters('eventHubEndpoint'), 'endpointUri'), createObject('value', parameters('eventHubEndpoint').endpointUri), createObject('value', ''))]",
- "entityPath": "[if(contains(parameters('eventHubEndpoint'), 'entityPath'), createObject('value', parameters('eventHubEndpoint').entityPath), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "managedIdentities": "[if(contains(parameters('eventHubEndpoint'), 'managedIdentities'), createObject('value', parameters('eventHubEndpoint').managedIdentities), createObject('value', createObject()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3646158227862088931"
- },
- "name": "Digital Twins Instance EventHub Endpoint",
- "description": "This module deploys a Digital Twins Instance EventHub Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "EventHubEndpoint",
- "metadata": {
- "description": "Optional. The name of the Digital Twin Endpoint."
- }
- },
- "digitalTwinInstanceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment."
- }
- },
- "authenticationType": {
- "type": "string",
- "defaultValue": "IdentityBased",
- "allowedValues": [
- "IdentityBased",
- "KeyBased"
- ],
- "metadata": {
- "description": "Optional. Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified."
- }
- },
- "deadLetterSecret": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read."
- }
- },
- "deadLetterUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage URL for identity-based authentication."
- }
- },
- "connectionStringPrimaryKey": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is \"KeyBased\"."
- }
- },
- "connectionStringSecondaryKey": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is \"KeyBased\"."
- }
- },
- "entityPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The EventHub name in the EventHub namespace for identity-based authentication."
- }
- },
- "endpointUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://' (i.e. sb://xyz.servicebus.windows.net)."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- }
- },
- "variables": {
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'UserAssigned', null())), 'userAssignedIdentity', if(not(empty(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'))), tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), null())), null())]"
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "digitalTwinsInstance": {
- "existing": true,
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances",
- "apiVersion": "2023-01-31",
- "name": "[parameters('digitalTwinInstanceName')]"
- },
- "endpoint": {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('digitalTwinInstanceName'), parameters('name'))]",
- "properties": {
- "endpointType": "EventHub",
- "authenticationType": "[parameters('authenticationType')]",
- "connectionStringPrimaryKey": "[parameters('connectionStringPrimaryKey')]",
- "connectionStringSecondaryKey": "[parameters('connectionStringSecondaryKey')]",
- "deadLetterSecret": "[parameters('deadLetterSecret')]",
- "deadLetterUri": "[parameters('deadLetterUri')]",
- "endpointUri": "[parameters('endpointUri')]",
- "entityPath": "[parameters('entityPath')]",
- "identity": "[variables('identity')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Endpoint."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances/endpoints', parameters('digitalTwinInstanceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Endpoint."
- },
- "value": "[parameters('name')]"
- }
- }
- }
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- },
- "digitalTwinsInstance_eventGridEndpoint": {
- "condition": "[not(empty(parameters('eventGridEndpoint')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-DigitalTwinsInstance-Endpoints-EventGrid', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "digitalTwinInstanceName": {
- "value": "[parameters('name')]"
- },
- "name": "[if(contains(parameters('eventGridEndpoint'), 'name'), createObject('value', parameters('eventGridEndpoint').name), createObject('value', 'EventGridEndpoint'))]",
- "topicEndpoint": "[if(contains(parameters('eventGridEndpoint'), 'topicEndpoint'), createObject('value', parameters('eventGridEndpoint').topicEndpoint), createObject('value', ''))]",
- "deadLetterSecret": "[if(contains(parameters('eventGridEndpoint'), 'deadLetterSecret'), createObject('value', parameters('eventGridEndpoint').deadLetterSecret), createObject('value', ''))]",
- "deadLetterUri": "[if(contains(parameters('eventGridEndpoint'), 'deadLetterUri'), createObject('value', parameters('eventGridEndpoint').deadLetterUri), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "eventGridDomainResourceId": "[if(contains(parameters('eventGridEndpoint'), 'eventGridDomainId'), createObject('value', parameters('eventGridEndpoint').eventGridDomainId), createObject('value', ''))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17503518990299492663"
- },
- "name": "Digital Twins Instance Event Grid Endpoints",
- "description": "This module deploys a Digital Twins Instance Event Grid Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "EventGridEndpoint",
- "metadata": {
- "description": "Optional. The name of the Digital Twin Endpoint."
- }
- },
- "digitalTwinInstanceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment."
- }
- },
- "topicEndpoint": {
- "type": "string",
- "metadata": {
- "description": "Required. EventGrid Topic Endpoint."
- }
- },
- "eventGridDomainResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the Event Grid to get access keys from."
- }
- },
- "deadLetterSecret": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read."
- }
- },
- "deadLetterUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage URL for identity-based authentication."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('digitalTwinInstanceName'), parameters('name'))]",
- "properties": {
- "endpointType": "EventGrid",
- "authenticationType": "KeyBased",
- "TopicEndpoint": "[parameters('topicEndpoint')]",
- "accessKey1": "[listkeys(parameters('eventGridDomainResourceId'), '2022-06-15').key1]",
- "accessKey2": "[listkeys(parameters('eventGridDomainResourceId'), '2022-06-15').key2]",
- "deadLetterSecret": "[parameters('deadLetterSecret')]",
- "deadLetterUri": "[parameters('deadLetterUri')]"
- }
- }
- ],
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Endpoint."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances/endpoints', parameters('digitalTwinInstanceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Endpoint."
- },
- "value": "[parameters('name')]"
- }
- }
- }
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- },
- "digitalTwinsInstance_serviceBusEndpoint": {
- "condition": "[not(empty(parameters('serviceBusEndpoint')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-DigitalTwinsInstance-Endpoints-ServiceBus', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "digitalTwinInstanceName": {
- "value": "[parameters('name')]"
- },
- "name": "[if(contains(parameters('serviceBusEndpoint'), 'name'), createObject('value', parameters('serviceBusEndpoint').name), createObject('value', 'ServiceBusEndpoint'))]",
- "authenticationType": "[if(contains(parameters('serviceBusEndpoint'), 'authenticationType'), createObject('value', parameters('serviceBusEndpoint').authenticationType), createObject('value', ''))]",
- "deadLetterSecret": "[if(contains(parameters('serviceBusEndpoint'), 'deadLetterSecret'), createObject('value', parameters('serviceBusEndpoint').deadLetterSecret), createObject('value', ''))]",
- "deadLetterUri": "[if(contains(parameters('serviceBusEndpoint'), 'deadLetterUri'), createObject('value', parameters('serviceBusEndpoint').deadLetterUri), createObject('value', ''))]",
- "endpointUri": "[if(contains(parameters('serviceBusEndpoint'), 'endpointUri'), createObject('value', parameters('serviceBusEndpoint').endpointUri), createObject('value', ''))]",
- "entityPath": "[if(contains(parameters('serviceBusEndpoint'), 'entityPath'), createObject('value', parameters('serviceBusEndpoint').entityPath), createObject('value', ''))]",
- "primaryConnectionString": "[if(contains(parameters('serviceBusEndpoint'), 'primaryConnectionString'), createObject('value', parameters('serviceBusEndpoint').primaryConnectionString), createObject('value', ''))]",
- "secondaryConnectionString": "[if(contains(parameters('serviceBusEndpoint'), 'secondaryConnectionString'), createObject('value', parameters('serviceBusEndpoint').secondaryConnectionString), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "managedIdentities": "[if(contains(parameters('serviceBusEndpoint'), 'managedIdentities'), createObject('value', parameters('serviceBusEndpoint').managedIdentities), createObject('value', createObject()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13121115050219114278"
- },
- "name": "Digital Twins Instance ServiceBus Endpoint",
- "description": "This module deploys a Digital Twins Instance ServiceBus Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "ServiceBusEndpoint",
- "metadata": {
- "description": "Optional. The name of the Digital Twin Endpoint."
- }
- },
- "digitalTwinInstanceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Digital Twin Instance resource. Required if the template is used in a standalone deployment."
- }
- },
- "authenticationType": {
- "type": "string",
- "defaultValue": "IdentityBased",
- "allowedValues": [
- "IdentityBased",
- "KeyBased"
- ],
- "metadata": {
- "description": "Optional. Specifies the authentication type being used for connecting to the endpoint. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is selected, the endpointUri and entityPath properties must be specified."
- }
- },
- "deadLetterSecret": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage secret for key-based authentication. Will be obfuscated during read."
- }
- },
- "deadLetterUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Dead letter storage URL for identity-based authentication."
- }
- },
- "endpointUri": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol 'sb://' (e.g. sb://xyz.servicebus.windows.net)."
- }
- },
- "entityPath": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The ServiceBus Topic name for identity-based authentication."
- }
- },
- "primaryConnectionString": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Required if the `authenticationType` is \"KeyBased\"."
- }
- },
- "secondaryConnectionString": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. Only used if the `authenticationType` is \"KeyBased\"."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- }
- },
- "variables": {
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), ''))), 'UserAssigned', null())), 'userAssignedIdentity', if(not(empty(tryGet(parameters('managedIdentities'), 'userAssignedResourceId'))), tryGet(parameters('managedIdentities'), 'userAssignedResourceId'), null())), null())]"
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "digitalTwinsInstance": {
- "existing": true,
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances",
- "apiVersion": "2023-01-31",
- "name": "[parameters('digitalTwinInstanceName')]"
- },
- "endpoint": {
- "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('digitalTwinInstanceName'), parameters('name'))]",
- "properties": {
- "endpointType": "ServiceBus",
- "authenticationType": "[parameters('authenticationType')]",
- "deadLetterSecret": "[parameters('deadLetterSecret')]",
- "deadLetterUri": "[parameters('deadLetterUri')]",
- "endpointUri": "[parameters('endpointUri')]",
- "entityPath": "[parameters('entityPath')]",
- "primaryConnectionString": "[parameters('primaryConnectionString')]",
- "secondaryConnectionString": "[parameters('secondaryConnectionString')]",
- "identity": "[variables('identity')]"
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Endpoint."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances/endpoints', parameters('digitalTwinInstanceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Endpoint."
- },
- "value": "[parameters('name')]"
- }
- }
- }
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- },
- "digitalTwinsInstance_privateEndpoints": {
- "copy": {
- "name": "digitalTwinsInstance_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-digitalTwinsInstance-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'API')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.DigitalTwins/digitalTwinsInstances', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'API'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "digitalTwinsInstance"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Digital Twins Instance."
- },
- "value": "[resourceId('Microsoft.DigitalTwins/digitalTwinsInstances', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the resource was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Digital Twins Instance."
- },
- "value": "[parameters('name')]"
- },
- "hostname": {
- "type": "string",
- "metadata": {
- "description": "The hostname of the Digital Twins Instance."
- },
- "value": "[reference('digitalTwinsInstance').hostName]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('digitalTwinsInstance', '2023-01-31', 'full').location]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('digitalTwinsInstance', '2023-01-31', 'full').identity, 'principalId')), reference('digitalTwinsInstance', '2023-01-31', 'full').identity.principalId, '')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/digital-twins/digital-twins-instance/tests/e2e/defaults/main.test.bicep b/modules/digital-twins/digital-twins-instance/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index e62a489683..0000000000
--- a/modules/digital-twins/digital-twins-instance/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-digitaltwins.digitaltwinsinstances-${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 = 'dtdtimin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/digital-twins/digital-twins-instance/tests/e2e/max/dependencies.bicep b/modules/digital-twins/digital-twins-instance/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 87c0cf8a6f..0000000000
--- a/modules/digital-twins/digital-twins-instance/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,162 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Event Hub Namespace to create.')
-param eventHubNamespaceName string
-
-@description('Required. The name of the Event Hub to create.')
-param eventHubName string
-
-@description('Required. Service Bus name')
-param serviceBusName string
-
-@description('Required. Event Grid Domain name.')
-param eventGridDomainName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.KeyVault'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.digitaltwins.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource eventHubNamespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' = {
- name: eventHubNamespaceName
- location: location
- properties: {
- zoneRedundant: false
- isAutoInflateEnabled: false
- maximumThroughputUnits: 0
- }
-
- resource eventHub 'eventhubs@2022-10-01-preview' = {
- name: eventHubName
- }
-}
-
-resource serviceBus 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
- name: serviceBusName
- location: location
- properties: {
- zoneRedundant: false
- }
-
- resource topic 'topics@2022-10-01-preview' = {
- name: 'topic'
- }
-}
-
-resource eventGridDomain 'Microsoft.EventGrid/domains@2022-06-15' = {
- name: eventGridDomainName
- location: location
- properties: {
- disableLocalAuth: false
- }
-
- resource topic 'topics@2022-06-15' = {
- name: 'topic'
- }
-}
-
-resource eventHubNamespaceRbacAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(managedIdentity.id, 'evhrbacAssignment')
- scope: eventHubNamespace
- properties: {
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975') //Azure Event Hubs Data Sender
- principalId: managedIdentity.properties.principalId
- principalType: 'ServicePrincipal'
- }
-}
-
-resource serviceBusRbacAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(managedIdentity.id, 'sbrbacAssignment')
- scope: serviceBus
- properties: {
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '69a216fc-b8fb-44d8-bc22-1f3c2cd27a39') //Azure Service Bus Data Sender
- principalId: managedIdentity.properties.principalId
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalResourceId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The name of the Event Hub Namespace.')
-output eventhubNamespaceName string = eventHubNamespace.name
-
-@description('The resource ID of the created Event Hub Namespace.')
-output eventHubResourceId string = eventHubNamespace::eventHub.id
-
-@description('The name of the Event Hub.')
-output eventhubName string = eventHubNamespace::eventHub.name
-
-@description('The name of the Service Bus Namespace.')
-output serviceBusName string = serviceBus.name
-
-@description('The name of the Service Bus Topic.')
-output serviceBusTopicName string = serviceBus::topic.name
-
-@description('The Event Grid endpoint uri.')
-output eventGridEndpoint string = eventGridDomain.properties.endpoint
-
-@description('The resource ID of the created Event Grid Topic.')
-output eventGridTopicResourceId string = eventGridDomain::topic.id
-
-@description('The resource ID of the created Event Grid Domain.')
-output eventGridDomainResourceId string = eventGridDomain.id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/digital-twins/digital-twins-instance/tests/e2e/max/main.test.bicep b/modules/digital-twins/digital-twins-instance/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 1b35dd6068..0000000000
--- a/modules/digital-twins/digital-twins-instance/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,140 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-digitaltwins.digitaltwinsinstances-${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 = 'dtdtimax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- eventHubName: 'dt-${uniqueString(serviceShort)}-evh-01'
- eventHubNamespaceName: 'dt-${uniqueString(serviceShort)}-evhns-01'
- serviceBusName: 'dt-${uniqueString(serviceShort)}-sb-01'
- eventGridDomainName: 'dt-${uniqueString(serviceShort)}-evg-01'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}03'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${uniqueString(serviceShort)}-evh-01'
- eventHubNamespaceName: 'dep-${uniqueString(serviceShort)}-evh-01'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- eventHubEndpoint: {
- authenticationType: 'IdentityBased'
- endpointUri: 'sb://${nestedDependencies.outputs.eventhubNamespaceName}.servicebus.windows.net/'
- entityPath: nestedDependencies.outputs.eventhubName
- managedIdentities: {
- userAssignedResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- }
- serviceBusEndpoint: {
- authenticationType: 'IdentityBased'
- endpointUri: 'sb://${nestedDependencies.outputs.serviceBusName}.servicebus.windows.net/'
- entityPath: nestedDependencies.outputs.serviceBusTopicName
- managedIdentities: {
- userAssignedResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- }
- eventGridEndpoint: {
- eventGridDomainId: nestedDependencies.outputs.eventGridDomainResourceId
- topicEndpoint: nestedDependencies.outputs.eventGridEndpoint
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalResourceId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/digital-twins/digital-twins-instance/tests/e2e/waf-aligned/dependencies.bicep b/modules/digital-twins/digital-twins-instance/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 87c0cf8a6f..0000000000
--- a/modules/digital-twins/digital-twins-instance/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,162 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Event Hub Namespace to create.')
-param eventHubNamespaceName string
-
-@description('Required. The name of the Event Hub to create.')
-param eventHubName string
-
-@description('Required. Service Bus name')
-param serviceBusName string
-
-@description('Required. Event Grid Domain name.')
-param eventGridDomainName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.KeyVault'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.digitaltwins.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource eventHubNamespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' = {
- name: eventHubNamespaceName
- location: location
- properties: {
- zoneRedundant: false
- isAutoInflateEnabled: false
- maximumThroughputUnits: 0
- }
-
- resource eventHub 'eventhubs@2022-10-01-preview' = {
- name: eventHubName
- }
-}
-
-resource serviceBus 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
- name: serviceBusName
- location: location
- properties: {
- zoneRedundant: false
- }
-
- resource topic 'topics@2022-10-01-preview' = {
- name: 'topic'
- }
-}
-
-resource eventGridDomain 'Microsoft.EventGrid/domains@2022-06-15' = {
- name: eventGridDomainName
- location: location
- properties: {
- disableLocalAuth: false
- }
-
- resource topic 'topics@2022-06-15' = {
- name: 'topic'
- }
-}
-
-resource eventHubNamespaceRbacAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(managedIdentity.id, 'evhrbacAssignment')
- scope: eventHubNamespace
- properties: {
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975') //Azure Event Hubs Data Sender
- principalId: managedIdentity.properties.principalId
- principalType: 'ServicePrincipal'
- }
-}
-
-resource serviceBusRbacAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid(managedIdentity.id, 'sbrbacAssignment')
- scope: serviceBus
- properties: {
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '69a216fc-b8fb-44d8-bc22-1f3c2cd27a39') //Azure Service Bus Data Sender
- principalId: managedIdentity.properties.principalId
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalResourceId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The name of the Event Hub Namespace.')
-output eventhubNamespaceName string = eventHubNamespace.name
-
-@description('The resource ID of the created Event Hub Namespace.')
-output eventHubResourceId string = eventHubNamespace::eventHub.id
-
-@description('The name of the Event Hub.')
-output eventhubName string = eventHubNamespace::eventHub.name
-
-@description('The name of the Service Bus Namespace.')
-output serviceBusName string = serviceBus.name
-
-@description('The name of the Service Bus Topic.')
-output serviceBusTopicName string = serviceBus::topic.name
-
-@description('The Event Grid endpoint uri.')
-output eventGridEndpoint string = eventGridDomain.properties.endpoint
-
-@description('The resource ID of the created Event Grid Topic.')
-output eventGridTopicResourceId string = eventGridDomain::topic.id
-
-@description('The resource ID of the created Event Grid Domain.')
-output eventGridDomainResourceId string = eventGridDomain.id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/digital-twins/digital-twins-instance/tests/e2e/waf-aligned/main.test.bicep b/modules/digital-twins/digital-twins-instance/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 98f7a003e8..0000000000
--- a/modules/digital-twins/digital-twins-instance/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,139 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-digitaltwins.digitaltwinsinstances-${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 = 'dtdtiwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- eventHubName: 'dt-${uniqueString(serviceShort)}-evh-01'
- eventHubNamespaceName: 'dt-${uniqueString(serviceShort)}-evhns-01'
- serviceBusName: 'dt-${uniqueString(serviceShort)}-sb-01'
- eventGridDomainName: 'dt-${uniqueString(serviceShort)}-evg-01'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}03'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${uniqueString(serviceShort)}-evh-01'
- eventHubNamespaceName: 'dep-${uniqueString(serviceShort)}-evh-01'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- eventHubEndpoint: {
- authenticationType: 'IdentityBased'
- endpointUri: 'sb://${nestedDependencies.outputs.eventhubNamespaceName}.servicebus.windows.net/'
- entityPath: nestedDependencies.outputs.eventhubName
- managedIdentities: {
- userAssignedResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- }
- serviceBusEndpoint: {
- authenticationType: 'IdentityBased'
- endpointUri: 'sb://${nestedDependencies.outputs.serviceBusName}.servicebus.windows.net/'
- entityPath: nestedDependencies.outputs.serviceBusTopicName
- managedIdentities: {
- userAssignedResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- }
- eventGridEndpoint: {
- eventGridDomainId: nestedDependencies.outputs.eventGridDomainResourceId
- topicEndpoint: nestedDependencies.outputs.eventGridEndpoint
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalResourceId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/digital-twins/digital-twins-instance/version.json b/modules/digital-twins/digital-twins-instance/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/digital-twins/digital-twins-instance/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/MOVED-TO-AVM.md b/modules/document-db/database-account/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/document-db/database-account/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/document-db/database-account/README.md b/modules/document-db/database-account/README.md
index f7db7befdd..0877ff74bd 100644
--- a/modules/document-db/database-account/README.md
+++ b/modules/document-db/database-account/README.md
@@ -1,2122 +1,7 @@
-# DocumentDB Database Accounts `[Microsoft.DocumentDB/databaseAccounts]`
+
-
-
-
-### Example 2: _Mongodb_
-
-
-
-
-
-### Example 3: _Plain_
-
-
-
-
-
-### Example 4: _Sqldb_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`locations`](#parameter-locations) | array | Locations enabled for the Cosmos DB account. |
-| [`name`](#parameter-name) | string | Name of the Database Account. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`automaticFailover`](#parameter-automaticfailover) | bool | Enable automatic failover for regions. |
-| [`backupIntervalInMinutes`](#parameter-backupintervalinminutes) | int | An integer representing the interval in minutes between two backups. Only applies to periodic backup type. |
-| [`backupPolicyContinuousTier`](#parameter-backuppolicycontinuoustier) | string | Configuration values for continuous mode backup. |
-| [`backupPolicyType`](#parameter-backuppolicytype) | string | Describes the mode of backups. |
-| [`backupRetentionIntervalInHours`](#parameter-backupretentionintervalinhours) | int | An integer representing the time (in hours) that each backup is retained. Only applies to periodic backup type. |
-| [`backupStorageRedundancy`](#parameter-backupstorageredundancy) | string | Enum to indicate type of backup residency. Only applies to periodic backup type. |
-| [`capabilitiesToAdd`](#parameter-capabilitiestoadd) | array | List of Cosmos DB capabilities for the account. |
-| [`databaseAccountOfferType`](#parameter-databaseaccountoffertype) | string | The offer type for the Cosmos DB database account. |
-| [`defaultConsistencyLevel`](#parameter-defaultconsistencylevel) | string | The default consistency level of the Cosmos DB account. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enableFreeTier`](#parameter-enablefreetier) | bool | Flag to indicate whether Free Tier is enabled. |
-| [`gremlinDatabases`](#parameter-gremlindatabases) | array | Gremlin Databases configurations. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`maxIntervalInSeconds`](#parameter-maxintervalinseconds) | int | Max lag time (minutes). Required for BoundedStaleness. Valid ranges, Single Region: 5 to 84600. Multi Region: 300 to 86400. |
-| [`maxStalenessPrefix`](#parameter-maxstalenessprefix) | int | Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000. |
-| [`mongodbDatabases`](#parameter-mongodbdatabases) | array | MongoDB Databases configurations. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`serverVersion`](#parameter-serverversion) | string | Specifies the MongoDB server version to use. |
-| [`sqlDatabases`](#parameter-sqldatabases) | array | SQL Databases configurations. |
-| [`tags`](#parameter-tags) | object | Tags of the Database Account resource. |
-
-### Parameter: `locations`
-
-Locations enabled for the Cosmos DB account.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `name`
-
-Name of the Database Account.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `automaticFailover`
-
-Enable automatic failover for regions.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `backupIntervalInMinutes`
-
-An integer representing the interval in minutes between two backups. Only applies to periodic backup type.
-
-- Required: No
-- Type: int
-- Default: `240`
-
-### Parameter: `backupPolicyContinuousTier`
-
-Configuration values for continuous mode backup.
-
-- Required: No
-- Type: string
-- Default: `'Continuous30Days'`
-- Allowed:
- ```Bicep
- [
- 'Continuous30Days'
- 'Continuous7Days'
- ]
- ```
-
-### Parameter: `backupPolicyType`
-
-Describes the mode of backups.
-
-- Required: No
-- Type: string
-- Default: `'Continuous'`
-- Allowed:
- ```Bicep
- [
- 'Continuous'
- 'Periodic'
- ]
- ```
-
-### Parameter: `backupRetentionIntervalInHours`
-
-An integer representing the time (in hours) that each backup is retained. Only applies to periodic backup type.
-
-- Required: No
-- Type: int
-- Default: `8`
-
-### Parameter: `backupStorageRedundancy`
-
-Enum to indicate type of backup residency. Only applies to periodic backup type.
-
-- Required: No
-- Type: string
-- Default: `'Local'`
-- Allowed:
- ```Bicep
- [
- 'Geo'
- 'Local'
- 'Zone'
- ]
- ```
-
-### Parameter: `capabilitiesToAdd`
-
-List of Cosmos DB capabilities for the account.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'DisableRateLimitingResponses'
- 'EnableCassandra'
- 'EnableGremlin'
- 'EnableMongo'
- 'EnableServerless'
- 'EnableTable'
- ]
- ```
-
-### Parameter: `databaseAccountOfferType`
-
-The offer type for the Cosmos DB database account.
-
-- Required: No
-- Type: string
-- Default: `'Standard'`
-- Allowed:
- ```Bicep
- [
- 'Standard'
- ]
- ```
-
-### Parameter: `defaultConsistencyLevel`
-
-The default consistency level of the Cosmos DB account.
-
-- Required: No
-- Type: string
-- Default: `'Session'`
-- Allowed:
- ```Bicep
- [
- 'BoundedStaleness'
- 'ConsistentPrefix'
- 'Eventual'
- 'Session'
- 'Strong'
- ]
- ```
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableFreeTier`
-
-Flag to indicate whether Free Tier is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `gremlinDatabases`
-
-Gremlin Databases configurations.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `maxIntervalInSeconds`
-
-Max lag time (minutes). Required for BoundedStaleness. Valid ranges, Single Region: 5 to 84600. Multi Region: 300 to 86400.
-
-- Required: No
-- Type: int
-- Default: `300`
-
-### Parameter: `maxStalenessPrefix`
-
-Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000.
-
-- Required: No
-- Type: int
-- Default: `100000`
-
-### Parameter: `mongodbDatabases`
-
-MongoDB Databases configurations.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `roleAssignments`
-
-Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `serverVersion`
-
-Specifies the MongoDB server version to use.
-
-- Required: No
-- Type: string
-- Default: `'4.2'`
-- Allowed:
- ```Bicep
- [
- '3.2'
- '3.6'
- '4.0'
- '4.2'
- ]
- ```
-
-### Parameter: `sqlDatabases`
-
-SQL Databases configurations.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Tags of the Database Account resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the database account. |
-| `resourceGroupName` | string | The name of the resource group the database account was created in. |
-| `resourceId` | string | The resource ID of the database account. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/document-db/database-account/gremlin-database/README.md b/modules/document-db/database-account/gremlin-database/README.md
deleted file mode 100644
index df1136e3f0..0000000000
--- a/modules/document-db/database-account/gremlin-database/README.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# DocumentDB Database Account Gremlin Databases `[Microsoft.DocumentDB/databaseAccounts/gremlinDatabases]`
-
-This module deploys a Gremlin Database within a CosmosDB Account.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/gremlinDatabases) |
-| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/gremlinDatabases/graphs) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Gremlin database. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`databaseAccountName`](#parameter-databaseaccountname) | string | The name of the parent Gremlin database. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`graphs`](#parameter-graphs) | array | Array of graphs to deploy in the Gremlin database. |
-| [`maxThroughput`](#parameter-maxthroughput) | int | Represents maximum throughput, the resource can scale up to. Cannot be set together with `throughput`. If `throughput` is set to something else than -1, this autoscale setting is ignored. |
-| [`tags`](#parameter-tags) | object | Tags of the Gremlin database resource. |
-| [`throughput`](#parameter-throughput) | int | Request Units per second (for example 10000). Cannot be set together with `maxThroughput`. |
-
-### Parameter: `name`
-
-Name of the Gremlin database.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `databaseAccountName`
-
-The name of the parent Gremlin database. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `graphs`
-
-Array of graphs to deploy in the Gremlin database.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `maxThroughput`
-
-Represents maximum throughput, the resource can scale up to. Cannot be set together with `throughput`. If `throughput` is set to something else than -1, this autoscale setting is ignored.
-
-- Required: No
-- Type: int
-- Default: `4000`
-
-### Parameter: `tags`
-
-Tags of the Gremlin database resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `throughput`
-
-Request Units per second (for example 10000). Cannot be set together with `maxThroughput`.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the Gremlin database. |
-| `resourceGroupName` | string | The name of the resource group the Gremlin database was created in. |
-| `resourceId` | string | The resource ID of the Gremlin database. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `graphs`
-
-List of graph databaseAccounts.
-
-
diff --git a/modules/document-db/database-account/gremlin-database/graph/main.bicep b/modules/document-db/database-account/gremlin-database/graph/main.bicep
deleted file mode 100644
index 2aa31f8ffb..0000000000
--- a/modules/document-db/database-account/gremlin-database/graph/main.bicep
+++ /dev/null
@@ -1,68 +0,0 @@
-metadata name = 'DocumentDB Database Accounts Gremlin Databases Graphs'
-metadata description = 'This module deploys a DocumentDB Database Accounts Gremlin Database Graph.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the graph.')
-param name string
-
-@description('Optional. Tags of the Gremlin graph resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment.')
-param databaseAccountName string
-
-@description('Conditional. The name of the parent Gremlin Database. Required if the template is used in a standalone deployment.')
-param gremlinDatabaseName string
-
-@description('Optional. Indexing policy of the graph.')
-param indexingPolicy object = {}
-
-@description('Optional. List of paths using which data within the container can be partitioned.')
-param partitionKeyPaths array = []
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' existing = {
- name: databaseAccountName
-
- resource gremlinDatabase 'gremlinDatabases@2023-04-15' existing = {
- name: gremlinDatabaseName
- }
-}
-
-resource gremlinGraph 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs@2023-04-15' = {
- name: name
- tags: tags
- parent: databaseAccount::gremlinDatabase
- properties: {
- resource: {
- id: name
- indexingPolicy: !empty(indexingPolicy) ? indexingPolicy : null
- partitionKey: {
- paths: !empty(partitionKeyPaths) ? partitionKeyPaths : null
- }
- }
- }
-}
-
-@description('The name of the graph.')
-output name string = gremlinGraph.name
-
-@description('The resource ID of the graph.')
-output resourceId string = gremlinGraph.id
-
-@description('The name of the resource group the graph was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/document-db/database-account/gremlin-database/graph/main.json b/modules/document-db/database-account/gremlin-database/graph/main.json
deleted file mode 100644
index 140ebcbb80..0000000000
--- a/modules/document-db/database-account/gremlin-database/graph/main.json
+++ /dev/null
@@ -1,135 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "16432474498986701571"
- },
- "name": "DocumentDB Database Accounts Gremlin Databases Graphs",
- "description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the graph."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Gremlin graph resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "gremlinDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Gremlin Database. Required if the template is used in a standalone deployment."
- }
- },
- "indexingPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Indexing policy of the graph."
- }
- },
- "partitionKeyPaths": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of paths using which data within the container can be partitioned."
- }
- }
- },
- "resources": {
- "databaseAccount::gremlinDatabase": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]",
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "gremlinGraph": {
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]",
- "indexingPolicy": "[if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null())]",
- "partitionKey": {
- "paths": "[if(not(empty(parameters('partitionKeyPaths'))), parameters('partitionKeyPaths'), null())]"
- }
- }
- },
- "dependsOn": [
- "databaseAccount::gremlinDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the graph."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the graph."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs', parameters('databaseAccountName'), parameters('gremlinDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the graph was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/gremlin-database/graph/version.json b/modules/document-db/database-account/gremlin-database/graph/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/gremlin-database/graph/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/gremlin-database/main.bicep b/modules/document-db/database-account/gremlin-database/main.bicep
deleted file mode 100644
index 98cbbdb001..0000000000
--- a/modules/document-db/database-account/gremlin-database/main.bicep
+++ /dev/null
@@ -1,94 +0,0 @@
-metadata name = 'DocumentDB Database Account Gremlin Databases'
-metadata description = 'This module deploys a Gremlin Database within a CosmosDB Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Gremlin database.')
-param name string
-
-@description('Optional. Tags of the Gremlin database resource.')
-param tags object?
-
-@description('Conditional. The name of the parent Gremlin database. Required if the template is used in a standalone deployment.')
-param databaseAccountName string
-
-@description('Optional. Array of graphs to deploy in the Gremlin database.')
-param graphs array = []
-
-@description('Optional. Represents maximum throughput, the resource can scale up to. Cannot be set together with `throughput`. If `throughput` is set to something else than -1, this autoscale setting is ignored.')
-param maxThroughput int = 4000
-
-@description('Optional. Request Units per second (for example 10000). Cannot be set together with `maxThroughput`.')
-param throughput int = -1
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' existing = {
- name: databaseAccountName
-}
-
-var databaseOptions = contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? {} : {
- autoscaleSettings: throughput == -1 ? {
- maxThroughput: maxThroughput
- } : null
- throughput: throughput != -1 ? throughput : null
-}
-
-resource gremlinDatabase 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases@2023-04-15' = {
- name: name
- tags: tags
- parent: databaseAccount
- properties: {
- options: databaseOptions
- resource: {
- id: name
- }
- }
-}
-
-module gremlinDatabase_gremlinGraphs 'graph/main.bicep' = [for graph in graphs: {
- name: '${uniqueString(deployment().name, gremlinDatabase.name)}-gremlindb-${graph.name}'
- params: {
- name: graph.name
- gremlinDatabaseName: name
- databaseAccountName: databaseAccountName
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- indexingPolicy: contains(graph, 'indexingPolicy') ? graph.indexingPolicy : true
- partitionKeyPaths: !empty(graph.partitionKeyPaths) ? graph.partitionKeyPaths : []
- }
-}]
-
-@description('The name of the Gremlin database.')
-output name string = gremlinDatabase.name
-
-@description('The resource ID of the Gremlin database.')
-output resourceId string = gremlinDatabase.id
-
-@description('The name of the resource group the Gremlin database was created in.')
-output resourceGroupName string = resourceGroup().name
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
diff --git a/modules/document-db/database-account/gremlin-database/main.json b/modules/document-db/database-account/gremlin-database/main.json
deleted file mode 100644
index 7d63c31282..0000000000
--- a/modules/document-db/database-account/gremlin-database/main.json
+++ /dev/null
@@ -1,321 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8314710518368415809"
- },
- "name": "DocumentDB Database Account Gremlin Databases",
- "description": "This module deploys a Gremlin Database within a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Gremlin database."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Gremlin database resource."
- }
- },
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Gremlin database. Required if the template is used in a standalone deployment."
- }
- },
- "graphs": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of graphs to deploy in the Gremlin database."
- }
- },
- "maxThroughput": {
- "type": "int",
- "defaultValue": 4000,
- "metadata": {
- "description": "Optional. Represents maximum throughput, the resource can scale up to. Cannot be set together with `throughput`. If `throughput` is set to something else than -1, this autoscale setting is ignored."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Request Units per second (for example 10000). Cannot be set together with `maxThroughput`."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "gremlinDatabase": {
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), createObject(), createObject('autoscaleSettings', if(equals(parameters('throughput'), -1), createObject('maxThroughput', parameters('maxThroughput')), null()), 'throughput', if(not(equals(parameters('throughput'), -1)), parameters('throughput'), null())))]",
- "resource": {
- "id": "[parameters('name')]"
- }
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "gremlinDatabase_gremlinGraphs": {
- "copy": {
- "name": "gremlinDatabase_gremlinGraphs",
- "count": "[length(parameters('graphs'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-gremlindb-{1}', uniqueString(deployment().name, parameters('name')), parameters('graphs')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('graphs')[copyIndex()].name]"
- },
- "gremlinDatabaseName": {
- "value": "[parameters('name')]"
- },
- "databaseAccountName": {
- "value": "[parameters('databaseAccountName')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "indexingPolicy": "[if(contains(parameters('graphs')[copyIndex()], 'indexingPolicy'), createObject('value', parameters('graphs')[copyIndex()].indexingPolicy), createObject('value', true()))]",
- "partitionKeyPaths": "[if(not(empty(parameters('graphs')[copyIndex()].partitionKeyPaths)), createObject('value', parameters('graphs')[copyIndex()].partitionKeyPaths), createObject('value', createArray()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4035784770059836359"
- },
- "name": "DocumentDB Database Accounts Gremlin Databases Graphs",
- "description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the graph."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Gremlin graph resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "gremlinDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Gremlin Database. Required if the template is used in a standalone deployment."
- }
- },
- "indexingPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Indexing policy of the graph."
- }
- },
- "partitionKeyPaths": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of paths using which data within the container can be partitioned."
- }
- }
- },
- "resources": {
- "databaseAccount::gremlinDatabase": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]",
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "gremlinGraph": {
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]",
- "indexingPolicy": "[if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null())]",
- "partitionKey": {
- "paths": "[if(not(empty(parameters('partitionKeyPaths'))), parameters('partitionKeyPaths'), null())]"
- }
- }
- },
- "dependsOn": [
- "databaseAccount::gremlinDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the graph."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the graph."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs', parameters('databaseAccountName'), parameters('gremlinDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the graph was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "gremlinDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Gremlin database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Gremlin database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/gremlinDatabases', parameters('databaseAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Gremlin database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/gremlin-database/version.json b/modules/document-db/database-account/gremlin-database/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/gremlin-database/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/main.bicep b/modules/document-db/database-account/main.bicep
deleted file mode 100644
index 728a5b2274..0000000000
--- a/modules/document-db/database-account/main.bicep
+++ /dev/null
@@ -1,503 +0,0 @@
-metadata name = 'DocumentDB Database Accounts'
-metadata description = 'This module deploys a DocumentDB Database Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Database Account.')
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags of the Database Account resource.')
-param tags object?
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The offer type for the Cosmos DB database account.')
-@allowed([
- 'Standard'
-])
-param databaseAccountOfferType string = 'Standard'
-
-@description('Required. Locations enabled for the Cosmos DB account.')
-param locations array
-
-@allowed([
- 'Eventual'
- 'ConsistentPrefix'
- 'Session'
- 'BoundedStaleness'
- 'Strong'
-])
-@description('Optional. The default consistency level of the Cosmos DB account.')
-param defaultConsistencyLevel string = 'Session'
-
-@description('Optional. Enable automatic failover for regions.')
-param automaticFailover bool = true
-
-@description('Optional. Flag to indicate whether Free Tier is enabled.')
-param enableFreeTier bool = false
-
-@minValue(10)
-@maxValue(2147483647)
-@description('Optional. Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000.')
-param maxStalenessPrefix int = 100000
-
-@minValue(5)
-@maxValue(86400)
-@description('Optional. Max lag time (minutes). Required for BoundedStaleness. Valid ranges, Single Region: 5 to 84600. Multi Region: 300 to 86400.')
-param maxIntervalInSeconds int = 300
-
-@description('Optional. Specifies the MongoDB server version to use.')
-@allowed([
- '3.2'
- '3.6'
- '4.0'
- '4.2'
-])
-param serverVersion string = '4.2'
-
-@description('Optional. SQL Databases configurations.')
-param sqlDatabases array = []
-
-@description('Optional. MongoDB Databases configurations.')
-param mongodbDatabases array = []
-
-@description('Optional. Gremlin Databases configurations.')
-param gremlinDatabases array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalIds\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@allowed([
- 'EnableCassandra'
- 'EnableTable'
- 'EnableGremlin'
- 'EnableMongo'
- 'DisableRateLimitingResponses'
- 'EnableServerless'
-])
-@description('Optional. List of Cosmos DB capabilities for the account.')
-param capabilitiesToAdd array = []
-
-@allowed([
- 'Periodic'
- 'Continuous'
-])
-@description('Optional. Describes the mode of backups.')
-param backupPolicyType string = 'Continuous'
-
-@allowed([
- 'Continuous30Days'
- 'Continuous7Days'
-])
-@description('Optional. Configuration values for continuous mode backup.')
-param backupPolicyContinuousTier string = 'Continuous30Days'
-
-@minValue(60)
-@maxValue(1440)
-@description('Optional. An integer representing the interval in minutes between two backups. Only applies to periodic backup type.')
-param backupIntervalInMinutes int = 240
-
-@minValue(2)
-@maxValue(720)
-@description('Optional. An integer representing the time (in hours) that each backup is retained. Only applies to periodic backup type.')
-param backupRetentionIntervalInHours int = 8
-
-@allowed([
- 'Geo'
- 'Local'
- 'Zone'
-])
-@description('Optional. Enum to indicate type of backup residency. Only applies to periodic backup type.')
-param backupStorageRedundancy string = 'Local'
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var consistencyPolicy = {
- Eventual: {
- defaultConsistencyLevel: 'Eventual'
- }
- ConsistentPrefix: {
- defaultConsistencyLevel: 'ConsistentPrefix'
- }
- Session: {
- defaultConsistencyLevel: 'Session'
- }
- BoundedStaleness: {
- defaultConsistencyLevel: 'BoundedStaleness'
- maxStalenessPrefix: maxStalenessPrefix
- maxIntervalInSeconds: maxIntervalInSeconds
- }
- Strong: {
- defaultConsistencyLevel: 'Strong'
- }
-}
-
-var databaseAccount_locations = [for location in locations: {
- failoverPriority: location.failoverPriority
- isZoneRedundant: location.isZoneRedundant
- locationName: location.locationName
-}]
-
-var kind = !empty(sqlDatabases) || !empty(gremlinDatabases) ? 'GlobalDocumentDB' : (!empty(mongodbDatabases) ? 'MongoDB' : 'Parse')
-
-var enableReferencedModulesTelemetry = false
-
-var capabilities = [for capability in capabilitiesToAdd: {
- name: capability
-}]
-
-var backupPolicy = backupPolicyType == 'Continuous' ? {
- type: backupPolicyType
- continuousModeProperties: {
- tier: backupPolicyContinuousTier
- }
-} : {
- type: backupPolicyType
- periodicModeProperties: {
- backupIntervalInMinutes: backupIntervalInMinutes
- backupRetentionIntervalInHours: backupRetentionIntervalInHours
- backupStorageRedundancy: backupStorageRedundancy
- }
-}
-
-var databaseAccount_properties = union({
- databaseAccountOfferType: databaseAccountOfferType
- }, ((!empty(sqlDatabases) || !empty(mongodbDatabases) || !empty(gremlinDatabases)) ? {
- // Common properties
- consistencyPolicy: consistencyPolicy[defaultConsistencyLevel]
- locations: databaseAccount_locations
- capabilities: capabilities
- enableFreeTier: enableFreeTier
- backupPolicy: backupPolicy
- } : {}), (!empty(sqlDatabases) ? {
- // SQLDB properties
- enableAutomaticFailover: automaticFailover
- } : {}), (!empty(mongodbDatabases) ? {
- // MongoDb properties
- apiProperties: {
- serverVersion: serverVersion
- }
- } : {}))
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Cosmos DB Account Reader Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fbdf93bf-df7d-467e-a4d2-9458aa1360c8')
- 'Cosmos DB Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '230815da-be43-4aae-9cb4-875f7bd000aa')
- CosmosBackupOperator: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'db7b14f2-5adf-42da-9f96-f2ee17bab5cb')
- CosmosRestoreOperator: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5432c526-bc82-444a-b7ba-57c5b0b5b34f')
- 'DocumentDB Account Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5bd9cd88-fe45-4216-938b-f97437e15450')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
- name: name
- location: location
- tags: tags
- identity: identity
- kind: kind
- properties: databaseAccount_properties
-}
-
-resource databaseAccount_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: databaseAccount
-}
-
-resource databaseAccount_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: databaseAccount
-}]
-
-resource databaseAccount_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(databaseAccount.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: databaseAccount
-}]
-
-module databaseAccount_sqlDatabases 'sql-database/main.bicep' = [for sqlDatabase in sqlDatabases: {
- name: '${uniqueString(deployment().name, location)}-sqldb-${sqlDatabase.name}'
- params: {
- databaseAccountName: databaseAccount.name
- name: sqlDatabase.name
- containers: contains(sqlDatabase, 'containers') ? sqlDatabase.containers : []
- throughput: contains(sqlDatabase, 'throughput') ? sqlDatabase.throughput : 400
- autoscaleSettingsMaxThroughput: contains(sqlDatabase, 'autoscaleSettingsMaxThroughput') ? sqlDatabase.autoscaleSettingsMaxThroughput : -1
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module databaseAccount_mongodbDatabases 'mongodb-database/main.bicep' = [for mongodbDatabase in mongodbDatabases: {
- name: '${uniqueString(deployment().name, location)}-mongodb-${mongodbDatabase.name}'
- params: {
- databaseAccountName: databaseAccount.name
- name: mongodbDatabase.name
- collections: contains(mongodbDatabase, 'collections') ? mongodbDatabase.collections : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module databaseAccount_gremlinDatabases 'gremlin-database/main.bicep' = [for gremlinDatabase in gremlinDatabases: {
- name: '${uniqueString(deployment().name, location)}-gremlin-${gremlinDatabase.name}'
- params: {
- databaseAccountName: databaseAccount.name
- name: gremlinDatabase.name
- graphs: contains(gremlinDatabase, 'graphs') ? gremlinDatabase.graphs : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module databaseAccount_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-databaseAccount-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.service
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(databaseAccount.id, '/'))}-${privateEndpoint.?service ?? privateEndpoint.service}-${index}'
- serviceResourceId: databaseAccount.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-@description('The name of the database account.')
-output name string = databaseAccount.name
-
-@description('The resource ID of the database account.')
-output resourceId string = databaseAccount.id
-
-@description('The name of the resource group the database account was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(databaseAccount.identity, 'principalId') ? databaseAccount.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = databaseAccount.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Required. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/document-db/database-account/main.json b/modules/document-db/database-account/main.json
deleted file mode 100644
index 2b2a72a670..0000000000
--- a/modules/document-db/database-account/main.json
+++ /dev/null
@@ -1,2477 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17655203248795781813"
- },
- "name": "DocumentDB Database Accounts",
- "description": "This module deploys a DocumentDB Database Account.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "metadata": {
- "description": "Required. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Database Account."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Database Account resource."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "databaseAccountOfferType": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Standard"
- ],
- "metadata": {
- "description": "Optional. The offer type for the Cosmos DB database account."
- }
- },
- "locations": {
- "type": "array",
- "metadata": {
- "description": "Required. Locations enabled for the Cosmos DB account."
- }
- },
- "defaultConsistencyLevel": {
- "type": "string",
- "defaultValue": "Session",
- "allowedValues": [
- "Eventual",
- "ConsistentPrefix",
- "Session",
- "BoundedStaleness",
- "Strong"
- ],
- "metadata": {
- "description": "Optional. The default consistency level of the Cosmos DB account."
- }
- },
- "automaticFailover": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable automatic failover for regions."
- }
- },
- "enableFreeTier": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Flag to indicate whether Free Tier is enabled."
- }
- },
- "maxStalenessPrefix": {
- "type": "int",
- "defaultValue": 100000,
- "minValue": 10,
- "maxValue": 2147483647,
- "metadata": {
- "description": "Optional. Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000."
- }
- },
- "maxIntervalInSeconds": {
- "type": "int",
- "defaultValue": 300,
- "minValue": 5,
- "maxValue": 86400,
- "metadata": {
- "description": "Optional. Max lag time (minutes). Required for BoundedStaleness. Valid ranges, Single Region: 5 to 84600. Multi Region: 300 to 86400."
- }
- },
- "serverVersion": {
- "type": "string",
- "defaultValue": "4.2",
- "allowedValues": [
- "3.2",
- "3.6",
- "4.0",
- "4.2"
- ],
- "metadata": {
- "description": "Optional. Specifies the MongoDB server version to use."
- }
- },
- "sqlDatabases": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. SQL Databases configurations."
- }
- },
- "mongodbDatabases": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. MongoDB Databases configurations."
- }
- },
- "gremlinDatabases": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Gremlin Databases configurations."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "capabilitiesToAdd": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "EnableCassandra",
- "EnableTable",
- "EnableGremlin",
- "EnableMongo",
- "DisableRateLimitingResponses",
- "EnableServerless"
- ],
- "metadata": {
- "description": "Optional. List of Cosmos DB capabilities for the account."
- }
- },
- "backupPolicyType": {
- "type": "string",
- "defaultValue": "Continuous",
- "allowedValues": [
- "Periodic",
- "Continuous"
- ],
- "metadata": {
- "description": "Optional. Describes the mode of backups."
- }
- },
- "backupPolicyContinuousTier": {
- "type": "string",
- "defaultValue": "Continuous30Days",
- "allowedValues": [
- "Continuous30Days",
- "Continuous7Days"
- ],
- "metadata": {
- "description": "Optional. Configuration values for continuous mode backup."
- }
- },
- "backupIntervalInMinutes": {
- "type": "int",
- "defaultValue": 240,
- "minValue": 60,
- "maxValue": 1440,
- "metadata": {
- "description": "Optional. An integer representing the interval in minutes between two backups. Only applies to periodic backup type."
- }
- },
- "backupRetentionIntervalInHours": {
- "type": "int",
- "defaultValue": 8,
- "minValue": 2,
- "maxValue": 720,
- "metadata": {
- "description": "Optional. An integer representing the time (in hours) that each backup is retained. Only applies to periodic backup type."
- }
- },
- "backupStorageRedundancy": {
- "type": "string",
- "defaultValue": "Local",
- "allowedValues": [
- "Geo",
- "Local",
- "Zone"
- ],
- "metadata": {
- "description": "Optional. Enum to indicate type of backup residency. Only applies to periodic backup type."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "databaseAccount_locations",
- "count": "[length(parameters('locations'))]",
- "input": {
- "failoverPriority": "[parameters('locations')[copyIndex('databaseAccount_locations')].failoverPriority]",
- "isZoneRedundant": "[parameters('locations')[copyIndex('databaseAccount_locations')].isZoneRedundant]",
- "locationName": "[parameters('locations')[copyIndex('databaseAccount_locations')].locationName]"
- }
- },
- {
- "name": "capabilities",
- "count": "[length(parameters('capabilitiesToAdd'))]",
- "input": {
- "name": "[parameters('capabilitiesToAdd')[copyIndex('capabilities')]]"
- }
- }
- ],
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "consistencyPolicy": {
- "Eventual": {
- "defaultConsistencyLevel": "Eventual"
- },
- "ConsistentPrefix": {
- "defaultConsistencyLevel": "ConsistentPrefix"
- },
- "Session": {
- "defaultConsistencyLevel": "Session"
- },
- "BoundedStaleness": {
- "defaultConsistencyLevel": "BoundedStaleness",
- "maxStalenessPrefix": "[parameters('maxStalenessPrefix')]",
- "maxIntervalInSeconds": "[parameters('maxIntervalInSeconds')]"
- },
- "Strong": {
- "defaultConsistencyLevel": "Strong"
- }
- },
- "kind": "[if(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('gremlinDatabases')))), 'GlobalDocumentDB', if(not(empty(parameters('mongodbDatabases'))), 'MongoDB', 'Parse'))]",
- "enableReferencedModulesTelemetry": false,
- "backupPolicy": "[if(equals(parameters('backupPolicyType'), 'Continuous'), createObject('type', parameters('backupPolicyType'), 'continuousModeProperties', createObject('tier', parameters('backupPolicyContinuousTier'))), createObject('type', parameters('backupPolicyType'), 'periodicModeProperties', createObject('backupIntervalInMinutes', parameters('backupIntervalInMinutes'), 'backupRetentionIntervalInHours', parameters('backupRetentionIntervalInHours'), 'backupStorageRedundancy', parameters('backupStorageRedundancy'))))]",
- "databaseAccount_properties": "[union(createObject('databaseAccountOfferType', parameters('databaseAccountOfferType')), if(or(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('mongodbDatabases')))), not(empty(parameters('gremlinDatabases')))), createObject('consistencyPolicy', variables('consistencyPolicy')[parameters('defaultConsistencyLevel')], 'locations', variables('databaseAccount_locations'), 'capabilities', variables('capabilities'), 'enableFreeTier', parameters('enableFreeTier'), 'backupPolicy', variables('backupPolicy')), createObject()), if(not(empty(parameters('sqlDatabases'))), createObject('enableAutomaticFailover', parameters('automaticFailover')), createObject()), if(not(empty(parameters('mongodbDatabases'))), createObject('apiProperties', createObject('serverVersion', parameters('serverVersion'))), createObject()))]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Cosmos DB Account Reader Role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fbdf93bf-df7d-467e-a4d2-9458aa1360c8')]",
- "Cosmos DB Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '230815da-be43-4aae-9cb4-875f7bd000aa')]",
- "CosmosBackupOperator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'db7b14f2-5adf-42da-9f96-f2ee17bab5cb')]",
- "CosmosRestoreOperator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5432c526-bc82-444a-b7ba-57c5b0b5b34f')]",
- "DocumentDB Account Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5bd9cd88-fe45-4216-938b-f97437e15450')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "kind": "[variables('kind')]",
- "properties": "[variables('databaseAccount_properties')]"
- },
- "databaseAccount_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.DocumentDB/databaseAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "databaseAccount_diagnosticSettings": {
- "copy": {
- "name": "databaseAccount_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.DocumentDB/databaseAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "databaseAccount_roleAssignments": {
- "copy": {
- "name": "databaseAccount_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.DocumentDB/databaseAccounts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "databaseAccount_sqlDatabases": {
- "copy": {
- "name": "databaseAccount_sqlDatabases",
- "count": "[length(parameters('sqlDatabases'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-sqldb-{1}', uniqueString(deployment().name, parameters('location')), parameters('sqlDatabases')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('sqlDatabases')[copyIndex()].name]"
- },
- "containers": "[if(contains(parameters('sqlDatabases')[copyIndex()], 'containers'), createObject('value', parameters('sqlDatabases')[copyIndex()].containers), createObject('value', createArray()))]",
- "throughput": "[if(contains(parameters('sqlDatabases')[copyIndex()], 'throughput'), createObject('value', parameters('sqlDatabases')[copyIndex()].throughput), createObject('value', 400))]",
- "autoscaleSettingsMaxThroughput": "[if(contains(parameters('sqlDatabases')[copyIndex()], 'autoscaleSettingsMaxThroughput'), createObject('value', parameters('sqlDatabases')[copyIndex()].autoscaleSettingsMaxThroughput), createObject('value', -1))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5236608683863945170"
- },
- "name": "DocumentDB Database Account SQL Databases",
- "description": "This module deploys a SQL Database in a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the SQL database ."
- }
- },
- "containers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of containers to deploy in the SQL database."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Request units per second. Will be set to null if autoscaleSettingsMaxThroughput is used."
- }
- },
- "autoscaleSettingsMaxThroughput": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the SQL database resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "sqlDatabase": {
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(equals(parameters('autoscaleSettingsMaxThroughput'), -1), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), -1)), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "container": {
- "copy": {
- "name": "container",
- "count": "[length(parameters('containers'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-sqldb-{1}', uniqueString(deployment().name, parameters('name')), parameters('containers')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('databaseAccountName')]"
- },
- "sqlDatabaseName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('containers')[copyIndex()].name]"
- },
- "analyticalStorageTtl": "[if(contains(parameters('containers')[copyIndex()], 'analyticalStorageTtl'), createObject('value', parameters('containers')[copyIndex()].analyticalStorageTtl), createObject('value', 0))]",
- "autoscaleSettingsMaxThroughput": "[if(contains(parameters('containers')[copyIndex()], 'autoscaleSettingsMaxThroughput'), createObject('value', parameters('containers')[copyIndex()].autoscaleSettingsMaxThroughput), createObject('value', -1))]",
- "conflictResolutionPolicy": "[if(contains(parameters('containers')[copyIndex()], 'conflictResolutionPolicy'), createObject('value', parameters('containers')[copyIndex()].conflictResolutionPolicy), createObject('value', createObject()))]",
- "defaultTtl": "[if(contains(parameters('containers')[copyIndex()], 'defaultTtl'), createObject('value', parameters('containers')[copyIndex()].defaultTtl), createObject('value', -1))]",
- "indexingPolicy": "[if(contains(parameters('containers')[copyIndex()], 'indexingPolicy'), createObject('value', parameters('containers')[copyIndex()].indexingPolicy), createObject('value', createObject()))]",
- "kind": "[if(contains(parameters('containers')[copyIndex()], 'kind'), createObject('value', parameters('containers')[copyIndex()].kind), createObject('value', 'Hash'))]",
- "paths": "[if(contains(parameters('containers')[copyIndex()], 'paths'), createObject('value', parameters('containers')[copyIndex()].paths), createObject('value', createArray()))]",
- "throughput": "[if(contains(parameters('containers')[copyIndex()], 'throughput'), createObject('value', parameters('containers')[copyIndex()].throughput), createObject('value', 400))]",
- "uniqueKeyPolicyKeys": "[if(contains(parameters('containers')[copyIndex()], 'uniqueKeyPolicyKeys'), createObject('value', parameters('containers')[copyIndex()].uniqueKeyPolicyKeys), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7712060799698135624"
- },
- "name": "DocumentDB Database Account SQL Database Containers",
- "description": "This module deploys a SQL Database Container in a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "sqlDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent SQL Database. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the container."
- }
- },
- "analyticalStorageTtl": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Indicates how long data should be retained in the analytical store, for a container. Analytical store is enabled when ATTL is set with a value other than 0. If the value is set to -1, the analytical store retains all historical data, irrespective of the retention of the data in the transactional store."
- }
- },
- "conflictResolutionPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The conflict resolution policy for the container. Conflicts and conflict resolution policies are applicable if the Azure Cosmos DB account is configured with multiple write regions."
- }
- },
- "defaultTtl": {
- "type": "int",
- "defaultValue": -1,
- "minValue": -1,
- "maxValue": 2147483647,
- "metadata": {
- "description": "Optional. Default time to live (in seconds). With Time to Live or TTL, Azure Cosmos DB provides the ability to delete items automatically from a container after a certain time period. If the value is set to \"-1\", it is equal to infinity, and items dont expire by default."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Request Units per second. Will be set to null if autoscaleSettingsMaxThroughput is used."
- }
- },
- "autoscaleSettingsMaxThroughput": {
- "type": "int",
- "defaultValue": -1,
- "maxValue": 1000000,
- "metadata": {
- "description": "Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the SQL Database resource."
- }
- },
- "paths": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of paths using which data within the container can be partitioned."
- }
- },
- "indexingPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Indexing policy of the container."
- }
- },
- "uniqueKeyPolicyKeys": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "Hash",
- "allowedValues": [
- "Hash",
- "MultiHash",
- "Range"
- ],
- "metadata": {
- "description": "Optional. Indicates the kind of algorithm used for partitioning."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "databaseAccount::sqlDatabase": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]",
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "container": {
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('sqlDatabaseName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "analyticalStorageTtl": "[parameters('analyticalStorageTtl')]",
- "conflictResolutionPolicy": "[parameters('conflictResolutionPolicy')]",
- "defaultTtl": "[parameters('defaultTtl')]",
- "id": "[parameters('name')]",
- "indexingPolicy": "[if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null())]",
- "partitionKey": {
- "paths": "[parameters('paths')]",
- "kind": "[parameters('kind')]"
- },
- "uniqueKeyPolicy": "[if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(equals(parameters('autoscaleSettingsMaxThroughput'), -1), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), -1)), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
- },
- "dependsOn": [
- "databaseAccount::sqlDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the container."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the container."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers', parameters('databaseAccountName'), parameters('sqlDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the container was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "sqlDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the SQL database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the SQL database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the SQL database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "databaseAccount_mongodbDatabases": {
- "copy": {
- "name": "databaseAccount_mongodbDatabases",
- "count": "[length(parameters('mongodbDatabases'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-mongodb-{1}', uniqueString(deployment().name, parameters('location')), parameters('mongodbDatabases')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('mongodbDatabases')[copyIndex()].name]"
- },
- "collections": "[if(contains(parameters('mongodbDatabases')[copyIndex()], 'collections'), createObject('value', parameters('mongodbDatabases')[copyIndex()].collections), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10909630292111406683"
- },
- "name": "DocumentDB Database Account MongoDB Databases",
- "description": "This module deploys a MongoDB Database within a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the mongodb database."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Name of the mongodb database."
- }
- },
- "collections": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Collections in the mongodb database."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "mongodbDatabase": {
- "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', parameters('throughput')))]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "mongodbDatabase_collections": {
- "copy": {
- "name": "mongodbDatabase_collections",
- "count": "[length(parameters('collections'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-collection-{1}', uniqueString(deployment().name, parameters('name')), parameters('collections')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('databaseAccountName')]"
- },
- "mongodbDatabaseName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('collections')[copyIndex()].name]"
- },
- "indexes": {
- "value": "[parameters('collections')[copyIndex()].indexes]"
- },
- "shardKey": {
- "value": "[parameters('collections')[copyIndex()].shardKey]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "2460347721734751381"
- },
- "name": "DocumentDB Database Account MongoDB Database Collections",
- "description": "This module deploys a MongoDB Database Collection.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment."
- }
- },
- "mongodbDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent mongodb database. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the collection."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Name of the mongodb database."
- }
- },
- "indexes": {
- "type": "array",
- "metadata": {
- "description": "Required. Indexes for the collection."
- }
- },
- "shardKey": {
- "type": "object",
- "metadata": {
- "description": "Required. ShardKey for the collection."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('mongodbDatabaseName'), parameters('name'))]",
- "properties": {
- "options": "[if(contains(reference(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName')), '2023-04-15').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', parameters('throughput')))]",
- "resource": {
- "id": "[parameters('name')]",
- "indexes": "[parameters('indexes')]",
- "shardKey": "[parameters('shardKey')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the mongodb database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the mongodb database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections', parameters('databaseAccountName'), parameters('mongodbDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the mongodb database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "mongodbDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the mongodb database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the mongodb database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases', parameters('databaseAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the mongodb database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "databaseAccount_gremlinDatabases": {
- "copy": {
- "name": "databaseAccount_gremlinDatabases",
- "count": "[length(parameters('gremlinDatabases'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-gremlin-{1}', uniqueString(deployment().name, parameters('location')), parameters('gremlinDatabases')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('gremlinDatabases')[copyIndex()].name]"
- },
- "graphs": "[if(contains(parameters('gremlinDatabases')[copyIndex()], 'graphs'), createObject('value', parameters('gremlinDatabases')[copyIndex()].graphs), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8314710518368415809"
- },
- "name": "DocumentDB Database Account Gremlin Databases",
- "description": "This module deploys a Gremlin Database within a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Gremlin database."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Gremlin database resource."
- }
- },
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Gremlin database. Required if the template is used in a standalone deployment."
- }
- },
- "graphs": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of graphs to deploy in the Gremlin database."
- }
- },
- "maxThroughput": {
- "type": "int",
- "defaultValue": 4000,
- "metadata": {
- "description": "Optional. Represents maximum throughput, the resource can scale up to. Cannot be set together with `throughput`. If `throughput` is set to something else than -1, this autoscale setting is ignored."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Request Units per second (for example 10000). Cannot be set together with `maxThroughput`."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "gremlinDatabase": {
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), createObject(), createObject('autoscaleSettings', if(equals(parameters('throughput'), -1), createObject('maxThroughput', parameters('maxThroughput')), null()), 'throughput', if(not(equals(parameters('throughput'), -1)), parameters('throughput'), null())))]",
- "resource": {
- "id": "[parameters('name')]"
- }
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "gremlinDatabase_gremlinGraphs": {
- "copy": {
- "name": "gremlinDatabase_gremlinGraphs",
- "count": "[length(parameters('graphs'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-gremlindb-{1}', uniqueString(deployment().name, parameters('name')), parameters('graphs')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('graphs')[copyIndex()].name]"
- },
- "gremlinDatabaseName": {
- "value": "[parameters('name')]"
- },
- "databaseAccountName": {
- "value": "[parameters('databaseAccountName')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "indexingPolicy": "[if(contains(parameters('graphs')[copyIndex()], 'indexingPolicy'), createObject('value', parameters('graphs')[copyIndex()].indexingPolicy), createObject('value', true()))]",
- "partitionKeyPaths": "[if(not(empty(parameters('graphs')[copyIndex()].partitionKeyPaths)), createObject('value', parameters('graphs')[copyIndex()].partitionKeyPaths), createObject('value', createArray()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4035784770059836359"
- },
- "name": "DocumentDB Database Accounts Gremlin Databases Graphs",
- "description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the graph."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the Gremlin graph resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "gremlinDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Gremlin Database. Required if the template is used in a standalone deployment."
- }
- },
- "indexingPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Indexing policy of the graph."
- }
- },
- "partitionKeyPaths": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of paths using which data within the container can be partitioned."
- }
- }
- },
- "resources": {
- "databaseAccount::gremlinDatabase": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]",
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "gremlinGraph": {
- "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]",
- "indexingPolicy": "[if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null())]",
- "partitionKey": {
- "paths": "[if(not(empty(parameters('partitionKeyPaths'))), parameters('partitionKeyPaths'), null())]"
- }
- }
- },
- "dependsOn": [
- "databaseAccount::gremlinDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the graph."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the graph."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs', parameters('databaseAccountName'), parameters('gremlinDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the graph was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "gremlinDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Gremlin database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Gremlin database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/gremlinDatabases', parameters('databaseAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Gremlin database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "databaseAccount_privateEndpoints": {
- "copy": {
- "name": "databaseAccount_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-databaseAccount-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].service), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "databaseAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the database account."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the database account."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the database account was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('databaseAccount', '2023-04-15', 'full').identity, 'principalId')), reference('databaseAccount', '2023-04-15', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('databaseAccount', '2023-04-15', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/mongodb-database/README.md b/modules/document-db/database-account/mongodb-database/README.md
deleted file mode 100644
index b20e184e59..0000000000
--- a/modules/document-db/database-account/mongodb-database/README.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# DocumentDB Database Account MongoDB Databases `[Microsoft.DocumentDB/databaseAccounts/mongodbDatabases]`
-
-This module deploys a MongoDB Database within a CosmosDB Account.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/mongodbDatabases) |
-| `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/mongodbDatabases/collections) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the mongodb database. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`databaseAccountName`](#parameter-databaseaccountname) | string | The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`collections`](#parameter-collections) | array | Collections in the mongodb database. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`throughput`](#parameter-throughput) | int | Name of the mongodb database. |
-
-### Parameter: `name`
-
-Name of the mongodb database.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `databaseAccountName`
-
-The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `collections`
-
-Collections in the mongodb database.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `throughput`
-
-Name of the mongodb database.
-
-- Required: No
-- Type: int
-- Default: `400`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the mongodb database. |
-| `resourceGroupName` | string | The name of the resource group the mongodb database was created in. |
-| `resourceId` | string | The resource ID of the mongodb database. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/document-db/database-account/mongodb-database/collection/README.md b/modules/document-db/database-account/mongodb-database/collection/README.md
deleted file mode 100644
index da1fc38cd2..0000000000
--- a/modules/document-db/database-account/mongodb-database/collection/README.md
+++ /dev/null
@@ -1,237 +0,0 @@
-# DocumentDB Database Account MongoDB Database Collections `[Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections]`
-
-This module deploys a MongoDB Database Collection.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/mongodbDatabases/collections) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`indexes`](#parameter-indexes) | array | Indexes for the collection. |
-| [`name`](#parameter-name) | string | Name of the collection. |
-| [`shardKey`](#parameter-shardkey) | object | ShardKey for the collection. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`databaseAccountName`](#parameter-databaseaccountname) | string | The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment. |
-| [`mongodbDatabaseName`](#parameter-mongodbdatabasename) | string | The name of the parent mongodb database. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`throughput`](#parameter-throughput) | int | Name of the mongodb database. |
-
-### Parameter: `indexes`
-
-Indexes for the collection.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `name`
-
-Name of the collection.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `shardKey`
-
-ShardKey for the collection.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `databaseAccountName`
-
-The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `mongodbDatabaseName`
-
-The name of the parent mongodb database. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `throughput`
-
-Name of the mongodb database.
-
-- Required: No
-- Type: int
-- Default: `400`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the mongodb database. |
-| `resourceGroupName` | string | The name of the resource group the mongodb database was created in. |
-| `resourceId` | string | The resource ID of the mongodb database. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `indexes`
-
-Array of index keys as MongoIndex. The array contains keys for each MongoDB collection in the Azure Cosmos DB service with a collection resource object (as `key`) and collection index options (as `options`).
-
-
-
-### Parameter Usage: `shardKey`
-
-The shard key and partition kind pair, only support "Hash" partition kind.
-
-
diff --git a/modules/document-db/database-account/mongodb-database/collection/main.bicep b/modules/document-db/database-account/mongodb-database/collection/main.bicep
deleted file mode 100644
index 2c4da8e886..0000000000
--- a/modules/document-db/database-account/mongodb-database/collection/main.bicep
+++ /dev/null
@@ -1,68 +0,0 @@
-metadata name = 'DocumentDB Database Account MongoDB Database Collections'
-metadata description = 'This module deploys a MongoDB Database Collection.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment.')
-param databaseAccountName string
-
-@description('Conditional. The name of the parent mongodb database. Required if the template is used in a standalone deployment.')
-param mongodbDatabaseName string
-
-@description('Required. Name of the collection.')
-param name string
-
-@description('Optional. Name of the mongodb database.')
-param throughput int = 400
-
-@description('Required. Indexes for the collection.')
-param indexes array
-
-@description('Required. ShardKey for the collection.')
-param shardKey object
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' existing = {
- name: databaseAccountName
-
- resource mongodbDatabase 'mongodbDatabases@2023-04-15' existing = {
- name: mongodbDatabaseName
- }
-}
-
-resource collection 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections@2023-04-15' = {
- name: name
- parent: databaseAccount::mongodbDatabase
- properties: {
- options: contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? null : {
- throughput: throughput
- }
- resource: {
- id: name
- indexes: indexes
- shardKey: shardKey
- }
- }
-}
-
-@description('The name of the mongodb database.')
-output name string = collection.name
-
-@description('The resource ID of the mongodb database.')
-output resourceId string = collection.id
-
-@description('The name of the resource group the mongodb database was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/document-db/database-account/mongodb-database/collection/main.json b/modules/document-db/database-account/mongodb-database/collection/main.json
deleted file mode 100644
index 7b4dd23c09..0000000000
--- a/modules/document-db/database-account/mongodb-database/collection/main.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14573428332905458641"
- },
- "name": "DocumentDB Database Account MongoDB Database Collections",
- "description": "This module deploys a MongoDB Database Collection.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment."
- }
- },
- "mongodbDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent mongodb database. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the collection."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Name of the mongodb database."
- }
- },
- "indexes": {
- "type": "array",
- "metadata": {
- "description": "Required. Indexes for the collection."
- }
- },
- "shardKey": {
- "type": "object",
- "metadata": {
- "description": "Required. ShardKey for the collection."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('mongodbDatabaseName'), parameters('name'))]",
- "properties": {
- "options": "[if(contains(reference(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName')), '2023-04-15').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', parameters('throughput')))]",
- "resource": {
- "id": "[parameters('name')]",
- "indexes": "[parameters('indexes')]",
- "shardKey": "[parameters('shardKey')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the mongodb database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the mongodb database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections', parameters('databaseAccountName'), parameters('mongodbDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the mongodb database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/mongodb-database/collection/version.json b/modules/document-db/database-account/mongodb-database/collection/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/mongodb-database/collection/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/mongodb-database/main.bicep b/modules/document-db/database-account/mongodb-database/main.bicep
deleted file mode 100644
index a66e001038..0000000000
--- a/modules/document-db/database-account/mongodb-database/main.bicep
+++ /dev/null
@@ -1,74 +0,0 @@
-metadata name = 'DocumentDB Database Account MongoDB Databases'
-metadata description = 'This module deploys a MongoDB Database within a CosmosDB Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment.')
-param databaseAccountName string
-
-@description('Required. Name of the mongodb database.')
-param name string
-
-@description('Optional. Name of the mongodb database.')
-param throughput int = 400
-
-@description('Optional. Collections in the mongodb database.')
-param collections array = []
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' existing = {
- name: databaseAccountName
-}
-
-resource mongodbDatabase 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases@2023-04-15' = {
- name: name
- parent: databaseAccount
- tags: tags
- properties: {
- resource: {
- id: name
- }
- options: contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? null : {
- throughput: throughput
- }
- }
-}
-
-module mongodbDatabase_collections 'collection/main.bicep' = [for collection in collections: {
- name: '${uniqueString(deployment().name, mongodbDatabase.name)}-collection-${collection.name}'
- params: {
- databaseAccountName: databaseAccountName
- mongodbDatabaseName: name
- name: collection.name
- indexes: collection.indexes
- shardKey: collection.shardKey
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the mongodb database.')
-output name string = mongodbDatabase.name
-
-@description('The resource ID of the mongodb database.')
-output resourceId string = mongodbDatabase.id
-
-@description('The name of the resource group the mongodb database was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/document-db/database-account/mongodb-database/main.json b/modules/document-db/database-account/mongodb-database/main.json
deleted file mode 100644
index ea41158c15..0000000000
--- a/modules/document-db/database-account/mongodb-database/main.json
+++ /dev/null
@@ -1,270 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "18265317713061610546"
- },
- "name": "DocumentDB Database Account MongoDB Databases",
- "description": "This module deploys a MongoDB Database within a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the mongodb database."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Name of the mongodb database."
- }
- },
- "collections": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Collections in the mongodb database."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "mongodbDatabase": {
- "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', parameters('throughput')))]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "mongodbDatabase_collections": {
- "copy": {
- "name": "mongodbDatabase_collections",
- "count": "[length(parameters('collections'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-collection-{1}', uniqueString(deployment().name, parameters('name')), parameters('collections')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('databaseAccountName')]"
- },
- "mongodbDatabaseName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('collections')[copyIndex()].name]"
- },
- "indexes": {
- "value": "[parameters('collections')[copyIndex()].indexes]"
- },
- "shardKey": {
- "value": "[parameters('collections')[copyIndex()].shardKey]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "14573428332905458641"
- },
- "name": "DocumentDB Database Account MongoDB Database Collections",
- "description": "This module deploys a MongoDB Database Collection.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment."
- }
- },
- "mongodbDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent mongodb database. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the collection."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Name of the mongodb database."
- }
- },
- "indexes": {
- "type": "array",
- "metadata": {
- "description": "Required. Indexes for the collection."
- }
- },
- "shardKey": {
- "type": "object",
- "metadata": {
- "description": "Required. ShardKey for the collection."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('mongodbDatabaseName'), parameters('name'))]",
- "properties": {
- "options": "[if(contains(reference(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccountName')), '2023-04-15').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', parameters('throughput')))]",
- "resource": {
- "id": "[parameters('name')]",
- "indexes": "[parameters('indexes')]",
- "shardKey": "[parameters('shardKey')]"
- }
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the mongodb database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the mongodb database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections', parameters('databaseAccountName'), parameters('mongodbDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the mongodb database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "mongodbDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the mongodb database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the mongodb database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/mongodbDatabases', parameters('databaseAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the mongodb database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/mongodb-database/version.json b/modules/document-db/database-account/mongodb-database/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/mongodb-database/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/sql-database/README.md b/modules/document-db/database-account/sql-database/README.md
deleted file mode 100644
index 96ae778d2c..0000000000
--- a/modules/document-db/database-account/sql-database/README.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# DocumentDB Database Account SQL Databases `[Microsoft.DocumentDB/databaseAccounts/sqlDatabases]`
-
-This module deploys a SQL Database in a CosmosDB Account.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DocumentDB/databaseAccounts/sqlDatabases` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/sqlDatabases) |
-| `Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/sqlDatabases/containers) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the SQL database . |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`databaseAccountName`](#parameter-databaseaccountname) | string | The name of the parent Database Account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`autoscaleSettingsMaxThroughput`](#parameter-autoscalesettingsmaxthroughput) | int | Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled. |
-| [`containers`](#parameter-containers) | array | Array of containers to deploy in the SQL database. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`tags`](#parameter-tags) | object | Tags of the SQL database resource. |
-| [`throughput`](#parameter-throughput) | int | Request units per second. Will be set to null if autoscaleSettingsMaxThroughput is used. |
-
-### Parameter: `name`
-
-Name of the SQL database .
-
-- Required: Yes
-- Type: string
-
-### Parameter: `databaseAccountName`
-
-The name of the parent Database Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `autoscaleSettingsMaxThroughput`
-
-Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `containers`
-
-Array of containers to deploy in the SQL database.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `tags`
-
-Tags of the SQL database resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `throughput`
-
-Request units per second. Will be set to null if autoscaleSettingsMaxThroughput is used.
-
-- Required: No
-- Type: int
-- Default: `400`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the SQL database. |
-| `resourceGroupName` | string | The name of the resource group the SQL database was created in. |
-| `resourceId` | string | The resource ID of the SQL database. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/document-db/database-account/sql-database/container/README.md b/modules/document-db/database-account/sql-database/container/README.md
deleted file mode 100644
index 8876592f85..0000000000
--- a/modules/document-db/database-account/sql-database/container/README.md
+++ /dev/null
@@ -1,221 +0,0 @@
-# DocumentDB Database Account SQL Database Containers `[Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers]`
-
-This module deploys a SQL Database Container in a CosmosDB Account.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/sqlDatabases/containers) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the container. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`databaseAccountName`](#parameter-databaseaccountname) | string | The name of the parent Database Account. Required if the template is used in a standalone deployment. |
-| [`sqlDatabaseName`](#parameter-sqldatabasename) | string | The name of the parent SQL Database. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`analyticalStorageTtl`](#parameter-analyticalstoragettl) | int | Indicates how long data should be retained in the analytical store, for a container. Analytical store is enabled when ATTL is set with a value other than 0. If the value is set to -1, the analytical store retains all historical data, irrespective of the retention of the data in the transactional store. |
-| [`autoscaleSettingsMaxThroughput`](#parameter-autoscalesettingsmaxthroughput) | int | Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled. |
-| [`conflictResolutionPolicy`](#parameter-conflictresolutionpolicy) | object | The conflict resolution policy for the container. Conflicts and conflict resolution policies are applicable if the Azure Cosmos DB account is configured with multiple write regions. |
-| [`defaultTtl`](#parameter-defaultttl) | int | Default time to live (in seconds). With Time to Live or TTL, Azure Cosmos DB provides the ability to delete items automatically from a container after a certain time period. If the value is set to "-1", it is equal to infinity, and items dont expire by default. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`indexingPolicy`](#parameter-indexingpolicy) | object | Indexing policy of the container. |
-| [`kind`](#parameter-kind) | string | Indicates the kind of algorithm used for partitioning. |
-| [`paths`](#parameter-paths) | array | List of paths using which data within the container can be partitioned. |
-| [`tags`](#parameter-tags) | object | Tags of the SQL Database resource. |
-| [`throughput`](#parameter-throughput) | int | Request Units per second. Will be set to null if autoscaleSettingsMaxThroughput is used. |
-| [`uniqueKeyPolicyKeys`](#parameter-uniquekeypolicykeys) | array | The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. |
-
-### Parameter: `name`
-
-Name of the container.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `databaseAccountName`
-
-The name of the parent Database Account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `sqlDatabaseName`
-
-The name of the parent SQL Database. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `analyticalStorageTtl`
-
-Indicates how long data should be retained in the analytical store, for a container. Analytical store is enabled when ATTL is set with a value other than 0. If the value is set to -1, the analytical store retains all historical data, irrespective of the retention of the data in the transactional store.
-
-- Required: No
-- Type: int
-- Default: `0`
-
-### Parameter: `autoscaleSettingsMaxThroughput`
-
-Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `conflictResolutionPolicy`
-
-The conflict resolution policy for the container. Conflicts and conflict resolution policies are applicable if the Azure Cosmos DB account is configured with multiple write regions.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `defaultTtl`
-
-Default time to live (in seconds). With Time to Live or TTL, Azure Cosmos DB provides the ability to delete items automatically from a container after a certain time period. If the value is set to "-1", it is equal to infinity, and items dont expire by default.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `indexingPolicy`
-
-Indexing policy of the container.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `kind`
-
-Indicates the kind of algorithm used for partitioning.
-
-- Required: No
-- Type: string
-- Default: `'Hash'`
-- Allowed:
- ```Bicep
- [
- 'Hash'
- 'MultiHash'
- 'Range'
- ]
- ```
-
-### Parameter: `paths`
-
-List of paths using which data within the container can be partitioned.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Tags of the SQL Database resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `throughput`
-
-Request Units per second. Will be set to null if autoscaleSettingsMaxThroughput is used.
-
-- Required: No
-- Type: int
-- Default: `400`
-
-### Parameter: `uniqueKeyPolicyKeys`
-
-The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the container. |
-| `resourceGroupName` | string | The name of the resource group the container was created in. |
-| `resourceId` | string | The resource ID of the container. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `indexingPolicy`
-
-Tag names and tag values can be provided as needed. A tag can be left without a value.
-
-
diff --git a/modules/document-db/database-account/sql-database/container/main.bicep b/modules/document-db/database-account/sql-database/container/main.bicep
deleted file mode 100644
index 003b8dc007..0000000000
--- a/modules/document-db/database-account/sql-database/container/main.bicep
+++ /dev/null
@@ -1,110 +0,0 @@
-metadata name = 'DocumentDB Database Account SQL Database Containers'
-metadata description = 'This module deploys a SQL Database Container in a CosmosDB Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment.')
-param databaseAccountName string
-
-@description('Conditional. The name of the parent SQL Database. Required if the template is used in a standalone deployment.')
-param sqlDatabaseName string
-
-@description('Required. Name of the container.')
-param name string
-
-@description('Optional. Indicates how long data should be retained in the analytical store, for a container. Analytical store is enabled when ATTL is set with a value other than 0. If the value is set to -1, the analytical store retains all historical data, irrespective of the retention of the data in the transactional store.')
-param analyticalStorageTtl int = 0
-
-@description('Optional. The conflict resolution policy for the container. Conflicts and conflict resolution policies are applicable if the Azure Cosmos DB account is configured with multiple write regions.')
-param conflictResolutionPolicy object = {}
-
-@maxValue(2147483647)
-@minValue(-1)
-@description('Optional. Default time to live (in seconds). With Time to Live or TTL, Azure Cosmos DB provides the ability to delete items automatically from a container after a certain time period. If the value is set to "-1", it is equal to infinity, and items dont expire by default.')
-param defaultTtl int = -1
-
-@description('Optional. Request Units per second. Will be set to null if autoscaleSettingsMaxThroughput is used.')
-param throughput int = 400
-
-@maxValue(1000000)
-@description('Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled.')
-param autoscaleSettingsMaxThroughput int = -1
-
-@description('Optional. Tags of the SQL Database resource.')
-param tags object?
-
-@description('Optional. List of paths using which data within the container can be partitioned.')
-param paths array = []
-
-@description('Optional. Indexing policy of the container.')
-param indexingPolicy object = {}
-
-@description('Optional. The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.')
-param uniqueKeyPolicyKeys array = []
-
-@description('Optional. Indicates the kind of algorithm used for partitioning.')
-@allowed([
- 'Hash'
- 'MultiHash'
- 'Range'
-])
-param kind string = 'Hash'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' existing = {
- name: databaseAccountName
-
- resource sqlDatabase 'sqlDatabases@2023-04-15' existing = {
- name: sqlDatabaseName
- }
-}
-
-resource container 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2023-04-15' = {
- name: name
- parent: databaseAccount::sqlDatabase
- tags: tags
- properties: {
- resource: {
- analyticalStorageTtl: analyticalStorageTtl
- conflictResolutionPolicy: conflictResolutionPolicy
- defaultTtl: defaultTtl
- id: name
- indexingPolicy: !empty(indexingPolicy) ? indexingPolicy : null
- partitionKey: {
- paths: paths
- kind: kind
- }
- uniqueKeyPolicy: !empty(uniqueKeyPolicyKeys) ? {
- uniqueKeys: uniqueKeyPolicyKeys
- } : null
- }
- options: contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? null : {
- throughput: autoscaleSettingsMaxThroughput == -1 ? throughput : null
- autoscaleSettings: autoscaleSettingsMaxThroughput != -1 ? {
- maxThroughput: autoscaleSettingsMaxThroughput
- } : null
- }
- }
-}
-
-@description('The name of the container.')
-output name string = container.name
-
-@description('The resource ID of the container.')
-output resourceId string = container.id
-
-@description('The name of the resource group the container was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/document-db/database-account/sql-database/container/main.json b/modules/document-db/database-account/sql-database/container/main.json
deleted file mode 100644
index 4f00fe50ef..0000000000
--- a/modules/document-db/database-account/sql-database/container/main.json
+++ /dev/null
@@ -1,198 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5628064493958565248"
- },
- "name": "DocumentDB Database Account SQL Database Containers",
- "description": "This module deploys a SQL Database Container in a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "sqlDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent SQL Database. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the container."
- }
- },
- "analyticalStorageTtl": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Indicates how long data should be retained in the analytical store, for a container. Analytical store is enabled when ATTL is set with a value other than 0. If the value is set to -1, the analytical store retains all historical data, irrespective of the retention of the data in the transactional store."
- }
- },
- "conflictResolutionPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The conflict resolution policy for the container. Conflicts and conflict resolution policies are applicable if the Azure Cosmos DB account is configured with multiple write regions."
- }
- },
- "defaultTtl": {
- "type": "int",
- "defaultValue": -1,
- "minValue": -1,
- "maxValue": 2147483647,
- "metadata": {
- "description": "Optional. Default time to live (in seconds). With Time to Live or TTL, Azure Cosmos DB provides the ability to delete items automatically from a container after a certain time period. If the value is set to \"-1\", it is equal to infinity, and items dont expire by default."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Request Units per second. Will be set to null if autoscaleSettingsMaxThroughput is used."
- }
- },
- "autoscaleSettingsMaxThroughput": {
- "type": "int",
- "defaultValue": -1,
- "maxValue": 1000000,
- "metadata": {
- "description": "Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the SQL Database resource."
- }
- },
- "paths": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of paths using which data within the container can be partitioned."
- }
- },
- "indexingPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Indexing policy of the container."
- }
- },
- "uniqueKeyPolicyKeys": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "Hash",
- "allowedValues": [
- "Hash",
- "MultiHash",
- "Range"
- ],
- "metadata": {
- "description": "Optional. Indicates the kind of algorithm used for partitioning."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "databaseAccount::sqlDatabase": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]",
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "container": {
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('sqlDatabaseName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "analyticalStorageTtl": "[parameters('analyticalStorageTtl')]",
- "conflictResolutionPolicy": "[parameters('conflictResolutionPolicy')]",
- "defaultTtl": "[parameters('defaultTtl')]",
- "id": "[parameters('name')]",
- "indexingPolicy": "[if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null())]",
- "partitionKey": {
- "paths": "[parameters('paths')]",
- "kind": "[parameters('kind')]"
- },
- "uniqueKeyPolicy": "[if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(equals(parameters('autoscaleSettingsMaxThroughput'), -1), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), -1)), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
- },
- "dependsOn": [
- "databaseAccount::sqlDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the container."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the container."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers', parameters('databaseAccountName'), parameters('sqlDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the container was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/sql-database/container/version.json b/modules/document-db/database-account/sql-database/container/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/sql-database/container/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/sql-database/main.bicep b/modules/document-db/database-account/sql-database/main.bicep
deleted file mode 100644
index 1d931a726b..0000000000
--- a/modules/document-db/database-account/sql-database/main.bicep
+++ /dev/null
@@ -1,87 +0,0 @@
-metadata name = 'DocumentDB Database Account SQL Databases'
-metadata description = 'This module deploys a SQL Database in a CosmosDB Account.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment.')
-param databaseAccountName string
-
-@description('Required. Name of the SQL database .')
-param name string
-
-@description('Optional. Array of containers to deploy in the SQL database.')
-param containers array = []
-
-@description('Optional. Request units per second. Will be set to null if autoscaleSettingsMaxThroughput is used.')
-param throughput int = 400
-
-@description('Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled.')
-param autoscaleSettingsMaxThroughput int = -1
-
-@description('Optional. Tags of the SQL database resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2022-09-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' existing = {
- name: databaseAccountName
-}
-
-resource sqlDatabase 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2023-04-15' = {
- name: name
- parent: databaseAccount
- tags: tags
- properties: {
- resource: {
- id: name
- }
- options: contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? null : {
- throughput: autoscaleSettingsMaxThroughput == -1 ? throughput : null
- autoscaleSettings: autoscaleSettingsMaxThroughput != -1 ? {
- maxThroughput: autoscaleSettingsMaxThroughput
- } : null
- }
- }
-}
-
-module container 'container/main.bicep' = [for container in containers: {
- name: '${uniqueString(deployment().name, sqlDatabase.name)}-sqldb-${container.name}'
- params: {
- databaseAccountName: databaseAccountName
- sqlDatabaseName: name
- name: container.name
- analyticalStorageTtl: contains(container, 'analyticalStorageTtl') ? container.analyticalStorageTtl : 0
- autoscaleSettingsMaxThroughput: contains(container, 'autoscaleSettingsMaxThroughput') ? container.autoscaleSettingsMaxThroughput : -1
- conflictResolutionPolicy: contains(container, 'conflictResolutionPolicy') ? container.conflictResolutionPolicy : {}
- defaultTtl: contains(container, 'defaultTtl') ? container.defaultTtl : -1
- indexingPolicy: contains(container, 'indexingPolicy') ? container.indexingPolicy : {}
- kind: contains(container, 'kind') ? container.kind : 'Hash'
- paths: contains(container, 'paths') ? container.paths : []
- throughput: contains(container, 'throughput') ? container.throughput : 400
- uniqueKeyPolicyKeys: contains(container, 'uniqueKeyPolicyKeys') ? container.uniqueKeyPolicyKeys : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the SQL database.')
-output name string = sqlDatabase.name
-
-@description('The resource ID of the SQL database.')
-output resourceId string = sqlDatabase.id
-
-@description('The name of the resource group the SQL database was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/document-db/database-account/sql-database/main.json b/modules/document-db/database-account/sql-database/main.json
deleted file mode 100644
index d3c8fefc92..0000000000
--- a/modules/document-db/database-account/sql-database/main.json
+++ /dev/null
@@ -1,366 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10948740009827102632"
- },
- "name": "DocumentDB Database Account SQL Databases",
- "description": "This module deploys a SQL Database in a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the SQL database ."
- }
- },
- "containers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Array of containers to deploy in the SQL database."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Request units per second. Will be set to null if autoscaleSettingsMaxThroughput is used."
- }
- },
- "autoscaleSettingsMaxThroughput": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the SQL database resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "sqlDatabase": {
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "id": "[parameters('name')]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(equals(parameters('autoscaleSettingsMaxThroughput'), -1), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), -1)), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
- },
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "container": {
- "copy": {
- "name": "container",
- "count": "[length(parameters('containers'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-sqldb-{1}', uniqueString(deployment().name, parameters('name')), parameters('containers')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "databaseAccountName": {
- "value": "[parameters('databaseAccountName')]"
- },
- "sqlDatabaseName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('containers')[copyIndex()].name]"
- },
- "analyticalStorageTtl": "[if(contains(parameters('containers')[copyIndex()], 'analyticalStorageTtl'), createObject('value', parameters('containers')[copyIndex()].analyticalStorageTtl), createObject('value', 0))]",
- "autoscaleSettingsMaxThroughput": "[if(contains(parameters('containers')[copyIndex()], 'autoscaleSettingsMaxThroughput'), createObject('value', parameters('containers')[copyIndex()].autoscaleSettingsMaxThroughput), createObject('value', -1))]",
- "conflictResolutionPolicy": "[if(contains(parameters('containers')[copyIndex()], 'conflictResolutionPolicy'), createObject('value', parameters('containers')[copyIndex()].conflictResolutionPolicy), createObject('value', createObject()))]",
- "defaultTtl": "[if(contains(parameters('containers')[copyIndex()], 'defaultTtl'), createObject('value', parameters('containers')[copyIndex()].defaultTtl), createObject('value', -1))]",
- "indexingPolicy": "[if(contains(parameters('containers')[copyIndex()], 'indexingPolicy'), createObject('value', parameters('containers')[copyIndex()].indexingPolicy), createObject('value', createObject()))]",
- "kind": "[if(contains(parameters('containers')[copyIndex()], 'kind'), createObject('value', parameters('containers')[copyIndex()].kind), createObject('value', 'Hash'))]",
- "paths": "[if(contains(parameters('containers')[copyIndex()], 'paths'), createObject('value', parameters('containers')[copyIndex()].paths), createObject('value', createArray()))]",
- "throughput": "[if(contains(parameters('containers')[copyIndex()], 'throughput'), createObject('value', parameters('containers')[copyIndex()].throughput), createObject('value', 400))]",
- "uniqueKeyPolicyKeys": "[if(contains(parameters('containers')[copyIndex()], 'uniqueKeyPolicyKeys'), createObject('value', parameters('containers')[copyIndex()].uniqueKeyPolicyKeys), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "5628064493958565248"
- },
- "name": "DocumentDB Database Account SQL Database Containers",
- "description": "This module deploys a SQL Database Container in a CosmosDB Account.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "databaseAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment."
- }
- },
- "sqlDatabaseName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent SQL Database. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the container."
- }
- },
- "analyticalStorageTtl": {
- "type": "int",
- "defaultValue": 0,
- "metadata": {
- "description": "Optional. Indicates how long data should be retained in the analytical store, for a container. Analytical store is enabled when ATTL is set with a value other than 0. If the value is set to -1, the analytical store retains all historical data, irrespective of the retention of the data in the transactional store."
- }
- },
- "conflictResolutionPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The conflict resolution policy for the container. Conflicts and conflict resolution policies are applicable if the Azure Cosmos DB account is configured with multiple write regions."
- }
- },
- "defaultTtl": {
- "type": "int",
- "defaultValue": -1,
- "minValue": -1,
- "maxValue": 2147483647,
- "metadata": {
- "description": "Optional. Default time to live (in seconds). With Time to Live or TTL, Azure Cosmos DB provides the ability to delete items automatically from a container after a certain time period. If the value is set to \"-1\", it is equal to infinity, and items dont expire by default."
- }
- },
- "throughput": {
- "type": "int",
- "defaultValue": 400,
- "metadata": {
- "description": "Optional. Request Units per second. Will be set to null if autoscaleSettingsMaxThroughput is used."
- }
- },
- "autoscaleSettingsMaxThroughput": {
- "type": "int",
- "defaultValue": -1,
- "maxValue": 1000000,
- "metadata": {
- "description": "Optional. Specifies the Autoscale settings and represents maximum throughput, the resource can scale up to. The autoscale throughput should have valid throughput values between 1000 and 1000000 inclusive in increments of 1000. If value is set to -1, then the property will be set to null and autoscale will be disabled."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the SQL Database resource."
- }
- },
- "paths": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of paths using which data within the container can be partitioned."
- }
- },
- "indexingPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Indexing policy of the container."
- }
- },
- "uniqueKeyPolicyKeys": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "Hash",
- "allowedValues": [
- "Hash",
- "MultiHash",
- "Range"
- ],
- "metadata": {
- "description": "Optional. Indicates the kind of algorithm used for partitioning."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "databaseAccount::sqlDatabase": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]",
- "dependsOn": [
- "databaseAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "databaseAccount": {
- "existing": true,
- "type": "Microsoft.DocumentDB/databaseAccounts",
- "apiVersion": "2023-04-15",
- "name": "[parameters('databaseAccountName')]"
- },
- "container": {
- "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
- "apiVersion": "2023-04-15",
- "name": "[format('{0}/{1}/{2}', parameters('databaseAccountName'), parameters('sqlDatabaseName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "resource": {
- "analyticalStorageTtl": "[parameters('analyticalStorageTtl')]",
- "conflictResolutionPolicy": "[parameters('conflictResolutionPolicy')]",
- "defaultTtl": "[parameters('defaultTtl')]",
- "id": "[parameters('name')]",
- "indexingPolicy": "[if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null())]",
- "partitionKey": {
- "paths": "[parameters('paths')]",
- "kind": "[parameters('kind')]"
- },
- "uniqueKeyPolicy": "[if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())]"
- },
- "options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(equals(parameters('autoscaleSettingsMaxThroughput'), -1), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), -1)), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
- },
- "dependsOn": [
- "databaseAccount::sqlDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the container."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the container."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers', parameters('databaseAccountName'), parameters('sqlDatabaseName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the container was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "sqlDatabase"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the SQL database."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the SQL database."
- },
- "value": "[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the SQL database was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/document-db/database-account/sql-database/version.json b/modules/document-db/database-account/sql-database/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/sql-database/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/document-db/database-account/tests/e2e/gremlindb/dependencies.bicep b/modules/document-db/database-account/tests/e2e/gremlindb/dependencies.bicep
deleted file mode 100644
index f92185e3e8..0000000000
--- a/modules/document-db/database-account/tests/e2e/gremlindb/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/document-db/database-account/tests/e2e/gremlindb/main.test.bicep b/modules/document-db/database-account/tests/e2e/gremlindb/main.test.bicep
deleted file mode 100644
index 49de1571cd..0000000000
--- a/modules/document-db/database-account/tests/e2e/gremlindb/main.test.bicep
+++ /dev/null
@@ -1,171 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${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 = 'dddagrm'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}002'
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: location
- }
- {
- failoverPriority: 1
- isZoneRedundant: false
- locationName: nestedDependencies.outputs.pairedRegionName
- }
- ]
- capabilitiesToAdd: [
- 'EnableGremlin'
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- gremlinDatabases: [
- {
- graphs: [
- {
- indexingPolicy: {
- automatic: true
- }
- name: 'car_collection'
- partitionKeyPaths: [
- '/car_id'
- ]
- }
- {
- indexingPolicy: {
- automatic: true
- }
- name: 'truck_collection'
- partitionKeyPaths: [
- '/truck_id'
- ]
- }
- ]
- name: '${namePrefix}-gdb-${serviceShort}-001'
- }
- {
- collections: [
- {
- indexingPolicy: {
- automatic: true
- }
- name: 'bike_collection'
- partitionKeyPaths: [
- '/bike_id'
- ]
- }
- {
- indexingPolicy: {
- automatic: true
- }
- name: 'bicycle_collection'
- partitionKeyPaths: [
- '/bicycle_id'
- ]
- }
- ]
- name: '${namePrefix}-gdb-${serviceShort}-002'
- }
- ]
- location: location
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/document-db/database-account/tests/e2e/mongodb/dependencies.bicep b/modules/document-db/database-account/tests/e2e/mongodb/dependencies.bicep
deleted file mode 100644
index f92185e3e8..0000000000
--- a/modules/document-db/database-account/tests/e2e/mongodb/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/document-db/database-account/tests/e2e/mongodb/main.test.bicep b/modules/document-db/database-account/tests/e2e/mongodb/main.test.bicep
deleted file mode 100644
index 6acaad1ecb..0000000000
--- a/modules/document-db/database-account/tests/e2e/mongodb/main.test.bicep
+++ /dev/null
@@ -1,304 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${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 = 'dddamng'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: location
- }
- {
- failoverPriority: 1
- isZoneRedundant: false
- locationName: nestedDependencies.outputs.pairedRegionName
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- location: location
- mongodbDatabases: [
- {
- collections: [
- {
- indexes: [
- {
- key: {
- keys: [
- '_id'
- ]
- }
- }
- {
- key: {
- keys: [
- '$**'
- ]
- }
- }
- {
- key: {
- keys: [
- 'car_id'
- 'car_model'
- ]
- }
- options: {
- unique: true
- }
- }
- {
- key: {
- keys: [
- '_ts'
- ]
- }
- options: {
- expireAfterSeconds: 2629746
- }
- }
- ]
- name: 'car_collection'
- shardKey: {
- car_id: 'Hash'
- }
- }
- {
- indexes: [
- {
- key: {
- keys: [
- '_id'
- ]
- }
- }
- {
- key: {
- keys: [
- '$**'
- ]
- }
- }
- {
- key: {
- keys: [
- 'truck_id'
- 'truck_model'
- ]
- }
- options: {
- unique: true
- }
- }
- {
- key: {
- keys: [
- '_ts'
- ]
- }
- options: {
- expireAfterSeconds: 2629746
- }
- }
- ]
- name: 'truck_collection'
- shardKey: {
- truck_id: 'Hash'
- }
- }
- ]
- name: '${namePrefix}-mdb-${serviceShort}-001'
- }
- {
- collections: [
- {
- indexes: [
- {
- key: {
- keys: [
- '_id'
- ]
- }
- }
- {
- key: {
- keys: [
- '$**'
- ]
- }
- }
- {
- key: {
- keys: [
- 'bike_id'
- 'bike_model'
- ]
- }
- options: {
- unique: true
- }
- }
- {
- key: {
- keys: [
- '_ts'
- ]
- }
- options: {
- expireAfterSeconds: 2629746
- }
- }
- ]
- name: 'bike_collection'
- shardKey: {
- bike_id: 'Hash'
- }
- }
- {
- indexes: [
- {
- key: {
- keys: [
- '_id'
- ]
- }
- }
- {
- key: {
- keys: [
- '$**'
- ]
- }
- }
- {
- key: {
- keys: [
- 'bicycle_id'
- 'bicycle_model'
- ]
- }
- options: {
- unique: true
- }
- }
- {
- key: {
- keys: [
- '_ts'
- ]
- }
- options: {
- expireAfterSeconds: 2629746
- }
- }
- ]
- name: 'bicycle_collection'
- shardKey: {
- bicycle_id: 'Hash'
- }
- }
- ]
- name: '${namePrefix}-mdb-${serviceShort}-002'
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/document-db/database-account/tests/e2e/plain/dependencies.bicep b/modules/document-db/database-account/tests/e2e/plain/dependencies.bicep
deleted file mode 100644
index f92185e3e8..0000000000
--- a/modules/document-db/database-account/tests/e2e/plain/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/document-db/database-account/tests/e2e/plain/main.test.bicep b/modules/document-db/database-account/tests/e2e/plain/main.test.bicep
deleted file mode 100644
index 2b71669ee2..0000000000
--- a/modules/document-db/database-account/tests/e2e/plain/main.test.bicep
+++ /dev/null
@@ -1,120 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${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 = 'dddapln'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: location
- }
- {
- failoverPriority: 1
- isZoneRedundant: false
- locationName: nestedDependencies.outputs.pairedRegionName
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/document-db/database-account/tests/e2e/sqldb/dependencies.bicep b/modules/document-db/database-account/tests/e2e/sqldb/dependencies.bicep
deleted file mode 100644
index 61dec739a6..0000000000
--- a/modules/document-db/database-account/tests/e2e/sqldb/dependencies.bicep
+++ /dev/null
@@ -1,99 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Deployment Script to create to get the paired region name.')
-param pairedRegionScriptName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: managedIdentityName
- location: location
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.documents.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${location}-${managedIdentity.id}-Reader-RoleAssignment')
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7') // Reader
- principalType: 'ServicePrincipal'
- }
-}
-
-resource getPairedRegionScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
- name: pairedRegionScriptName
- location: location
- kind: 'AzurePowerShell'
- identity: {
- type: 'UserAssigned'
- userAssignedIdentities: {
- '${managedIdentity.id}': {}
- }
- }
- properties: {
- azPowerShellVersion: '8.0'
- retentionInterval: 'P1D'
- arguments: '-Location \\"${location}\\"'
- scriptContent: loadTextContent('../../../../../.shared/.scripts/Get-PairedRegion.ps1')
- }
- dependsOn: [
- roleAssignment
- ]
-}
-
-@description('The name of the paired region.')
-output pairedRegionName string = getPairedRegionScript.properties.outputs.pairedRegionName
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/document-db/database-account/tests/e2e/sqldb/main.test.bicep b/modules/document-db/database-account/tests/e2e/sqldb/main.test.bicep
deleted file mode 100644
index 843e9e6afe..0000000000
--- a/modules/document-db/database-account/tests/e2e/sqldb/main.test.bicep
+++ /dev/null
@@ -1,213 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${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 = 'dddasql'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: location
- }
- {
- failoverPriority: 1
- isZoneRedundant: false
- locationName: nestedDependencies.outputs.pairedRegionName
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- location: location
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'Sql'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- sqlDatabases: [
- {
- containers: [
- {
- kind: 'Hash'
- name: 'container-001'
- indexingPolicy: {
- automatic: true
- }
- paths: [
- '/myPartitionKey'
- ]
- analyticalStorageTtl: 0
- conflictResolutionPolicy: {
- conflictResolutionPath: '/myCustomId'
- mode: 'LastWriterWins'
- }
- defaultTtl: 1000
- uniqueKeyPolicyKeys: [
- {
- paths: [
- '/firstName'
- ]
- }
- {
- paths: [
- '/lastName'
- ]
- }
- ]
- throughput: 600
- }
- ]
- name: '${namePrefix}-sql-${serviceShort}-001'
- throughput: 1000
- }
- {
- containers: []
- name: '${namePrefix}-sql-${serviceShort}-002'
- }
- {
- containers: [
- {
- kind: 'Hash'
- name: 'container-003'
- autoscaleSettingsMaxThroughput: 1000
- indexingPolicy: {
- automatic: true
- }
- paths: [
- '/myPartitionKey'
- ]
- analyticalStorageTtl: 0
- conflictResolutionPolicy: {
- conflictResolutionPath: '/myCustomId'
- mode: 'LastWriterWins'
- }
- defaultTtl: 1000
- uniqueKeyPolicyKeys: [
- {
- paths: [
- '/firstName'
- ]
- }
- {
- paths: [
- '/lastName'
- ]
- }
- ]
- }
- ]
- name: '${namePrefix}-sql-${serviceShort}-003'
- autoscaleSettingsMaxThroughput: 1000
- }
- ]
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/document-db/database-account/version.json b/modules/document-db/database-account/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/document-db/database-account/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-grid/domain/MOVED-TO-AVM.md b/modules/event-grid/domain/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/event-grid/domain/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/event-grid/domain/README.md b/modules/event-grid/domain/README.md
index b38969fef0..ce6f40b5e3 100644
--- a/modules/event-grid/domain/README.md
+++ b/modules/event-grid/domain/README.md
@@ -1,1093 +1,7 @@
-# Event Grid Domains `[Microsoft.EventGrid/domains]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _Pe_
-
-
-
-
-
-### Example 4: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Event Grid Domain. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`autoCreateTopicWithFirstSubscription`](#parameter-autocreatetopicwithfirstsubscription) | bool | Location for all Resources. |
-| [`autoDeleteTopicWithLastSubscription`](#parameter-autodeletetopicwithlastsubscription) | bool | Location for all Resources. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`inboundIpRules`](#parameter-inboundiprules) | array | This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`topics`](#parameter-topics) | array | The topic names which are associated with the domain. |
-
-### Parameter: `name`
-
-The name of the Event Grid Domain.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `autoCreateTopicWithFirstSubscription`
-
-Location for all Resources.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `autoDeleteTopicWithLastSubscription`
-
-Location for all Resources.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `inboundIpRules`
-
-This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `topics`
-
-The topic names which are associated with the domain.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the event grid domain. |
-| `resourceGroupName` | string | The name of the resource group the event grid domain was deployed into. |
-| `resourceId` | string | The resource ID of the event grid domain. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/event-grid/domain/main.bicep b/modules/event-grid/domain/main.bicep
deleted file mode 100644
index 5177d56cf2..0000000000
--- a/modules/event-grid/domain/main.bicep
+++ /dev/null
@@ -1,321 +0,0 @@
-metadata name = 'Event Grid Domains'
-metadata description = 'This module deploys an Event Grid Domain.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Event Grid Domain.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. Location for all Resources.')
-param autoCreateTopicWithFirstSubscription bool = true
-
-@description('Optional. Location for all Resources.')
-param autoDeleteTopicWithLastSubscription bool = true
-
-@description('Optional. This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.')
-param inboundIpRules array = []
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The topic names which are associated with the domain.')
-param topics array = []
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'EventGrid Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1e241071-0855-49ea-94dc-649edcd759de')
- 'EventGrid Data Sender': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a91429-5739-47e2-a06b-3470a27159e7')
- 'EventGrid EventSubscription Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '428e0ff0-5e57-4d9c-a221-2c70d0e0a443')
- 'EventGrid EventSubscription Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2414bbcf-6497-4faf-8c65-045460748405')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource domain 'Microsoft.EventGrid/domains@2022-06-15' = {
- name: name
- location: location
- tags: tags
- properties: {
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) && empty(inboundIpRules) ? 'Disabled' : null)
- inboundIpRules: !empty(inboundIpRules) ? inboundIpRules : null
- autoCreateTopicWithFirstSubscription: autoCreateTopicWithFirstSubscription
- autoDeleteTopicWithLastSubscription: autoDeleteTopicWithLastSubscription
- }
-}
-
-module domain_topics 'topic/main.bicep' = [for (topic, index) in topics: {
- name: '${uniqueString(deployment().name, location)}-topics-${index}'
- params: {
- domainName: domain.name
- name: topic
- location: location
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource domain_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: domain
-}
-
-resource domain_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: domain
-}]
-
-module domain_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-domain-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'domain'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(domain.id, '/'))}-${privateEndpoint.?service ?? 'domain'}-${index}'
- serviceResourceId: domain.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource domain_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(domain.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: domain
-}]
-
-@description('The name of the event grid domain.')
-output name string = domain.name
-
-@description('The resource ID of the event grid domain.')
-output resourceId string = domain.id
-
-@description('The name of the resource group the event grid domain was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = domain.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/event-grid/domain/main.json b/modules/event-grid/domain/main.json
deleted file mode 100644
index 3ad0a4b95a..0000000000
--- a/modules/event-grid/domain/main.json
+++ /dev/null
@@ -1,1348 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "12691133216908716098"
- },
- "name": "Event Grid Domains",
- "description": "This module deploys an Event Grid Domain.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Grid Domain."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set."
- }
- },
- "autoCreateTopicWithFirstSubscription": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "autoDeleteTopicWithLastSubscription": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "inboundIpRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "topics": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The topic names which are associated with the domain."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "EventGrid Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1e241071-0855-49ea-94dc-649edcd759de')]",
- "EventGrid Data Sender": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a91429-5739-47e2-a06b-3470a27159e7')]",
- "EventGrid EventSubscription Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '428e0ff0-5e57-4d9c-a221-2c70d0e0a443')]",
- "EventGrid EventSubscription Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2414bbcf-6497-4faf-8c65-045460748405')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "domain": {
- "type": "Microsoft.EventGrid/domains",
- "apiVersion": "2022-06-15",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('inboundIpRules'))), 'Disabled', null()))]",
- "inboundIpRules": "[if(not(empty(parameters('inboundIpRules'))), parameters('inboundIpRules'), null())]",
- "autoCreateTopicWithFirstSubscription": "[parameters('autoCreateTopicWithFirstSubscription')]",
- "autoDeleteTopicWithLastSubscription": "[parameters('autoDeleteTopicWithLastSubscription')]"
- }
- },
- "domain_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.EventGrid/domains/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "domain"
- ]
- },
- "domain_diagnosticSettings": {
- "copy": {
- "name": "domain_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.EventGrid/domains/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "domain"
- ]
- },
- "domain_roleAssignments": {
- "copy": {
- "name": "domain_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.EventGrid/domains/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.EventGrid/domains', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "domain"
- ]
- },
- "domain_topics": {
- "copy": {
- "name": "domain_topics",
- "count": "[length(parameters('topics'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-topics-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "domainName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('topics')[copyIndex()]]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13344838042263797685"
- },
- "name": "Event Grid Domain Topics",
- "description": "This module deploys an Event Grid Domain Topic.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Grid Domain Topic."
- }
- },
- "domainName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Event Grid Domain. Required if the template is used in a standalone deployment."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventGrid/domains/topics",
- "apiVersion": "2022-06-15",
- "name": "[format('{0}/{1}', parameters('domainName'), parameters('name'))]"
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event grid topic."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event grid topic."
- },
- "value": "[resourceId('Microsoft.EventGrid/domains/topics', parameters('domainName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event grid topic was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "domain"
- ]
- },
- "domain_privateEndpoints": {
- "copy": {
- "name": "domain_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-domain-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'domain')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.EventGrid/domains', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'domain'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.EventGrid/domains', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "domain"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event grid domain."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event grid domain."
- },
- "value": "[resourceId('Microsoft.EventGrid/domains', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event grid domain was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('domain', '2022-06-15', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-grid/domain/tests/e2e/defaults/main.test.bicep b/modules/event-grid/domain/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 69015ce3e4..0000000000
--- a/modules/event-grid/domain/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${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 = 'egdmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/event-grid/domain/tests/e2e/max/dependencies.bicep b/modules/event-grid/domain/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 8ba0c35f61..0000000000
--- a/modules/event-grid/domain/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.eventgrid.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/event-grid/domain/tests/e2e/max/main.test.bicep b/modules/event-grid/domain/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 3be06cfaf7..0000000000
--- a/modules/event-grid/domain/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,125 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${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 = 'egdmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- inboundIpRules: [
- {
- action: 'Allow'
- ipMask: '40.74.28.0/23'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'domain'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- topics: [
- '${namePrefix}-topic-${serviceShort}001'
- ]
- }
-}]
diff --git a/modules/event-grid/domain/tests/e2e/pe/dependencies.bicep b/modules/event-grid/domain/tests/e2e/pe/dependencies.bicep
deleted file mode 100644
index 4d31fc9282..0000000000
--- a/modules/event-grid/domain/tests/e2e/pe/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.eventgrid.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/event-grid/domain/tests/e2e/pe/main.test.bicep b/modules/event-grid/domain/tests/e2e/pe/main.test.bicep
deleted file mode 100644
index 98d8709f03..0000000000
--- a/modules/event-grid/domain/tests/e2e/pe/main.test.bicep
+++ /dev/null
@@ -1,72 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${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 = 'egdpe'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/event-grid/domain/tests/e2e/waf-aligned/dependencies.bicep b/modules/event-grid/domain/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 8ba0c35f61..0000000000
--- a/modules/event-grid/domain/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.eventgrid.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep b/modules/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index d65df56405..0000000000
--- a/modules/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,125 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${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 = 'egdwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- inboundIpRules: [
- {
- action: 'Allow'
- ipMask: '40.74.28.0/23'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'domain'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- topics: [
- '${namePrefix}-topic-${serviceShort}001'
- ]
- }
-}]
diff --git a/modules/event-grid/domain/topic/README.md b/modules/event-grid/domain/topic/README.md
deleted file mode 100644
index 6dc88f87ef..0000000000
--- a/modules/event-grid/domain/topic/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# Event Grid Domain Topics `[Microsoft.EventGrid/domains/topics]`
-
-This module deploys an Event Grid Domain Topic.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventGrid/domains/topics` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/domains/topics) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Event Grid Domain Topic. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`domainName`](#parameter-domainname) | string | The name of the parent Event Grid Domain. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-
-### Parameter: `name`
-
-The name of the Event Grid Domain Topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `domainName`
-
-The name of the parent Event Grid Domain. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the event grid topic. |
-| `resourceGroupName` | string | The name of the resource group the event grid topic was deployed into. |
-| `resourceId` | string | The resource ID of the event grid topic. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-grid/domain/topic/main.bicep b/modules/event-grid/domain/topic/main.bicep
deleted file mode 100644
index 5cc3efa25b..0000000000
--- a/modules/event-grid/domain/topic/main.bicep
+++ /dev/null
@@ -1,45 +0,0 @@
-metadata name = 'Event Grid Domain Topics'
-metadata description = 'This module deploys an Event Grid Domain Topic.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Event Grid Domain Topic.')
-param name string
-
-@description('Conditional. The name of the parent Event Grid Domain. Required if the template is used in a standalone deployment.')
-param domainName string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource domain 'Microsoft.EventGrid/domains@2022-06-15' existing = {
- name: domainName
-}
-
-resource topic 'Microsoft.EventGrid/domains/topics@2022-06-15' = {
- name: name
- parent: domain
-}
-
-@description('The name of the event grid topic.')
-output name string = topic.name
-
-@description('The resource ID of the event grid topic.')
-output resourceId string = topic.id
-
-@description('The name of the resource group the event grid topic was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/event-grid/domain/topic/main.json b/modules/event-grid/domain/topic/main.json
deleted file mode 100644
index c640f2628c..0000000000
--- a/modules/event-grid/domain/topic/main.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13108601447016690436"
- },
- "name": "Event Grid Domain Topics",
- "description": "This module deploys an Event Grid Domain Topic.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Grid Domain Topic."
- }
- },
- "domainName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Event Grid Domain. Required if the template is used in a standalone deployment."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventGrid/domains/topics",
- "apiVersion": "2022-06-15",
- "name": "[format('{0}/{1}', parameters('domainName'), parameters('name'))]"
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event grid topic."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event grid topic."
- },
- "value": "[resourceId('Microsoft.EventGrid/domains/topics', parameters('domainName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event grid topic was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-grid/domain/topic/version.json b/modules/event-grid/domain/topic/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-grid/domain/topic/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-grid/domain/version.json b/modules/event-grid/domain/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/event-grid/domain/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-grid/system-topic/MOVED-TO-AVM.md b/modules/event-grid/system-topic/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/event-grid/system-topic/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/event-grid/system-topic/README.md b/modules/event-grid/system-topic/README.md
index 5c5801dfe9..65afaf30f5 100644
--- a/modules/event-grid/system-topic/README.md
+++ b/modules/event-grid/system-topic/README.md
@@ -1,790 +1,7 @@
-# Event Grid System Topics `[Microsoft.EventGrid/systemTopics]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Event Grid Topic. |
-| [`source`](#parameter-source) | string | Source for the system topic. |
-| [`topicType`](#parameter-topictype) | string | TopicType for the system topic. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventSubscriptions`](#parameter-eventsubscriptions) | array | Event subscriptions to deploy. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the Event Grid Topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `source`
-
-Source for the system topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `topicType`
-
-TopicType for the system topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventSubscriptions`
-
-Event subscriptions to deploy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the event grid system topic. |
-| `resourceGroupName` | string | The name of the resource group the event grid system topic was deployed into. |
-| `resourceId` | string | The resource ID of the event grid system topic. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/event-grid/system-topic/event-subscription/README.md b/modules/event-grid/system-topic/event-subscription/README.md
deleted file mode 100644
index 397b1c50a7..0000000000
--- a/modules/event-grid/system-topic/event-subscription/README.md
+++ /dev/null
@@ -1,165 +0,0 @@
-# Event Grid System Topic Event Subscriptions `[Microsoft.EventGrid/systemTopics/eventSubscriptions]`
-
-This module deploys an Event Grid System Topic Event Subscription.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventGrid/systemTopics/eventSubscriptions` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/systemTopics/eventSubscriptions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`destination`](#parameter-destination) | object | The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information). |
-| [`name`](#parameter-name) | string | The name of the Event Subscription. |
-| [`systemTopicName`](#parameter-systemtopicname) | string | Name of the Event Grid System Topic. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`deadLetterDestination`](#parameter-deadletterdestination) | object | Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information). |
-| [`deadLetterWithResourceIdentity`](#parameter-deadletterwithresourceidentity) | object | Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information). |
-| [`deliveryWithResourceIdentity`](#parameter-deliverywithresourceidentity) | object | Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information). |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventDeliverySchema`](#parameter-eventdeliveryschema) | string | The event delivery schema for the event subscription. |
-| [`expirationTimeUtc`](#parameter-expirationtimeutc) | string | The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ). |
-| [`filter`](#parameter-filter) | object | The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information). |
-| [`labels`](#parameter-labels) | array | The list of user defined labels. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`retryPolicy`](#parameter-retrypolicy) | object | The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events. |
-
-### Parameter: `destination`
-
-The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information).
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-The name of the Event Subscription.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `systemTopicName`
-
-Name of the Event Grid System Topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `deadLetterDestination`
-
-Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `deadLetterWithResourceIdentity`
-
-Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `deliveryWithResourceIdentity`
-
-Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventDeliverySchema`
-
-The event delivery schema for the event subscription.
-
-- Required: No
-- Type: string
-- Default: `'EventGridSchema'`
-- Allowed:
- ```Bicep
- [
- 'CloudEventSchemaV1_0'
- 'CustomInputSchema'
- 'EventGridEvent'
- 'EventGridSchema'
- ]
- ```
-
-### Parameter: `expirationTimeUtc`
-
-The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `filter`
-
-The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `labels`
-
-The list of user defined labels.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `retryPolicy`
-
-The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the event subscription. |
-| `resourceGroupName` | string | The name of the resource group the event subscription was deployed into. |
-| `resourceId` | string | The resource ID of the event subscription. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-grid/system-topic/event-subscription/main.bicep b/modules/event-grid/system-topic/event-subscription/main.bicep
deleted file mode 100644
index 7daa026c4b..0000000000
--- a/modules/event-grid/system-topic/event-subscription/main.bicep
+++ /dev/null
@@ -1,94 +0,0 @@
-metadata name = 'Event Grid System Topic Event Subscriptions'
-metadata description = 'This module deploys an Event Grid System Topic Event Subscription.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Event Subscription.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. Name of the Event Grid System Topic.')
-param systemTopicName string
-
-@description('Optional. Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information).')
-param deadLetterDestination object = {}
-
-@description('Optional. Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information).')
-param deadLetterWithResourceIdentity object = {}
-
-@description('Optional. Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information).')
-param deliveryWithResourceIdentity object = {}
-
-@description('Required. The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information).')
-param destination object
-
-@description('Optional. The event delivery schema for the event subscription.')
-@allowed(
- [
- 'CloudEventSchemaV1_0'
- 'CustomInputSchema'
- 'EventGridSchema'
- 'EventGridEvent'
- ]
-)
-param eventDeliverySchema string = 'EventGridSchema'
-
-@description('Optional. The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ).')
-param expirationTimeUtc string = ''
-
-@description('Optional. The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information).')
-param filter object = {}
-
-@description('Optional. The list of user defined labels.')
-param labels array = []
-
-@description('Optional. The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events.')
-param retryPolicy object = {}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource systemTopic 'Microsoft.EventGrid/systemTopics@2022-06-15' existing = {
- name: systemTopicName
-}
-
-resource eventSubscription 'Microsoft.EventGrid/systemTopics/eventSubscriptions@2022-06-15' = {
- name: name
- parent: systemTopic
- properties: {
- deadLetterDestination: !empty(deadLetterDestination) ? deadLetterDestination : null
- deadLetterWithResourceIdentity: !empty(deadLetterWithResourceIdentity) ? deadLetterWithResourceIdentity : null
- deliveryWithResourceIdentity: !empty(deliveryWithResourceIdentity) ? deliveryWithResourceIdentity : null
- destination: destination
- eventDeliverySchema: eventDeliverySchema
- expirationTimeUtc: !empty(expirationTimeUtc) ? expirationTimeUtc : ''
- filter: !empty(filter) ? filter : {}
- labels: !empty(labels) ? labels : []
- retryPolicy: !empty(retryPolicy) ? retryPolicy : null
- }
-}
-
-@description('The name of the event subscription.')
-output name string = eventSubscription.name
-
-@description('The resource ID of the event subscription.')
-output resourceId string = eventSubscription.id
-
-@description('The name of the resource group the event subscription was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = systemTopic.location
diff --git a/modules/event-grid/system-topic/event-subscription/main.json b/modules/event-grid/system-topic/event-subscription/main.json
deleted file mode 100644
index 1b3870ba98..0000000000
--- a/modules/event-grid/system-topic/event-subscription/main.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "10392297144322720436"
- },
- "name": "Event Grid System Topic Event Subscriptions",
- "description": "This module deploys an Event Grid System Topic Event Subscription.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Subscription."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "systemTopicName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Event Grid System Topic."
- }
- },
- "deadLetterDestination": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information)."
- }
- },
- "deadLetterWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information)."
- }
- },
- "deliveryWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information)."
- }
- },
- "destination": {
- "type": "object",
- "metadata": {
- "description": "Required. The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information)."
- }
- },
- "eventDeliverySchema": {
- "type": "string",
- "defaultValue": "EventGridSchema",
- "allowedValues": [
- "CloudEventSchemaV1_0",
- "CustomInputSchema",
- "EventGridSchema",
- "EventGridEvent"
- ],
- "metadata": {
- "description": "Optional. The event delivery schema for the event subscription."
- }
- },
- "expirationTimeUtc": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ)."
- }
- },
- "filter": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information)."
- }
- },
- "labels": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of user defined labels."
- }
- },
- "retryPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventGrid/systemTopics/eventSubscriptions",
- "apiVersion": "2022-06-15",
- "name": "[format('{0}/{1}', parameters('systemTopicName'), parameters('name'))]",
- "properties": {
- "deadLetterDestination": "[if(not(empty(parameters('deadLetterDestination'))), parameters('deadLetterDestination'), null())]",
- "deadLetterWithResourceIdentity": "[if(not(empty(parameters('deadLetterWithResourceIdentity'))), parameters('deadLetterWithResourceIdentity'), null())]",
- "deliveryWithResourceIdentity": "[if(not(empty(parameters('deliveryWithResourceIdentity'))), parameters('deliveryWithResourceIdentity'), null())]",
- "destination": "[parameters('destination')]",
- "eventDeliverySchema": "[parameters('eventDeliverySchema')]",
- "expirationTimeUtc": "[if(not(empty(parameters('expirationTimeUtc'))), parameters('expirationTimeUtc'), '')]",
- "filter": "[if(not(empty(parameters('filter'))), parameters('filter'), createObject())]",
- "labels": "[if(not(empty(parameters('labels'))), parameters('labels'), createArray())]",
- "retryPolicy": "[if(not(empty(parameters('retryPolicy'))), parameters('retryPolicy'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event subscription."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event subscription."
- },
- "value": "[resourceId('Microsoft.EventGrid/systemTopics/eventSubscriptions', parameters('systemTopicName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event subscription was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.EventGrid/systemTopics', parameters('systemTopicName')), '2022-06-15', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-grid/system-topic/event-subscription/version.json b/modules/event-grid/system-topic/event-subscription/version.json
deleted file mode 100644
index 7fa401bdf7..0000000000
--- a/modules/event-grid/system-topic/event-subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.1",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-grid/system-topic/main.bicep b/modules/event-grid/system-topic/main.bicep
deleted file mode 100644
index 97b33065d9..0000000000
--- a/modules/event-grid/system-topic/main.bicep
+++ /dev/null
@@ -1,243 +0,0 @@
-metadata name = 'Event Grid System Topics'
-metadata description = 'This module deploys an Event Grid System Topic.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Event Grid Topic.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Required. Source for the system topic.')
-param source string
-
-@description('Required. TopicType for the system topic.')
-param topicType string
-
-@description('Optional. Event subscriptions to deploy.')
-param eventSubscriptions array = []
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'EventGrid Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1e241071-0855-49ea-94dc-649edcd759de')
- 'EventGrid Data Sender': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a91429-5739-47e2-a06b-3470a27159e7')
- 'EventGrid EventSubscription Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '428e0ff0-5e57-4d9c-a221-2c70d0e0a443')
- 'EventGrid EventSubscription Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2414bbcf-6497-4faf-8c65-045460748405')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource systemTopic 'Microsoft.EventGrid/systemTopics@2021-12-01' = {
- name: name
- location: location
- identity: identity
- tags: tags
- properties: {
- source: source
- topicType: topicType
- }
-}
-
-// Event subscriptions
-module systemTopics_eventSubscriptions 'event-subscription/main.bicep' = [for (eventSubscription, index) in eventSubscriptions: {
- name: '${uniqueString(deployment().name, location)}-EventGrid-SystemTopics-EventSubscriptions-${index}'
- params: {
- destination: eventSubscription.destination
- systemTopicName: systemTopic.name
- name: eventSubscription.name
- deadLetterDestination: contains(eventSubscription, 'deadLetterDestination') ? eventSubscription.deadLetterDestination : {}
- deadLetterWithResourceIdentity: contains(eventSubscription, 'deadLetterWithResourceIdentity') ? eventSubscription.deadLetterWithResourceIdentity : {}
- deliveryWithResourceIdentity: contains(eventSubscription, 'deliveryWithResourceIdentity') ? eventSubscription.deliveryWithResourceIdentity : {}
- enableDefaultTelemetry: contains(eventSubscription, 'enableDefaultTelemetry') ? eventSubscription.enableDefaultTelemetry : true
- eventDeliverySchema: contains(eventSubscription, 'eventDeliverySchema') ? eventSubscription.eventDeliverySchema : 'EventGridSchema'
- expirationTimeUtc: contains(eventSubscription, 'expirationTimeUtc') ? eventSubscription.expirationTimeUtc : ''
- filter: contains(eventSubscription, 'filter') ? eventSubscription.filter : {}
- labels: contains(eventSubscription, 'labels') ? eventSubscription.labels : []
- location: contains(eventSubscription, 'location') ? eventSubscription.location : systemTopic.location
- retryPolicy: contains(eventSubscription, 'retryPolicy') ? eventSubscription.retryPolicy : {}
- }
-}]
-
-resource systemTopic_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: systemTopic
-}
-
-resource systemTopic_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: systemTopic
-}]
-
-resource systemTopic_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(systemTopic.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: systemTopic
-}]
-
-@description('The name of the event grid system topic.')
-output name string = systemTopic.name
-
-@description('The resource ID of the event grid system topic.')
-output resourceId string = systemTopic.id
-
-@description('The name of the resource group the event grid system topic was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(systemTopic.identity, 'principalId') ? systemTopic.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = systemTopic.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/event-grid/system-topic/main.json b/modules/event-grid/system-topic/main.json
deleted file mode 100644
index 9983061e2e..0000000000
--- a/modules/event-grid/system-topic/main.json
+++ /dev/null
@@ -1,659 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "1660436981093999896"
- },
- "name": "Event Grid System Topics",
- "description": "This module deploys an Event Grid System Topic.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Grid Topic."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "source": {
- "type": "string",
- "metadata": {
- "description": "Required. Source for the system topic."
- }
- },
- "topicType": {
- "type": "string",
- "metadata": {
- "description": "Required. TopicType for the system topic."
- }
- },
- "eventSubscriptions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Event subscriptions to deploy."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "EventGrid Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1e241071-0855-49ea-94dc-649edcd759de')]",
- "EventGrid Data Sender": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a91429-5739-47e2-a06b-3470a27159e7')]",
- "EventGrid EventSubscription Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '428e0ff0-5e57-4d9c-a221-2c70d0e0a443')]",
- "EventGrid EventSubscription Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2414bbcf-6497-4faf-8c65-045460748405')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "systemTopic": {
- "type": "Microsoft.EventGrid/systemTopics",
- "apiVersion": "2021-12-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "identity": "[variables('identity')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "source": "[parameters('source')]",
- "topicType": "[parameters('topicType')]"
- }
- },
- "systemTopic_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.EventGrid/systemTopics/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "systemTopic"
- ]
- },
- "systemTopic_diagnosticSettings": {
- "copy": {
- "name": "systemTopic_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.EventGrid/systemTopics/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "systemTopic"
- ]
- },
- "systemTopic_roleAssignments": {
- "copy": {
- "name": "systemTopic_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.EventGrid/systemTopics/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.EventGrid/systemTopics', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "systemTopic"
- ]
- },
- "systemTopics_eventSubscriptions": {
- "copy": {
- "name": "systemTopics_eventSubscriptions",
- "count": "[length(parameters('eventSubscriptions'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-EventGrid-SystemTopics-EventSubscriptions-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "destination": {
- "value": "[parameters('eventSubscriptions')[copyIndex()].destination]"
- },
- "systemTopicName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('eventSubscriptions')[copyIndex()].name]"
- },
- "deadLetterDestination": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'deadLetterDestination'), createObject('value', parameters('eventSubscriptions')[copyIndex()].deadLetterDestination), createObject('value', createObject()))]",
- "deadLetterWithResourceIdentity": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'deadLetterWithResourceIdentity'), createObject('value', parameters('eventSubscriptions')[copyIndex()].deadLetterWithResourceIdentity), createObject('value', createObject()))]",
- "deliveryWithResourceIdentity": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'deliveryWithResourceIdentity'), createObject('value', parameters('eventSubscriptions')[copyIndex()].deliveryWithResourceIdentity), createObject('value', createObject()))]",
- "enableDefaultTelemetry": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'enableDefaultTelemetry'), createObject('value', parameters('eventSubscriptions')[copyIndex()].enableDefaultTelemetry), createObject('value', true()))]",
- "eventDeliverySchema": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'eventDeliverySchema'), createObject('value', parameters('eventSubscriptions')[copyIndex()].eventDeliverySchema), createObject('value', 'EventGridSchema'))]",
- "expirationTimeUtc": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'expirationTimeUtc'), createObject('value', parameters('eventSubscriptions')[copyIndex()].expirationTimeUtc), createObject('value', ''))]",
- "filter": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'filter'), createObject('value', parameters('eventSubscriptions')[copyIndex()].filter), createObject('value', createObject()))]",
- "labels": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'labels'), createObject('value', parameters('eventSubscriptions')[copyIndex()].labels), createObject('value', createArray()))]",
- "location": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'location'), createObject('value', parameters('eventSubscriptions')[copyIndex()].location), createObject('value', reference('systemTopic', '2021-12-01', 'full').location))]",
- "retryPolicy": "[if(contains(parameters('eventSubscriptions')[copyIndex()], 'retryPolicy'), createObject('value', parameters('eventSubscriptions')[copyIndex()].retryPolicy), createObject('value', createObject()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15173790856574805238"
- },
- "name": "Event Grid System Topic Event Subscriptions",
- "description": "This module deploys an Event Grid System Topic Event Subscription.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Subscription."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "systemTopicName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Event Grid System Topic."
- }
- },
- "deadLetterDestination": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information)."
- }
- },
- "deadLetterWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information)."
- }
- },
- "deliveryWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information)."
- }
- },
- "destination": {
- "type": "object",
- "metadata": {
- "description": "Required. The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information)."
- }
- },
- "eventDeliverySchema": {
- "type": "string",
- "defaultValue": "EventGridSchema",
- "allowedValues": [
- "CloudEventSchemaV1_0",
- "CustomInputSchema",
- "EventGridSchema",
- "EventGridEvent"
- ],
- "metadata": {
- "description": "Optional. The event delivery schema for the event subscription."
- }
- },
- "expirationTimeUtc": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ)."
- }
- },
- "filter": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information)."
- }
- },
- "labels": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of user defined labels."
- }
- },
- "retryPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventGrid/systemTopics/eventSubscriptions",
- "apiVersion": "2022-06-15",
- "name": "[format('{0}/{1}', parameters('systemTopicName'), parameters('name'))]",
- "properties": {
- "deadLetterDestination": "[if(not(empty(parameters('deadLetterDestination'))), parameters('deadLetterDestination'), null())]",
- "deadLetterWithResourceIdentity": "[if(not(empty(parameters('deadLetterWithResourceIdentity'))), parameters('deadLetterWithResourceIdentity'), null())]",
- "deliveryWithResourceIdentity": "[if(not(empty(parameters('deliveryWithResourceIdentity'))), parameters('deliveryWithResourceIdentity'), null())]",
- "destination": "[parameters('destination')]",
- "eventDeliverySchema": "[parameters('eventDeliverySchema')]",
- "expirationTimeUtc": "[if(not(empty(parameters('expirationTimeUtc'))), parameters('expirationTimeUtc'), '')]",
- "filter": "[if(not(empty(parameters('filter'))), parameters('filter'), createObject())]",
- "labels": "[if(not(empty(parameters('labels'))), parameters('labels'), createArray())]",
- "retryPolicy": "[if(not(empty(parameters('retryPolicy'))), parameters('retryPolicy'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event subscription."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event subscription."
- },
- "value": "[resourceId('Microsoft.EventGrid/systemTopics/eventSubscriptions', parameters('systemTopicName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event subscription was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.EventGrid/systemTopics', parameters('systemTopicName')), '2022-06-15', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "systemTopic"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event grid system topic."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event grid system topic."
- },
- "value": "[resourceId('Microsoft.EventGrid/systemTopics', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event grid system topic was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('systemTopic', '2021-12-01', 'full').identity, 'principalId')), reference('systemTopic', '2021-12-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('systemTopic', '2021-12-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-grid/system-topic/tests/e2e/defaults/dependencies.bicep b/modules/event-grid/system-topic/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index 61ebc54d90..0000000000
--- a/modules/event-grid/system-topic/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,17 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-grid/system-topic/tests/e2e/defaults/main.test.bicep b/modules/event-grid/system-topic/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index ab3814500c..0000000000
--- a/modules/event-grid/system-topic/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.systemtopics-${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 = 'egstmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- source: nestedDependencies.outputs.storageAccountResourceId
- topicType: 'Microsoft.Storage.StorageAccounts'
- }
-}]
diff --git a/modules/event-grid/system-topic/tests/e2e/max/dependencies.bicep b/modules/event-grid/system-topic/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 9b192272d4..0000000000
--- a/modules/event-grid/system-topic/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,42 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Storage Queue to create.')
-param storageQueueName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-
- resource queueService 'queueServices@2022-09-01' = {
- name: 'default'
-
- resource queue 'queues@2022-09-01' = {
- name: storageQueueName
- }
- }
-}
-
-@description('The name of the created Storage Account Queue.')
-output queueName string = storageAccount::queueService::queue.name
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-grid/system-topic/tests/e2e/max/main.test.bicep b/modules/event-grid/system-topic/tests/e2e/max/main.test.bicep
deleted file mode 100644
index cdcc6727cb..0000000000
--- a/modules/event-grid/system-topic/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,130 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.systemtopics-${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 = 'egstmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- storageQueueName: 'dep${namePrefix}sq${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- source: nestedDependencies.outputs.storageAccountResourceId
- topicType: 'Microsoft.Storage.StorageAccounts'
- eventSubscriptions: [ {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- expirationTimeUtc: '2099-01-01T11:00:21.715Z'
- filter: {
- isSubjectCaseSensitive: false
- enableAdvancedFilteringOnArrays: true
- }
- retryPolicy: {
- maxDeliveryAttempts: 10
- eventTimeToLive: '120'
- }
- eventDeliverySchema: 'CloudEventSchemaV1_0'
- destination: {
- endpointType: 'StorageQueue'
- properties: {
- resourceId: nestedDependencies.outputs.storageAccountResourceId
- queueMessageTimeToLiveInSeconds: 86400
- queueName: nestedDependencies.outputs.queueName
- }
- }
- } ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- systemAssigned: true
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/event-grid/system-topic/tests/e2e/waf-aligned/dependencies.bicep b/modules/event-grid/system-topic/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 9b192272d4..0000000000
--- a/modules/event-grid/system-topic/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,42 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Storage Queue to create.')
-param storageQueueName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-
- resource queueService 'queueServices@2022-09-01' = {
- name: 'default'
-
- resource queue 'queues@2022-09-01' = {
- name: storageQueueName
- }
- }
-}
-
-@description('The name of the created Storage Account Queue.')
-output queueName string = storageAccount::queueService::queue.name
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep b/modules/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 943ee3a929..0000000000
--- a/modules/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,130 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.systemtopics-${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 = 'egstwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- storageQueueName: 'dep${namePrefix}sq${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- source: nestedDependencies.outputs.storageAccountResourceId
- topicType: 'Microsoft.Storage.StorageAccounts'
- eventSubscriptions: [ {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- expirationTimeUtc: '2099-01-01T11:00:21.715Z'
- filter: {
- isSubjectCaseSensitive: false
- enableAdvancedFilteringOnArrays: true
- }
- retryPolicy: {
- maxDeliveryAttempts: 10
- eventTimeToLive: '120'
- }
- eventDeliverySchema: 'CloudEventSchemaV1_0'
- destination: {
- endpointType: 'StorageQueue'
- properties: {
- resourceId: nestedDependencies.outputs.storageAccountResourceId
- queueMessageTimeToLiveInSeconds: 86400
- queueName: nestedDependencies.outputs.queueName
- }
- }
- } ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- managedIdentities: {
- systemAssigned: true
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/event-grid/system-topic/version.json b/modules/event-grid/system-topic/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-grid/system-topic/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-grid/topic/MOVED-TO-AVM.md b/modules/event-grid/topic/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/event-grid/topic/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/event-grid/topic/README.md b/modules/event-grid/topic/README.md
index 6fd7b92f69..e8bb3dcd9d 100644
--- a/modules/event-grid/topic/README.md
+++ b/modules/event-grid/topic/README.md
@@ -1,1159 +1,7 @@
-# Event Grid Topics `[Microsoft.EventGrid/topics]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _Pe_
-
-
-
-
-
-### Example 4: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Event Grid Topic. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventSubscriptions`](#parameter-eventsubscriptions) | array | Event subscriptions to deploy. |
-| [`inboundIpRules`](#parameter-inboundiprules) | array | This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the Event Grid Topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventSubscriptions`
-
-Event subscriptions to deploy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `inboundIpRules`
-
-This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the event grid topic. |
-| `resourceGroupName` | string | The name of the resource group the event grid topic was deployed into. |
-| `resourceId` | string | The resource ID of the event grid topic. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/event-grid/topic/event-subscription/README.md b/modules/event-grid/topic/event-subscription/README.md
deleted file mode 100644
index aa6ab314d5..0000000000
--- a/modules/event-grid/topic/event-subscription/README.md
+++ /dev/null
@@ -1,165 +0,0 @@
-# EventGrid Topic Event Subscriptions `[Microsoft.EventGrid/topics/eventSubscriptions]`
-
-This module deploys an Event Grid Topic Event Subscription.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventGrid/topics/eventSubscriptions` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/topics/eventSubscriptions) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`destination`](#parameter-destination) | object | The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information). |
-| [`name`](#parameter-name) | string | The name of the Event Subscription. |
-| [`topicName`](#parameter-topicname) | string | Name of the Event Grid Topic. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`deadLetterDestination`](#parameter-deadletterdestination) | object | Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information). |
-| [`deadLetterWithResourceIdentity`](#parameter-deadletterwithresourceidentity) | object | Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information). |
-| [`deliveryWithResourceIdentity`](#parameter-deliverywithresourceidentity) | object | Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information). |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventDeliverySchema`](#parameter-eventdeliveryschema) | string | The event delivery schema for the event subscription. |
-| [`expirationTimeUtc`](#parameter-expirationtimeutc) | string | The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ). |
-| [`filter`](#parameter-filter) | object | The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information). |
-| [`labels`](#parameter-labels) | array | The list of user defined labels. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`retryPolicy`](#parameter-retrypolicy) | object | The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events. |
-
-### Parameter: `destination`
-
-The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information).
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-The name of the Event Subscription.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `topicName`
-
-Name of the Event Grid Topic.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `deadLetterDestination`
-
-Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `deadLetterWithResourceIdentity`
-
-Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `deliveryWithResourceIdentity`
-
-Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventDeliverySchema`
-
-The event delivery schema for the event subscription.
-
-- Required: No
-- Type: string
-- Default: `'EventGridSchema'`
-- Allowed:
- ```Bicep
- [
- 'CloudEventSchemaV1_0'
- 'CustomInputSchema'
- 'EventGridEvent'
- 'EventGridSchema'
- ]
- ```
-
-### Parameter: `expirationTimeUtc`
-
-The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ).
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `filter`
-
-The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information).
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `labels`
-
-The list of user defined labels.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `retryPolicy`
-
-The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the event subscription. |
-| `resourceGroupName` | string | The name of the resource group the event subscription was deployed into. |
-| `resourceId` | string | The resource ID of the event subscription. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-grid/topic/event-subscription/main.bicep b/modules/event-grid/topic/event-subscription/main.bicep
deleted file mode 100644
index 216d233a71..0000000000
--- a/modules/event-grid/topic/event-subscription/main.bicep
+++ /dev/null
@@ -1,94 +0,0 @@
-metadata name = 'EventGrid Topic Event Subscriptions'
-metadata description = 'This module deploys an Event Grid Topic Event Subscription.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Event Subscription.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. Name of the Event Grid Topic.')
-param topicName string
-
-@description('Optional. Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information).')
-param deadLetterDestination object = {}
-
-@description('Optional. Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information).')
-param deadLetterWithResourceIdentity object = {}
-
-@description('Optional. Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information).')
-param deliveryWithResourceIdentity object = {}
-
-@description('Required. The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information).')
-param destination object
-
-@description('Optional. The event delivery schema for the event subscription.')
-@allowed(
- [
- 'CloudEventSchemaV1_0'
- 'CustomInputSchema'
- 'EventGridSchema'
- 'EventGridEvent'
- ]
-)
-param eventDeliverySchema string = 'EventGridSchema'
-
-@description('Optional. The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ).')
-param expirationTimeUtc string = ''
-
-@description('Optional. The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information).')
-param filter object = {}
-
-@description('Optional. The list of user defined labels.')
-param labels array = []
-
-@description('Optional. The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events.')
-param retryPolicy object = {}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource topic 'Microsoft.EventGrid/topics@2022-06-15' existing = {
- name: topicName
-}
-
-resource eventSubscription 'Microsoft.EventGrid/topics/eventSubscriptions@2022-06-15' = {
- name: name
- parent: topic
- properties: {
- deadLetterDestination: !empty(deadLetterDestination) ? deadLetterDestination : null
- deadLetterWithResourceIdentity: !empty(deadLetterWithResourceIdentity) ? deadLetterWithResourceIdentity : null
- deliveryWithResourceIdentity: !empty(deliveryWithResourceIdentity) ? deliveryWithResourceIdentity : null
- destination: destination
- eventDeliverySchema: eventDeliverySchema
- expirationTimeUtc: !empty(expirationTimeUtc) ? expirationTimeUtc : ''
- filter: !empty(filter) ? filter : {}
- labels: !empty(labels) ? labels : []
- retryPolicy: !empty(retryPolicy) ? retryPolicy : null
- }
-}
-
-@description('The name of the event subscription.')
-output name string = eventSubscription.name
-
-@description('The resource ID of the event subscription.')
-output resourceId string = eventSubscription.id
-
-@description('The name of the resource group the event subscription was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = topic.location
diff --git a/modules/event-grid/topic/event-subscription/main.json b/modules/event-grid/topic/event-subscription/main.json
deleted file mode 100644
index 9891a17599..0000000000
--- a/modules/event-grid/topic/event-subscription/main.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2222106647839764321"
- },
- "name": "EventGrid Topic Event Subscriptions",
- "description": "This module deploys an Event Grid Topic Event Subscription.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Subscription."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "topicName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Event Grid Topic."
- }
- },
- "deadLetterDestination": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information)."
- }
- },
- "deadLetterWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information)."
- }
- },
- "deliveryWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information)."
- }
- },
- "destination": {
- "type": "object",
- "metadata": {
- "description": "Required. The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information)."
- }
- },
- "eventDeliverySchema": {
- "type": "string",
- "defaultValue": "EventGridSchema",
- "allowedValues": [
- "CloudEventSchemaV1_0",
- "CustomInputSchema",
- "EventGridSchema",
- "EventGridEvent"
- ],
- "metadata": {
- "description": "Optional. The event delivery schema for the event subscription."
- }
- },
- "expirationTimeUtc": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ)."
- }
- },
- "filter": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information)."
- }
- },
- "labels": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of user defined labels."
- }
- },
- "retryPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventGrid/topics/eventSubscriptions",
- "apiVersion": "2022-06-15",
- "name": "[format('{0}/{1}', parameters('topicName'), parameters('name'))]",
- "properties": {
- "deadLetterDestination": "[if(not(empty(parameters('deadLetterDestination'))), parameters('deadLetterDestination'), null())]",
- "deadLetterWithResourceIdentity": "[if(not(empty(parameters('deadLetterWithResourceIdentity'))), parameters('deadLetterWithResourceIdentity'), null())]",
- "deliveryWithResourceIdentity": "[if(not(empty(parameters('deliveryWithResourceIdentity'))), parameters('deliveryWithResourceIdentity'), null())]",
- "destination": "[parameters('destination')]",
- "eventDeliverySchema": "[parameters('eventDeliverySchema')]",
- "expirationTimeUtc": "[if(not(empty(parameters('expirationTimeUtc'))), parameters('expirationTimeUtc'), '')]",
- "filter": "[if(not(empty(parameters('filter'))), parameters('filter'), createObject())]",
- "labels": "[if(not(empty(parameters('labels'))), parameters('labels'), createArray())]",
- "retryPolicy": "[if(not(empty(parameters('retryPolicy'))), parameters('retryPolicy'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event subscription."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event subscription."
- },
- "value": "[resourceId('Microsoft.EventGrid/topics/eventSubscriptions', parameters('topicName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event subscription was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.EventGrid/topics', parameters('topicName')), '2022-06-15', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-grid/topic/event-subscription/version.json b/modules/event-grid/topic/event-subscription/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-grid/topic/event-subscription/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-grid/topic/main.bicep b/modules/event-grid/topic/main.bicep
deleted file mode 100644
index 440efefed8..0000000000
--- a/modules/event-grid/topic/main.bicep
+++ /dev/null
@@ -1,323 +0,0 @@
-metadata name = 'Event Grid Topics'
-metadata description = 'This module deploys an Event Grid Topic.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Event Grid Topic.')
-param name string
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.')
-param inboundIpRules array = []
-
-@description('Optional. Event subscriptions to deploy.')
-param eventSubscriptions array = []
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'EventGrid Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1e241071-0855-49ea-94dc-649edcd759de')
- 'EventGrid Data Sender': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a91429-5739-47e2-a06b-3470a27159e7')
- 'EventGrid EventSubscription Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '428e0ff0-5e57-4d9c-a221-2c70d0e0a443')
- 'EventGrid EventSubscription Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2414bbcf-6497-4faf-8c65-045460748405')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource topic 'Microsoft.EventGrid/topics@2020-06-01' = {
- name: name
- location: location
- tags: tags
- properties: {
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) && empty(inboundIpRules) ? 'Disabled' : null)
- inboundIpRules: (empty(inboundIpRules) ? null : inboundIpRules)
- }
-}
-
-// Event subscriptions
-module topics_eventSubscriptions 'event-subscription/main.bicep' = [for (eventSubscription, index) in eventSubscriptions: {
- name: '${uniqueString(deployment().name, location)}-EventGrid-Topics-EventSubscriptions-${index}'
- params: {
- destination: eventSubscription.destination
- topicName: topic.name
- name: eventSubscription.name
- deadLetterDestination: contains(eventSubscriptions, 'deadLetterDestination') ? eventSubscription.deadLetterDestination : {}
- deadLetterWithResourceIdentity: contains(eventSubscriptions, 'deadLetterWithResourceIdentity') ? eventSubscription.deadLetterWithResourceIdentity : {}
- deliveryWithResourceIdentity: contains(eventSubscriptions, 'deliveryWithResourceIdentity') ? eventSubscription.deliveryWithResourceIdentity : {}
- enableDefaultTelemetry: contains(eventSubscriptions, 'enableDefaultTelemetry') ? eventSubscription.enableDefaultTelemetry : true
- eventDeliverySchema: contains(eventSubscriptions, 'eventDeliverySchema') ? eventSubscription.eventDeliverySchema : 'EventGridSchema'
- expirationTimeUtc: contains(eventSubscriptions, 'expirationTimeUtc') ? eventSubscription.expirationTimeUtc : ''
- filter: contains(eventSubscriptions, 'filter') ? eventSubscription.filter : {}
- labels: contains(eventSubscriptions, 'labels') ? eventSubscription.labels : []
- location: contains(eventSubscriptions, 'location') ? eventSubscription.location : topic.location
- retryPolicy: contains(eventSubscriptions, 'retryPolicy') ? eventSubscription.retryPolicy : {}
- }
-}]
-
-resource topic_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: topic
-}
-
-resource topic_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: topic
-}]
-
-module topic_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-topic-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'topic'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(topic.id, '/'))}-${privateEndpoint.?service ?? 'topic'}-${index}'
- serviceResourceId: topic.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource topic_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(topic.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: topic
-}]
-
-@description('The name of the event grid topic.')
-output name string = topic.name
-
-@description('The resource ID of the event grid topic.')
-output resourceId string = topic.id
-
-@description('The name of the resource group the event grid topic was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = topic.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/event-grid/topic/main.json b/modules/event-grid/topic/main.json
deleted file mode 100644
index 2b5559ee2a..0000000000
--- a/modules/event-grid/topic/main.json
+++ /dev/null
@@ -1,1425 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "12820080478660459397"
- },
- "name": "Event Grid Topics",
- "description": "This module deploys an Event Grid Topic.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Grid Topic."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and inboundIpRules are not set."
- }
- },
- "inboundIpRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled."
- }
- },
- "eventSubscriptions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Event subscriptions to deploy."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "EventGrid Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1e241071-0855-49ea-94dc-649edcd759de')]",
- "EventGrid Data Sender": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'd5a91429-5739-47e2-a06b-3470a27159e7')]",
- "EventGrid EventSubscription Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '428e0ff0-5e57-4d9c-a221-2c70d0e0a443')]",
- "EventGrid EventSubscription Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2414bbcf-6497-4faf-8c65-045460748405')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "topic": {
- "type": "Microsoft.EventGrid/topics",
- "apiVersion": "2020-06-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('inboundIpRules'))), 'Disabled', null()))]",
- "inboundIpRules": "[if(empty(parameters('inboundIpRules')), null(), parameters('inboundIpRules'))]"
- }
- },
- "topic_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.EventGrid/topics/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "topic"
- ]
- },
- "topic_diagnosticSettings": {
- "copy": {
- "name": "topic_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.EventGrid/topics/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "topic"
- ]
- },
- "topic_roleAssignments": {
- "copy": {
- "name": "topic_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.EventGrid/topics/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.EventGrid/topics', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "topic"
- ]
- },
- "topics_eventSubscriptions": {
- "copy": {
- "name": "topics_eventSubscriptions",
- "count": "[length(parameters('eventSubscriptions'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-EventGrid-Topics-EventSubscriptions-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "destination": {
- "value": "[parameters('eventSubscriptions')[copyIndex()].destination]"
- },
- "topicName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('eventSubscriptions')[copyIndex()].name]"
- },
- "deadLetterDestination": "[if(contains(parameters('eventSubscriptions'), 'deadLetterDestination'), createObject('value', parameters('eventSubscriptions')[copyIndex()].deadLetterDestination), createObject('value', createObject()))]",
- "deadLetterWithResourceIdentity": "[if(contains(parameters('eventSubscriptions'), 'deadLetterWithResourceIdentity'), createObject('value', parameters('eventSubscriptions')[copyIndex()].deadLetterWithResourceIdentity), createObject('value', createObject()))]",
- "deliveryWithResourceIdentity": "[if(contains(parameters('eventSubscriptions'), 'deliveryWithResourceIdentity'), createObject('value', parameters('eventSubscriptions')[copyIndex()].deliveryWithResourceIdentity), createObject('value', createObject()))]",
- "enableDefaultTelemetry": "[if(contains(parameters('eventSubscriptions'), 'enableDefaultTelemetry'), createObject('value', parameters('eventSubscriptions')[copyIndex()].enableDefaultTelemetry), createObject('value', true()))]",
- "eventDeliverySchema": "[if(contains(parameters('eventSubscriptions'), 'eventDeliverySchema'), createObject('value', parameters('eventSubscriptions')[copyIndex()].eventDeliverySchema), createObject('value', 'EventGridSchema'))]",
- "expirationTimeUtc": "[if(contains(parameters('eventSubscriptions'), 'expirationTimeUtc'), createObject('value', parameters('eventSubscriptions')[copyIndex()].expirationTimeUtc), createObject('value', ''))]",
- "filter": "[if(contains(parameters('eventSubscriptions'), 'filter'), createObject('value', parameters('eventSubscriptions')[copyIndex()].filter), createObject('value', createObject()))]",
- "labels": "[if(contains(parameters('eventSubscriptions'), 'labels'), createObject('value', parameters('eventSubscriptions')[copyIndex()].labels), createObject('value', createArray()))]",
- "location": "[if(contains(parameters('eventSubscriptions'), 'location'), createObject('value', parameters('eventSubscriptions')[copyIndex()].location), createObject('value', reference('topic', '2020-06-01', 'full').location))]",
- "retryPolicy": "[if(contains(parameters('eventSubscriptions'), 'retryPolicy'), createObject('value', parameters('eventSubscriptions')[copyIndex()].retryPolicy), createObject('value', createObject()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "19673224192591950"
- },
- "name": "EventGrid Topic Event Subscriptions",
- "description": "This module deploys an Event Grid Topic Event Subscription.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Event Subscription."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "topicName": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Event Grid Topic."
- }
- },
- "deadLetterDestination": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter Destination. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterdestination-objects for more information)."
- }
- },
- "deadLetterWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Dead Letter with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deadletterwithresourceidentity-objects for more information)."
- }
- },
- "deliveryWithResourceIdentity": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Delivery with Resource Identity Configuration. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#deliverywithresourceidentity-objects for more information)."
- }
- },
- "destination": {
- "type": "object",
- "metadata": {
- "description": "Required. The destination for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptiondestination-objects for more information)."
- }
- },
- "eventDeliverySchema": {
- "type": "string",
- "defaultValue": "EventGridSchema",
- "allowedValues": [
- "CloudEventSchemaV1_0",
- "CustomInputSchema",
- "EventGridSchema",
- "EventGridEvent"
- ],
- "metadata": {
- "description": "Optional. The event delivery schema for the event subscription."
- }
- },
- "expirationTimeUtc": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The expiration time for the event subscription. Format is ISO-8601 (yyyy-MM-ddTHH:mm:ssZ)."
- }
- },
- "filter": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The filter for the event subscription. (See https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?pivots=deployment-language-bicep#eventsubscriptionfilter for more information)."
- }
- },
- "labels": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of user defined labels."
- }
- },
- "retryPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The retry policy for events. This can be used to configure the TTL and maximum number of delivery attempts and time to live for events."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventGrid/topics/eventSubscriptions",
- "apiVersion": "2022-06-15",
- "name": "[format('{0}/{1}', parameters('topicName'), parameters('name'))]",
- "properties": {
- "deadLetterDestination": "[if(not(empty(parameters('deadLetterDestination'))), parameters('deadLetterDestination'), null())]",
- "deadLetterWithResourceIdentity": "[if(not(empty(parameters('deadLetterWithResourceIdentity'))), parameters('deadLetterWithResourceIdentity'), null())]",
- "deliveryWithResourceIdentity": "[if(not(empty(parameters('deliveryWithResourceIdentity'))), parameters('deliveryWithResourceIdentity'), null())]",
- "destination": "[parameters('destination')]",
- "eventDeliverySchema": "[parameters('eventDeliverySchema')]",
- "expirationTimeUtc": "[if(not(empty(parameters('expirationTimeUtc'))), parameters('expirationTimeUtc'), '')]",
- "filter": "[if(not(empty(parameters('filter'))), parameters('filter'), createObject())]",
- "labels": "[if(not(empty(parameters('labels'))), parameters('labels'), createArray())]",
- "retryPolicy": "[if(not(empty(parameters('retryPolicy'))), parameters('retryPolicy'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event subscription."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event subscription."
- },
- "value": "[resourceId('Microsoft.EventGrid/topics/eventSubscriptions', parameters('topicName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event subscription was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference(resourceId('Microsoft.EventGrid/topics', parameters('topicName')), '2022-06-15', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "topic"
- ]
- },
- "topic_privateEndpoints": {
- "copy": {
- "name": "topic_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-topic-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'topic')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.EventGrid/topics', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'topic'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.EventGrid/topics', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "topic"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event grid topic."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event grid topic."
- },
- "value": "[resourceId('Microsoft.EventGrid/topics', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the event grid topic was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('topic', '2020-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-grid/topic/tests/e2e/defaults/main.test.bicep b/modules/event-grid/topic/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 29f7356f10..0000000000
--- a/modules/event-grid/topic/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${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 = 'egtmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/event-grid/topic/tests/e2e/max/dependencies.bicep b/modules/event-grid/topic/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 448380e27d..0000000000
--- a/modules/event-grid/topic/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Storage Queue to create.')
-param storageQueueName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.eventgrid.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-
- resource queueService 'queueServices@2022-09-01' = {
- name: 'default'
-
- resource queue 'queues@2022-09-01' = {
- name: storageQueueName
- }
- }
-}
-
-@description('The name of the created Storage Account Queue.')
-output queueName string = storageAccount::queueService::queue.name
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-grid/topic/tests/e2e/max/main.test.bicep b/modules/event-grid/topic/tests/e2e/max/main.test.bicep
deleted file mode 100644
index bba0f24999..0000000000
--- a/modules/event-grid/topic/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,146 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${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 = 'egtmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- storageQueueName: 'dep${namePrefix}sq${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- eventSubscriptions: [ {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- expirationTimeUtc: '2099-01-01T11:00:21.715Z'
- filter: {
- isSubjectCaseSensitive: false
- enableAdvancedFilteringOnArrays: true
- }
- retryPolicy: {
- maxDeliveryAttempts: 10
- eventTimeToLive: '120'
- }
- eventDeliverySchema: 'CloudEventSchemaV1_0'
- destination: {
- endpointType: 'StorageQueue'
- properties: {
- resourceId: nestedDependencies.outputs.storageAccountResourceId
- queueMessageTimeToLiveInSeconds: 86400
- queueName: nestedDependencies.outputs.queueName
- }
- }
- } ]
- inboundIpRules: [
- {
- action: 'Allow'
- ipMask: '40.74.28.0/23'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'topic'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/event-grid/topic/tests/e2e/pe/dependencies.bicep b/modules/event-grid/topic/tests/e2e/pe/dependencies.bicep
deleted file mode 100644
index 4d31fc9282..0000000000
--- a/modules/event-grid/topic/tests/e2e/pe/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.eventgrid.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/event-grid/topic/tests/e2e/pe/main.test.bicep b/modules/event-grid/topic/tests/e2e/pe/main.test.bicep
deleted file mode 100644
index e2244c60d7..0000000000
--- a/modules/event-grid/topic/tests/e2e/pe/main.test.bicep
+++ /dev/null
@@ -1,72 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${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 = 'egtpe'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/event-grid/topic/tests/e2e/waf-aligned/dependencies.bicep b/modules/event-grid/topic/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 448380e27d..0000000000
--- a/modules/event-grid/topic/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Storage Queue to create.')
-param storageQueueName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.eventgrid.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-
- resource queueService 'queueServices@2022-09-01' = {
- name: 'default'
-
- resource queue 'queues@2022-09-01' = {
- name: storageQueueName
- }
- }
-}
-
-@description('The name of the created Storage Account Queue.')
-output queueName string = storageAccount::queueService::queue.name
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep b/modules/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 10a11dab1b..0000000000
--- a/modules/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,146 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${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 = 'egtwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- storageQueueName: 'dep${namePrefix}sq${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- eventSubscriptions: [ {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- expirationTimeUtc: '2099-01-01T11:00:21.715Z'
- filter: {
- isSubjectCaseSensitive: false
- enableAdvancedFilteringOnArrays: true
- }
- retryPolicy: {
- maxDeliveryAttempts: 10
- eventTimeToLive: '120'
- }
- eventDeliverySchema: 'CloudEventSchemaV1_0'
- destination: {
- endpointType: 'StorageQueue'
- properties: {
- resourceId: nestedDependencies.outputs.storageAccountResourceId
- queueMessageTimeToLiveInSeconds: 86400
- queueName: nestedDependencies.outputs.queueName
- }
- }
- } ]
- inboundIpRules: [
- {
- action: 'Allow'
- ipMask: '40.74.28.0/23'
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'topic'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/event-grid/topic/version.json b/modules/event-grid/topic/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/event-grid/topic/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/README.md b/modules/event-hub/namespace/README.md
index a7afa4ab37..d6c72005d5 100644
--- a/modules/event-hub/namespace/README.md
+++ b/modules/event-hub/namespace/README.md
@@ -1,1854 +1,7 @@
-# Event Hub Namespaces `[Microsoft.EventHub/namespaces]`
+
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _Pe_
-
-
-
-
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the event hub namespace. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`authorizationRules`](#parameter-authorizationrules) | array | Authorization Rules for the Event Hub namespace. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`disableLocalAuth`](#parameter-disablelocalauth) | bool | This property disables SAS authentication for the Event Hubs namespace. |
-| [`disasterRecoveryConfig`](#parameter-disasterrecoveryconfig) | object | The disaster recovery config for this namespace. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventhubs`](#parameter-eventhubs) | array | The event hubs to deploy into this namespace. |
-| [`isAutoInflateEnabled`](#parameter-isautoinflateenabled) | bool | Switch to enable the Auto Inflate feature of Event Hub. Auto Inflate is not supported in Premium SKU EventHub. |
-| [`kafkaEnabled`](#parameter-kafkaenabled) | bool | Value that indicates whether Kafka is enabled for Event Hubs Namespace. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`maximumThroughputUnits`](#parameter-maximumthroughputunits) | int | Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. |
-| [`minimumTlsVersion`](#parameter-minimumtlsversion) | string | The minimum TLS version for the cluster to support. |
-| [`networkRuleSets`](#parameter-networkrulesets) | object | Configure networking options. This object contains IPs/Subnets to allow or restrict access to private endpoints only. For security reasons, it is recommended to configure this object on the Namespace. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`requireInfrastructureEncryption`](#parameter-requireinfrastructureencryption) | bool | Enable infrastructure encryption (double encryption). Note, this setting requires the configuration of Customer-Managed-Keys (CMK) via the corresponding module parameters. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`skuCapacity`](#parameter-skucapacity) | int | The Event Hub's throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units. |
-| [`skuName`](#parameter-skuname) | string | event hub plan SKU name. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`zoneRedundant`](#parameter-zoneredundant) | bool | Switch to make the Event Hub Namespace zone redundant. |
-
-### Parameter: `name`
-
-The name of the event hub namespace.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `authorizationRules`
-
-Authorization Rules for the Event Hub namespace.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- ]
- ```
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `disableLocalAuth`
-
-This property disables SAS authentication for the Event Hubs namespace.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `disasterRecoveryConfig`
-
-The disaster recovery config for this namespace.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventhubs`
-
-The event hubs to deploy into this namespace.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `isAutoInflateEnabled`
-
-Switch to enable the Auto Inflate feature of Event Hub. Auto Inflate is not supported in Premium SKU EventHub.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `kafkaEnabled`
-
-Value that indicates whether Kafka is enabled for Event Hubs Namespace.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `maximumThroughputUnits`
-
-Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `minimumTlsVersion`
-
-The minimum TLS version for the cluster to support.
-
-- Required: No
-- Type: string
-- Default: `'1.2'`
-- Allowed:
- ```Bicep
- [
- '1.0'
- '1.1'
- '1.2'
- ]
- ```
-
-### Parameter: `networkRuleSets`
-
-Configure networking options. This object contains IPs/Subnets to allow or restrict access to private endpoints only. For security reasons, it is recommended to configure this object on the Namespace.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- 'SecuredByPerimeter'
- ]
- ```
-
-### Parameter: `requireInfrastructureEncryption`
-
-Enable infrastructure encryption (double encryption). Note, this setting requires the configuration of Customer-Managed-Keys (CMK) via the corresponding module parameters.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `skuCapacity`
-
-The Event Hub's throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `skuName`
-
-event hub plan SKU name.
-
-- Required: No
-- Type: string
-- Default: `'Standard'`
-- Allowed:
- ```Bicep
- [
- 'Basic'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `zoneRedundant`
-
-Switch to make the Event Hub Namespace zone redundant.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the eventspace. |
-| `resourceGroupName` | string | The resource group where the namespace is deployed. |
-| `resourceId` | string | The resource ID of the eventspace. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/event-hub/namespace/authorization-rule/README.md b/modules/event-hub/namespace/authorization-rule/README.md
deleted file mode 100644
index 430a336800..0000000000
--- a/modules/event-hub/namespace/authorization-rule/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Event Hub Namespace Authorization Rule `[Microsoft.EventHub/namespaces/authorizationRules]`
-
-This module deploys an Event Hub Namespace Authorization Rule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventHub/namespaces/authorizationRules` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/authorizationRules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the authorization rule. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`namespaceName`](#parameter-namespacename) | string | The name of the parent event hub namespace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`rights`](#parameter-rights) | array | The rights associated with the rule. |
-
-### Parameter: `name`
-
-The name of the authorization rule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `namespaceName`
-
-The name of the parent event hub namespace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `rights`
-
-The rights associated with the rule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the authorization rule. |
-| `resourceGroupName` | string | The name of the resource group the authorization rule was created in. |
-| `resourceId` | string | The resource ID of the authorization rule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-hub/namespace/authorization-rule/main.bicep b/modules/event-hub/namespace/authorization-rule/main.bicep
deleted file mode 100644
index 18c7df3449..0000000000
--- a/modules/event-hub/namespace/authorization-rule/main.bicep
+++ /dev/null
@@ -1,53 +0,0 @@
-metadata name = 'Event Hub Namespace Authorization Rule'
-metadata description = 'This module deploys an Event Hub Namespace Authorization Rule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.')
-param namespaceName string
-
-@description('Required. The name of the authorization rule.')
-param name string
-
-@description('Optional. The rights associated with the rule.')
-@allowed([
- 'Listen'
- 'Manage'
- 'Send'
-])
-param rights array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource namespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' existing = {
- name: namespaceName
-}
-
-resource authorizationRule 'Microsoft.EventHub/namespaces/authorizationRules@2022-10-01-preview' = {
- name: name
- parent: namespace
- properties: {
- rights: rights
- }
-}
-
-@description('The name of the authorization rule.')
-output name string = authorizationRule.name
-
-@description('The resource ID of the authorization rule.')
-output resourceId string = authorizationRule.id
-
-@description('The name of the resource group the authorization rule was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/event-hub/namespace/authorization-rule/main.json b/modules/event-hub/namespace/authorization-rule/main.json
deleted file mode 100644
index d9f8dc98a7..0000000000
--- a/modules/event-hub/namespace/authorization-rule/main.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3063860457313937367"
- },
- "name": "Event Hub Namespace Authorization Rule",
- "description": "This module deploys an Event Hub Namespace Authorization Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the authorization rule."
- }
- },
- "rights": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Listen",
- "Manage",
- "Send"
- ],
- "metadata": {
- "description": "Optional. The rights associated with the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/authorizationRules",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), parameters('name'))]",
- "properties": {
- "rights": "[parameters('rights')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the authorization rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the authorization rule."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the authorization rule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/authorization-rule/version.json b/modules/event-hub/namespace/authorization-rule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-hub/namespace/authorization-rule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/disaster-recovery-config/README.md b/modules/event-hub/namespace/disaster-recovery-config/README.md
deleted file mode 100644
index 5587dbcbd0..0000000000
--- a/modules/event-hub/namespace/disaster-recovery-config/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# Event Hub Namespace Disaster Recovery Configs `[Microsoft.EventHub/namespaces/disasterRecoveryConfigs]`
-
-This module deploys an Event Hub Namespace Disaster Recovery Config.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventHub/namespaces/disasterRecoveryConfigs` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/disasterRecoveryConfigs) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the disaster recovery config. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`namespaceName`](#parameter-namespacename) | string | The name of the parent event hub namespace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`partnerNamespaceId`](#parameter-partnernamespaceid) | string | Resource ID of the Primary/Secondary event hub namespace name, which is part of GEO DR pairing. |
-
-### Parameter: `name`
-
-The name of the disaster recovery config.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `namespaceName`
-
-The name of the parent event hub namespace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `partnerNamespaceId`
-
-Resource ID of the Primary/Secondary event hub namespace name, which is part of GEO DR pairing.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the disaster recovery config. |
-| `resourceGroupName` | string | The name of the resource group the disaster recovery config was created in. |
-| `resourceId` | string | The resource ID of the disaster recovery config. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-hub/namespace/disaster-recovery-config/main.bicep b/modules/event-hub/namespace/disaster-recovery-config/main.bicep
deleted file mode 100644
index 1cc93c8e67..0000000000
--- a/modules/event-hub/namespace/disaster-recovery-config/main.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-metadata name = 'Event Hub Namespace Disaster Recovery Configs'
-metadata description = 'This module deploys an Event Hub Namespace Disaster Recovery Config.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.')
-param namespaceName string
-
-@description('Required. The name of the disaster recovery config.')
-param name string
-
-@description('Optional. Resource ID of the Primary/Secondary event hub namespace name, which is part of GEO DR pairing.')
-param partnerNamespaceId string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource namespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' existing = {
- name: namespaceName
-}
-
-resource disasterRecoveryConfig 'Microsoft.EventHub/namespaces/disasterRecoveryConfigs@2022-10-01-preview' = {
- name: name
- parent: namespace
- properties: {
- partnerNamespace: partnerNamespaceId
- }
-}
-
-@description('The name of the disaster recovery config.')
-output name string = disasterRecoveryConfig.name
-
-@description('The resource ID of the disaster recovery config.')
-output resourceId string = disasterRecoveryConfig.id
-
-@description('The name of the resource group the disaster recovery config was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/event-hub/namespace/disaster-recovery-config/main.json b/modules/event-hub/namespace/disaster-recovery-config/main.json
deleted file mode 100644
index 65b8246881..0000000000
--- a/modules/event-hub/namespace/disaster-recovery-config/main.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "7624585689136088815"
- },
- "name": "Event Hub Namespace Disaster Recovery Configs",
- "description": "This module deploys an Event Hub Namespace Disaster Recovery Config.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the disaster recovery config."
- }
- },
- "partnerNamespaceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the Primary/Secondary event hub namespace name, which is part of GEO DR pairing."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/disasterRecoveryConfigs",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), parameters('name'))]",
- "properties": {
- "partnerNamespace": "[parameters('partnerNamespaceId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the disaster recovery config."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the disaster recovery config."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/disasterRecoveryConfigs', parameters('namespaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the disaster recovery config was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/disaster-recovery-config/version.json b/modules/event-hub/namespace/disaster-recovery-config/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-hub/namespace/disaster-recovery-config/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/eventhub/README.md b/modules/event-hub/namespace/eventhub/README.md
deleted file mode 100644
index cd1f41f928..0000000000
--- a/modules/event-hub/namespace/eventhub/README.md
+++ /dev/null
@@ -1,403 +0,0 @@
-# Event Hub Namespace Event Hubs `[Microsoft.EventHub/namespaces/eventhubs]`
-
-This module deploys an Event Hub Namespace Event Hub.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.EventHub/namespaces/eventhubs` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs) |
-| `Microsoft.EventHub/namespaces/eventhubs/authorizationRules` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs/authorizationRules) |
-| `Microsoft.EventHub/namespaces/eventhubs/consumergroups` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs/consumergroups) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the event hub. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`namespaceName`](#parameter-namespacename) | string | The name of the parent event hub namespace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`authorizationRules`](#parameter-authorizationrules) | array | Authorization Rules for the event hub. |
-| [`captureDescriptionDestinationArchiveNameFormat`](#parameter-capturedescriptiondestinationarchivenameformat) | string | Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order. |
-| [`captureDescriptionDestinationBlobContainer`](#parameter-capturedescriptiondestinationblobcontainer) | string | Blob container Name. |
-| [`captureDescriptionDestinationName`](#parameter-capturedescriptiondestinationname) | string | Name for capture destination. |
-| [`captureDescriptionDestinationStorageAccountResourceId`](#parameter-capturedescriptiondestinationstorageaccountresourceid) | string | Resource ID of the storage account to be used to create the blobs. |
-| [`captureDescriptionEnabled`](#parameter-capturedescriptionenabled) | bool | A value that indicates whether capture description is enabled. |
-| [`captureDescriptionEncoding`](#parameter-capturedescriptionencoding) | string | Enumerates the possible values for the encoding format of capture description. Note: "AvroDeflate" will be deprecated in New API Version. |
-| [`captureDescriptionIntervalInSeconds`](#parameter-capturedescriptionintervalinseconds) | int | The time window allows you to set the frequency with which the capture to Azure Blobs will happen. |
-| [`captureDescriptionSizeLimitInBytes`](#parameter-capturedescriptionsizelimitinbytes) | int | The size window defines the amount of data built up in your Event Hub before an capture operation. |
-| [`captureDescriptionSkipEmptyArchives`](#parameter-capturedescriptionskipemptyarchives) | bool | A value that indicates whether to Skip Empty Archives. |
-| [`consumergroups`](#parameter-consumergroups) | array | The consumer groups to create in this event hub instance. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`messageRetentionInDays`](#parameter-messageretentionindays) | int | Number of days to retain the events for this Event Hub, value should be 1 to 7 days. Will be automatically set to infinite retention if cleanup policy is set to "Compact". |
-| [`partitionCount`](#parameter-partitioncount) | int | Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. |
-| [`retentionDescriptionCleanupPolicy`](#parameter-retentiondescriptioncleanuppolicy) | string | Retention cleanup policy. Enumerates the possible values for cleanup policy. |
-| [`retentionDescriptionRetentionTimeInHours`](#parameter-retentiondescriptionretentiontimeinhours) | int | Retention time in hours. Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue. |
-| [`retentionDescriptionTombstoneRetentionTimeInHours`](#parameter-retentiondescriptiontombstoneretentiontimeinhours) | int | Retention cleanup policy. Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`status`](#parameter-status) | string | Enumerates the possible values for the status of the Event Hub. |
-
-### Parameter: `name`
-
-The name of the event hub.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `namespaceName`
-
-The name of the parent event hub namespace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `authorizationRules`
-
-Authorization Rules for the event hub.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- ]
- ```
-
-### Parameter: `captureDescriptionDestinationArchiveNameFormat`
-
-Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order.
-
-- Required: No
-- Type: string
-- Default: `'{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}'`
-
-### Parameter: `captureDescriptionDestinationBlobContainer`
-
-Blob container Name.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `captureDescriptionDestinationName`
-
-Name for capture destination.
-
-- Required: No
-- Type: string
-- Default: `'EventHubArchive.AzureBlockBlob'`
-
-### Parameter: `captureDescriptionDestinationStorageAccountResourceId`
-
-Resource ID of the storage account to be used to create the blobs.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `captureDescriptionEnabled`
-
-A value that indicates whether capture description is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `captureDescriptionEncoding`
-
-Enumerates the possible values for the encoding format of capture description. Note: "AvroDeflate" will be deprecated in New API Version.
-
-- Required: No
-- Type: string
-- Default: `'Avro'`
-- Allowed:
- ```Bicep
- [
- 'Avro'
- 'AvroDeflate'
- ]
- ```
-
-### Parameter: `captureDescriptionIntervalInSeconds`
-
-The time window allows you to set the frequency with which the capture to Azure Blobs will happen.
-
-- Required: No
-- Type: int
-- Default: `300`
-
-### Parameter: `captureDescriptionSizeLimitInBytes`
-
-The size window defines the amount of data built up in your Event Hub before an capture operation.
-
-- Required: No
-- Type: int
-- Default: `314572800`
-
-### Parameter: `captureDescriptionSkipEmptyArchives`
-
-A value that indicates whether to Skip Empty Archives.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `consumergroups`
-
-The consumer groups to create in this event hub instance.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- {
- name: '$Default'
- }
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `messageRetentionInDays`
-
-Number of days to retain the events for this Event Hub, value should be 1 to 7 days. Will be automatically set to infinite retention if cleanup policy is set to "Compact".
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `partitionCount`
-
-Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
-
-- Required: No
-- Type: int
-- Default: `2`
-
-### Parameter: `retentionDescriptionCleanupPolicy`
-
-Retention cleanup policy. Enumerates the possible values for cleanup policy.
-
-- Required: No
-- Type: string
-- Default: `'Delete'`
-- Allowed:
- ```Bicep
- [
- 'Compact'
- 'Delete'
- ]
- ```
-
-### Parameter: `retentionDescriptionRetentionTimeInHours`
-
-Retention time in hours. Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `retentionDescriptionTombstoneRetentionTimeInHours`
-
-Retention cleanup policy. Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub.
-
-- Required: No
-- Type: int
-- Default: `1`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `status`
-
-Enumerates the possible values for the status of the Event Hub.
-
-- Required: No
-- Type: string
-- Default: `'Active'`
-- Allowed:
- ```Bicep
- [
- 'Active'
- 'Creating'
- 'Deleting'
- 'Disabled'
- 'ReceiveDisabled'
- 'Renaming'
- 'Restoring'
- 'SendDisabled'
- 'Unknown'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `eventHubId` | string | The resource ID of the event hub. |
-| `name` | string | The name of the event hub. |
-| `resourceGroupName` | string | The resource group the event hub was deployed into. |
-| `resourceId` | string | The authentication rule resource ID of the event hub. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-hub/namespace/eventhub/authorization-rule/README.md b/modules/event-hub/namespace/eventhub/authorization-rule/README.md
deleted file mode 100644
index f0679730be..0000000000
--- a/modules/event-hub/namespace/eventhub/authorization-rule/README.md
+++ /dev/null
@@ -1,96 +0,0 @@
-# Event Hub Namespace Event Hub Authorization Rules `[Microsoft.EventHub/namespaces/eventhubs/authorizationRules]`
-
-This module deploys an Event Hub Namespace Event Hub Authorization Rule.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventHub/namespaces/eventhubs/authorizationRules` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs/authorizationRules) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the authorization rule. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubName`](#parameter-eventhubname) | string | The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment. |
-| [`namespaceName`](#parameter-namespacename) | string | The name of the parent event hub namespace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`rights`](#parameter-rights) | array | The rights associated with the rule. |
-
-### Parameter: `name`
-
-The name of the authorization rule.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `eventHubName`
-
-The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `namespaceName`
-
-The name of the parent event hub namespace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `rights`
-
-The rights associated with the rule.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the authorization rule. |
-| `resourceGroupName` | string | The name of the resource group the authorization rule was created in. |
-| `resourceId` | string | The resource ID of the authorization rule. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-hub/namespace/eventhub/authorization-rule/main.bicep b/modules/event-hub/namespace/eventhub/authorization-rule/main.bicep
deleted file mode 100644
index 81c703399c..0000000000
--- a/modules/event-hub/namespace/eventhub/authorization-rule/main.bicep
+++ /dev/null
@@ -1,60 +0,0 @@
-metadata name = 'Event Hub Namespace Event Hub Authorization Rules'
-metadata description = 'This module deploys an Event Hub Namespace Event Hub Authorization Rule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.')
-param namespaceName string
-
-@description('Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment.')
-param eventHubName string
-
-@description('Required. The name of the authorization rule.')
-param name string
-
-@description('Optional. The rights associated with the rule.')
-@allowed([
- 'Listen'
- 'Manage'
- 'Send'
-])
-param rights array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource namespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' existing = {
- name: namespaceName
-
- resource eventhub 'eventhubs@2022-10-01-preview' existing = {
- name: eventHubName
- }
-}
-
-resource authorizationRule 'Microsoft.EventHub/namespaces/eventhubs/authorizationRules@2022-10-01-preview' = {
- name: name
- parent: namespace::eventhub
- properties: {
- rights: rights
- }
-}
-
-@description('The name of the authorization rule.')
-output name string = authorizationRule.name
-
-@description('The resource ID of the authorization rule.')
-output resourceId string = authorizationRule.id
-
-@description('The name of the resource group the authorization rule was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/event-hub/namespace/eventhub/authorization-rule/main.json b/modules/event-hub/namespace/eventhub/authorization-rule/main.json
deleted file mode 100644
index 7b2d55d760..0000000000
--- a/modules/event-hub/namespace/eventhub/authorization-rule/main.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "12245634232079362340"
- },
- "name": "Event Hub Namespace Event Hub Authorization Rules",
- "description": "This module deploys an Event Hub Namespace Event Hub Authorization Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "eventHubName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the authorization rule."
- }
- },
- "rights": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Listen",
- "Manage",
- "Send"
- ],
- "metadata": {
- "description": "Optional. The rights associated with the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}/{2}', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]",
- "properties": {
- "rights": "[parameters('rights')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the authorization rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the authorization rule."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the authorization rule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/eventhub/authorization-rule/version.json b/modules/event-hub/namespace/eventhub/authorization-rule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-hub/namespace/eventhub/authorization-rule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/eventhub/consumergroup/README.md b/modules/event-hub/namespace/eventhub/consumergroup/README.md
deleted file mode 100644
index 7a0da60dee..0000000000
--- a/modules/event-hub/namespace/eventhub/consumergroup/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Event Hub Namespace Event Hub Consumer Groups `[Microsoft.EventHub/namespaces/eventhubs/consumergroups]`
-
-This module deploys an Event Hub Namespace Event Hub Consumer Group.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventHub/namespaces/eventhubs/consumergroups` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs/consumergroups) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the consumer group. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubName`](#parameter-eventhubname) | string | The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment. |
-| [`namespaceName`](#parameter-namespacename) | string | The name of the parent event hub namespace. Required if the template is used in a standalone deployment.s. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`userMetadata`](#parameter-usermetadata) | string | User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. |
-
-### Parameter: `name`
-
-The name of the consumer group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `eventHubName`
-
-The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `namespaceName`
-
-The name of the parent event hub namespace. Required if the template is used in a standalone deployment.s.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `userMetadata`
-
-User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the consumer group. |
-| `resourceGroupName` | string | The name of the resource group the consumer group was created in. |
-| `resourceId` | string | The resource ID of the consumer group. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-hub/namespace/eventhub/consumergroup/main.bicep b/modules/event-hub/namespace/eventhub/consumergroup/main.bicep
deleted file mode 100644
index debfe0b56d..0000000000
--- a/modules/event-hub/namespace/eventhub/consumergroup/main.bicep
+++ /dev/null
@@ -1,55 +0,0 @@
-metadata name = 'Event Hub Namespace Event Hub Consumer Groups'
-metadata description = 'This module deploys an Event Hub Namespace Event Hub Consumer Group.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.s.')
-param namespaceName string
-
-@description('Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment.')
-param eventHubName string
-
-@description('Required. The name of the consumer group.')
-param name string
-
-@description('Optional. User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.')
-param userMetadata string = ''
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource namespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' existing = {
- name: namespaceName
-
- resource eventhub 'eventhubs@2022-10-01-preview' existing = {
- name: eventHubName
- }
-}
-
-resource consumerGroup 'Microsoft.EventHub/namespaces/eventhubs/consumergroups@2022-10-01-preview' = {
- name: name
- parent: namespace::eventhub
- properties: {
- userMetadata: !empty(userMetadata) ? userMetadata : null
- }
-}
-
-@description('The name of the consumer group.')
-output name string = consumerGroup.name
-
-@description('The resource ID of the consumer group.')
-output resourceId string = consumerGroup.id
-
-@description('The name of the resource group the consumer group was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/event-hub/namespace/eventhub/consumergroup/main.json b/modules/event-hub/namespace/eventhub/consumergroup/main.json
deleted file mode 100644
index e64fa652a1..0000000000
--- a/modules/event-hub/namespace/eventhub/consumergroup/main.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3522913919009222120"
- },
- "name": "Event Hub Namespace Event Hub Consumer Groups",
- "description": "This module deploys an Event Hub Namespace Event Hub Consumer Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.s."
- }
- },
- "eventHubName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the consumer group."
- }
- },
- "userMetadata": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/eventhubs/consumergroups",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}/{2}', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]",
- "properties": {
- "userMetadata": "[if(not(empty(parameters('userMetadata'))), parameters('userMetadata'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the consumer group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the consumer group."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/consumergroups', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the consumer group was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/eventhub/consumergroup/version.json b/modules/event-hub/namespace/eventhub/consumergroup/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-hub/namespace/eventhub/consumergroup/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/eventhub/main.bicep b/modules/event-hub/namespace/eventhub/main.bicep
deleted file mode 100644
index 1a7b842fb7..0000000000
--- a/modules/event-hub/namespace/eventhub/main.bicep
+++ /dev/null
@@ -1,269 +0,0 @@
-metadata name = 'Event Hub Namespace Event Hubs'
-metadata description = 'This module deploys an Event Hub Namespace Event Hub.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.')
-param namespaceName string
-
-@description('Required. The name of the event hub.')
-param name string
-
-@description('Optional. Authorization Rules for the event hub.')
-param authorizationRules array = [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
-]
-
-@description('Optional. Number of days to retain the events for this Event Hub, value should be 1 to 7 days. Will be automatically set to infinite retention if cleanup policy is set to "Compact".')
-@minValue(1)
-@maxValue(7)
-param messageRetentionInDays int = 1
-
-@description('Optional. Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.')
-@minValue(1)
-@maxValue(32)
-param partitionCount int = 2
-
-@description('Optional. Enumerates the possible values for the status of the Event Hub.')
-@allowed([
- 'Active'
- 'Creating'
- 'Deleting'
- 'Disabled'
- 'ReceiveDisabled'
- 'Renaming'
- 'Restoring'
- 'SendDisabled'
- 'Unknown'
-])
-param status string = 'Active'
-
-@description('Optional. The consumer groups to create in this event hub instance.')
-param consumergroups array = [
- {
- name: '$Default'
- }
-]
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Name for capture destination.')
-param captureDescriptionDestinationName string = 'EventHubArchive.AzureBlockBlob'
-
-@description('Optional. Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order.')
-param captureDescriptionDestinationArchiveNameFormat string = '{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}'
-
-@description('Optional. Blob container Name.')
-param captureDescriptionDestinationBlobContainer string = ''
-
-@description('Optional. Resource ID of the storage account to be used to create the blobs.')
-param captureDescriptionDestinationStorageAccountResourceId string = ''
-
-@description('Optional. A value that indicates whether capture description is enabled.')
-param captureDescriptionEnabled bool = false
-
-@description('Optional. Enumerates the possible values for the encoding format of capture description. Note: "AvroDeflate" will be deprecated in New API Version.')
-@allowed([
- 'Avro'
- 'AvroDeflate'
-])
-param captureDescriptionEncoding string = 'Avro'
-
-@description('Optional. The time window allows you to set the frequency with which the capture to Azure Blobs will happen.')
-@minValue(60)
-@maxValue(900)
-param captureDescriptionIntervalInSeconds int = 300
-
-@description('Optional. The size window defines the amount of data built up in your Event Hub before an capture operation.')
-@minValue(10485760)
-@maxValue(524288000)
-param captureDescriptionSizeLimitInBytes int = 314572800
-
-@description('Optional. A value that indicates whether to Skip Empty Archives.')
-param captureDescriptionSkipEmptyArchives bool = false
-
-@allowed([
- 'Compact'
- 'Delete'
-])
-@description('Optional. Retention cleanup policy. Enumerates the possible values for cleanup policy.')
-param retentionDescriptionCleanupPolicy string = 'Delete'
-
-@minValue(1)
-@maxValue(168)
-@description('Optional. Retention time in hours. Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue.')
-param retentionDescriptionRetentionTimeInHours int = 1
-
-@minValue(1)
-@maxValue(168)
-@description('Optional. Retention cleanup policy. Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub.')
-param retentionDescriptionTombstoneRetentionTimeInHours int = 1
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var eventHubProperties = {
- messageRetentionInDays: messageRetentionInDays
- partitionCount: partitionCount
- status: status
- retentionDescription: {
- cleanupPolicy: retentionDescriptionCleanupPolicy
- retentionTimeInHours: retentionDescriptionCleanupPolicy == 'Delete' ? retentionDescriptionRetentionTimeInHours : null
- tombstoneRetentionTimeInHours: retentionDescriptionCleanupPolicy == 'Compact' ? retentionDescriptionTombstoneRetentionTimeInHours : null
- }
-}
-
-var eventHubPropertiesCapture = {
- captureDescription: {
- destination: {
- name: captureDescriptionDestinationName
- properties: {
- archiveNameFormat: captureDescriptionDestinationArchiveNameFormat
- blobContainer: captureDescriptionDestinationBlobContainer
- storageAccountResourceId: captureDescriptionDestinationStorageAccountResourceId
- }
- }
- enabled: captureDescriptionEnabled
- encoding: captureDescriptionEncoding
- intervalInSeconds: captureDescriptionIntervalInSeconds
- sizeLimitInBytes: captureDescriptionSizeLimitInBytes
- skipEmptyArchives: captureDescriptionSkipEmptyArchives
- }
-}
-
-var builtInRoleNames = {
- 'Azure Event Hubs Data Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')
- 'Azure Event Hubs Data Receiver': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a638d3c7-ab3a-418d-83e6-5f17a39d4fde')
- 'Azure Event Hubs Data Sender': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource namespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' existing = {
- name: namespaceName
-}
-
-resource eventHub 'Microsoft.EventHub/namespaces/eventhubs@2022-10-01-preview' = {
- name: name
- parent: namespace
- properties: captureDescriptionEnabled ? union(eventHubProperties, eventHubPropertiesCapture) : eventHubProperties
-}
-
-resource eventHub_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: eventHub
-}
-
-module eventHub_consumergroups 'consumergroup/main.bicep' = [for (consumerGroup, index) in consumergroups: {
- name: '${deployment().name}-ConsumerGroup-${index}'
- params: {
- namespaceName: namespaceName
- eventHubName: eventHub.name
- name: consumerGroup.name
- userMetadata: contains(consumerGroup, 'userMetadata') ? consumerGroup.userMetadata : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module eventHub_authorizationRules 'authorization-rule/main.bicep' = [for (authorizationRule, index) in authorizationRules: {
- name: '${deployment().name}-AuthRule-${index}'
- params: {
- namespaceName: namespaceName
- eventHubName: eventHub.name
- name: authorizationRule.name
- rights: contains(authorizationRule, 'rights') ? authorizationRule.rights : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource eventHub_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(eventHub.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: eventHub
-}]
-
-@description('The name of the event hub.')
-output name string = eventHub.name
-
-@description('The resource ID of the event hub.')
-output eventHubId string = eventHub.id
-
-@description('The resource group the event hub was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The authentication rule resource ID of the event hub.')
-output resourceId string = az.resourceId('Microsoft.EventHub/namespaces/authorizationRules', namespaceName, 'RootManageSharedAccessKey')
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/event-hub/namespace/eventhub/main.json b/modules/event-hub/namespace/eventhub/main.json
deleted file mode 100644
index fd2925ece3..0000000000
--- a/modules/event-hub/namespace/eventhub/main.json
+++ /dev/null
@@ -1,702 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8940174354642715236"
- },
- "name": "Event Hub Namespace Event Hubs",
- "description": "This module deploys an Event Hub Namespace Event Hub.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the event hub."
- }
- },
- "authorizationRules": {
- "type": "array",
- "defaultValue": [
- {
- "name": "RootManageSharedAccessKey",
- "rights": [
- "Listen",
- "Manage",
- "Send"
- ]
- }
- ],
- "metadata": {
- "description": "Optional. Authorization Rules for the event hub."
- }
- },
- "messageRetentionInDays": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 7,
- "metadata": {
- "description": "Optional. Number of days to retain the events for this Event Hub, value should be 1 to 7 days. Will be automatically set to infinite retention if cleanup policy is set to \"Compact\"."
- }
- },
- "partitionCount": {
- "type": "int",
- "defaultValue": 2,
- "minValue": 1,
- "maxValue": 32,
- "metadata": {
- "description": "Optional. Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Active",
- "allowedValues": [
- "Active",
- "Creating",
- "Deleting",
- "Disabled",
- "ReceiveDisabled",
- "Renaming",
- "Restoring",
- "SendDisabled",
- "Unknown"
- ],
- "metadata": {
- "description": "Optional. Enumerates the possible values for the status of the Event Hub."
- }
- },
- "consumergroups": {
- "type": "array",
- "defaultValue": [
- {
- "name": "$Default"
- }
- ],
- "metadata": {
- "description": "Optional. The consumer groups to create in this event hub instance."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "captureDescriptionDestinationName": {
- "type": "string",
- "defaultValue": "EventHubArchive.AzureBlockBlob",
- "metadata": {
- "description": "Optional. Name for capture destination."
- }
- },
- "captureDescriptionDestinationArchiveNameFormat": {
- "type": "string",
- "defaultValue": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}",
- "metadata": {
- "description": "Optional. Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order."
- }
- },
- "captureDescriptionDestinationBlobContainer": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Blob container Name."
- }
- },
- "captureDescriptionDestinationStorageAccountResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the storage account to be used to create the blobs."
- }
- },
- "captureDescriptionEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. A value that indicates whether capture description is enabled."
- }
- },
- "captureDescriptionEncoding": {
- "type": "string",
- "defaultValue": "Avro",
- "allowedValues": [
- "Avro",
- "AvroDeflate"
- ],
- "metadata": {
- "description": "Optional. Enumerates the possible values for the encoding format of capture description. Note: \"AvroDeflate\" will be deprecated in New API Version."
- }
- },
- "captureDescriptionIntervalInSeconds": {
- "type": "int",
- "defaultValue": 300,
- "minValue": 60,
- "maxValue": 900,
- "metadata": {
- "description": "Optional. The time window allows you to set the frequency with which the capture to Azure Blobs will happen."
- }
- },
- "captureDescriptionSizeLimitInBytes": {
- "type": "int",
- "defaultValue": 314572800,
- "minValue": 10485760,
- "maxValue": 524288000,
- "metadata": {
- "description": "Optional. The size window defines the amount of data built up in your Event Hub before an capture operation."
- }
- },
- "captureDescriptionSkipEmptyArchives": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. A value that indicates whether to Skip Empty Archives."
- }
- },
- "retentionDescriptionCleanupPolicy": {
- "type": "string",
- "defaultValue": "Delete",
- "allowedValues": [
- "Compact",
- "Delete"
- ],
- "metadata": {
- "description": "Optional. Retention cleanup policy. Enumerates the possible values for cleanup policy."
- }
- },
- "retentionDescriptionRetentionTimeInHours": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 168,
- "metadata": {
- "description": "Optional. Retention time in hours. Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue."
- }
- },
- "retentionDescriptionTombstoneRetentionTimeInHours": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 168,
- "metadata": {
- "description": "Optional. Retention cleanup policy. Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "eventHubProperties": {
- "messageRetentionInDays": "[parameters('messageRetentionInDays')]",
- "partitionCount": "[parameters('partitionCount')]",
- "status": "[parameters('status')]",
- "retentionDescription": {
- "cleanupPolicy": "[parameters('retentionDescriptionCleanupPolicy')]",
- "retentionTimeInHours": "[if(equals(parameters('retentionDescriptionCleanupPolicy'), 'Delete'), parameters('retentionDescriptionRetentionTimeInHours'), null())]",
- "tombstoneRetentionTimeInHours": "[if(equals(parameters('retentionDescriptionCleanupPolicy'), 'Compact'), parameters('retentionDescriptionTombstoneRetentionTimeInHours'), null())]"
- }
- },
- "eventHubPropertiesCapture": {
- "captureDescription": {
- "destination": {
- "name": "[parameters('captureDescriptionDestinationName')]",
- "properties": {
- "archiveNameFormat": "[parameters('captureDescriptionDestinationArchiveNameFormat')]",
- "blobContainer": "[parameters('captureDescriptionDestinationBlobContainer')]",
- "storageAccountResourceId": "[parameters('captureDescriptionDestinationStorageAccountResourceId')]"
- }
- },
- "enabled": "[parameters('captureDescriptionEnabled')]",
- "encoding": "[parameters('captureDescriptionEncoding')]",
- "intervalInSeconds": "[parameters('captureDescriptionIntervalInSeconds')]",
- "sizeLimitInBytes": "[parameters('captureDescriptionSizeLimitInBytes')]",
- "skipEmptyArchives": "[parameters('captureDescriptionSkipEmptyArchives')]"
- }
- },
- "builtInRoleNames": {
- "Azure Event Hubs Data Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')]",
- "Azure Event Hubs Data Receiver": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a638d3c7-ab3a-418d-83e6-5f17a39d4fde')]",
- "Azure Event Hubs Data Sender": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "namespace": {
- "existing": true,
- "type": "Microsoft.EventHub/namespaces",
- "apiVersion": "2022-10-01-preview",
- "name": "[parameters('namespaceName')]"
- },
- "eventHub": {
- "type": "Microsoft.EventHub/namespaces/eventhubs",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), parameters('name'))]",
- "properties": "[if(parameters('captureDescriptionEnabled'), union(variables('eventHubProperties'), variables('eventHubPropertiesCapture')), variables('eventHubProperties'))]",
- "dependsOn": [
- "namespace"
- ]
- },
- "eventHub_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}/eventhubs/{1}', parameters('namespaceName'), parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "eventHub"
- ]
- },
- "eventHub_roleAssignments": {
- "copy": {
- "name": "eventHub_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}/eventhubs/{1}', parameters('namespaceName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaceName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "eventHub"
- ]
- },
- "eventHub_consumergroups": {
- "copy": {
- "name": "eventHub_consumergroups",
- "count": "[length(parameters('consumergroups'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ConsumerGroup-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('namespaceName')]"
- },
- "eventHubName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('consumergroups')[copyIndex()].name]"
- },
- "userMetadata": "[if(contains(parameters('consumergroups')[copyIndex()], 'userMetadata'), createObject('value', parameters('consumergroups')[copyIndex()].userMetadata), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7142673381100704232"
- },
- "name": "Event Hub Namespace Event Hub Consumer Groups",
- "description": "This module deploys an Event Hub Namespace Event Hub Consumer Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.s."
- }
- },
- "eventHubName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the consumer group."
- }
- },
- "userMetadata": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/eventhubs/consumergroups",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}/{2}', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]",
- "properties": {
- "userMetadata": "[if(not(empty(parameters('userMetadata'))), parameters('userMetadata'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the consumer group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the consumer group."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/consumergroups', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the consumer group was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHub"
- ]
- },
- "eventHub_authorizationRules": {
- "copy": {
- "name": "eventHub_authorizationRules",
- "count": "[length(parameters('authorizationRules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AuthRule-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('namespaceName')]"
- },
- "eventHubName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('authorizationRules')[copyIndex()].name]"
- },
- "rights": "[if(contains(parameters('authorizationRules')[copyIndex()], 'rights'), createObject('value', parameters('authorizationRules')[copyIndex()].rights), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4935957739850887741"
- },
- "name": "Event Hub Namespace Event Hub Authorization Rules",
- "description": "This module deploys an Event Hub Namespace Event Hub Authorization Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "eventHubName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the authorization rule."
- }
- },
- "rights": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Listen",
- "Manage",
- "Send"
- ],
- "metadata": {
- "description": "Optional. The rights associated with the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}/{2}', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]",
- "properties": {
- "rights": "[parameters('rights')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the authorization rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the authorization rule."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the authorization rule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHub"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event hub."
- },
- "value": "[parameters('name')]"
- },
- "eventHubId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event hub."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the event hub was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The authentication rule resource ID of the event hub."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), 'RootManageSharedAccessKey')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/eventhub/version.json b/modules/event-hub/namespace/eventhub/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/event-hub/namespace/eventhub/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/main.bicep b/modules/event-hub/namespace/main.bicep
deleted file mode 100644
index 15c2d861ac..0000000000
--- a/modules/event-hub/namespace/main.bicep
+++ /dev/null
@@ -1,509 +0,0 @@
-metadata name = 'Event Hub Namespaces'
-metadata description = 'This module deploys an Event Hub Namespace.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the event hub namespace.')
-@maxLength(50)
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. event hub plan SKU name.')
-@allowed([
- 'Basic'
- 'Standard'
- 'Premium'
-])
-param skuName string = 'Standard'
-
-@description('Optional. The Event Hub\'s throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units.')
-@minValue(1)
-@maxValue(20)
-param skuCapacity int = 1
-
-@description('Optional. Switch to make the Event Hub Namespace zone redundant.')
-param zoneRedundant bool = false
-
-@description('Optional. Switch to enable the Auto Inflate feature of Event Hub. Auto Inflate is not supported in Premium SKU EventHub.')
-param isAutoInflateEnabled bool = false
-
-@description('Optional. Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.')
-@minValue(0)
-@maxValue(20)
-param maximumThroughputUnits int = 1
-
-@description('Optional. Authorization Rules for the Event Hub namespace.')
-param authorizationRules array = [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
-]
-
-@description('Optional. This property disables SAS authentication for the Event Hubs namespace.')
-param disableLocalAuth bool = true
-
-@description('Optional. Value that indicates whether Kafka is enabled for Event Hubs Namespace.')
-param kafkaEnabled bool = false
-
-@allowed([
- '1.0'
- '1.1'
- '1.2'
-])
-@description('Optional. The minimum TLS version for the cluster to support.')
-param minimumTlsVersion string = '1.2'
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Disabled'
- 'Enabled'
- 'SecuredByPerimeter'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. Configure networking options. This object contains IPs/Subnets to allow or restrict access to private endpoints only. For security reasons, it is recommended to configure this object on the Namespace.')
-param networkRuleSets object = {}
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@description('Optional. Enable infrastructure encryption (double encryption). Note, this setting requires the configuration of Customer-Managed-Keys (CMK) via the corresponding module parameters.')
-param requireInfrastructureEncryption bool = false
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The event hubs to deploy into this namespace.')
-param eventhubs array = []
-
-@description('Optional. The disaster recovery config for this namespace.')
-param disasterRecoveryConfig object = {}
-
-var maximumThroughputUnitsVar = !isAutoInflateEnabled ? 0 : maximumThroughputUnits
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- 'Azure Event Hubs Data Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')
- 'Azure Event Hubs Data Receiver': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a638d3c7-ab3a-418d-83e6-5f17a39d4fde')
- 'Azure Event Hubs Data Sender': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource eventHubNamespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' = {
- name: name
- location: location
- tags: tags
- identity: identity
- sku: {
- name: skuName
- tier: skuName
- capacity: skuCapacity
- }
- properties: {
- disableLocalAuth: disableLocalAuth
- encryption: !empty(customerManagedKey) ? {
- keySource: 'Microsoft.KeyVault'
- keyVaultProperties: [
- {
- identity: !empty(customerManagedKey.?userAssignedIdentityResourceId) ? {
- userAssignedIdentity: cMKUserAssignedIdentity.id
- } : null
- keyName: customerManagedKey!.keyName
- keyVaultUri: cMKKeyVault.properties.vaultUri
- keyVersion: !empty(customerManagedKey.?keyVersion ?? '') ? customerManagedKey!.keyVersion : last(split(cMKKeyVault::cMKKey.properties.keyUriWithVersion, '/'))
- }
- ]
- requireInfrastructureEncryption: requireInfrastructureEncryption
- } : null
- isAutoInflateEnabled: isAutoInflateEnabled
- kafkaEnabled: kafkaEnabled
- maximumThroughputUnits: maximumThroughputUnitsVar
- minimumTlsVersion: minimumTlsVersion
- publicNetworkAccess: contains(networkRuleSets, 'publicNetworkAccess') ? networkRuleSets.publicNetworkAccess : (!empty(privateEndpoints) && empty(networkRuleSets) ? 'Disabled' : publicNetworkAccess)
- zoneRedundant: zoneRedundant
- }
-}
-
-module eventHubNamespace_authorizationRules 'authorization-rule/main.bicep' = [for (authorizationRule, index) in authorizationRules: {
- name: '${uniqueString(deployment().name, location)}-EvhbNamespace-AuthRule-${index}'
- params: {
- namespaceName: eventHubNamespace.name
- name: authorizationRule.name
- rights: contains(authorizationRule, 'rights') ? authorizationRule.rights : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module eventHubNamespace_disasterRecoveryConfig 'disaster-recovery-config/main.bicep' = if (!empty(disasterRecoveryConfig)) {
- name: '${uniqueString(deployment().name, location)}-EvhbNamespace-DisRecConfig'
- params: {
- namespaceName: eventHubNamespace.name
- name: disasterRecoveryConfig.name
- partnerNamespaceId: contains(disasterRecoveryConfig, 'partnerNamespaceId') ? disasterRecoveryConfig.partnerNamespaceId : ''
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module eventHubNamespace_eventhubs 'eventhub/main.bicep' = [for (eventHub, index) in eventhubs: {
- name: '${uniqueString(deployment().name, location)}-EvhbNamespace-EventHub-${index}'
- params: {
- namespaceName: eventHubNamespace.name
- name: eventHub.name
- authorizationRules: contains(eventHub, 'authorizationRules') ? eventHub.authorizationRules : [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- ]
- captureDescriptionDestinationArchiveNameFormat: contains(eventHub, 'captureDescriptionDestinationArchiveNameFormat') ? eventHub.captureDescriptionDestinationArchiveNameFormat : '{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}'
- captureDescriptionDestinationBlobContainer: contains(eventHub, 'captureDescriptionDestinationBlobContainer') ? eventHub.captureDescriptionDestinationBlobContainer : ''
- captureDescriptionDestinationName: contains(eventHub, 'captureDescriptionDestinationName') ? eventHub.captureDescriptionDestinationName : 'EventHubArchive.AzureBlockBlob'
- captureDescriptionDestinationStorageAccountResourceId: contains(eventHub, 'captureDescriptionDestinationStorageAccountResourceId') ? eventHub.captureDescriptionDestinationStorageAccountResourceId : ''
- captureDescriptionEnabled: contains(eventHub, 'captureDescriptionEnabled') ? eventHub.captureDescriptionEnabled : false
- captureDescriptionEncoding: contains(eventHub, 'captureDescriptionEncoding') ? eventHub.captureDescriptionEncoding : 'Avro'
- captureDescriptionIntervalInSeconds: contains(eventHub, 'captureDescriptionIntervalInSeconds') ? eventHub.captureDescriptionIntervalInSeconds : 300
- captureDescriptionSizeLimitInBytes: contains(eventHub, 'captureDescriptionSizeLimitInBytes') ? eventHub.captureDescriptionSizeLimitInBytes : 314572800
- captureDescriptionSkipEmptyArchives: contains(eventHub, 'captureDescriptionSkipEmptyArchives') ? eventHub.captureDescriptionSkipEmptyArchives : false
- consumergroups: contains(eventHub, 'consumergroups') ? eventHub.consumergroups : []
- lock: eventHub.?lock ?? lock
- messageRetentionInDays: contains(eventHub, 'messageRetentionInDays') ? eventHub.messageRetentionInDays : 1
- partitionCount: contains(eventHub, 'partitionCount') ? eventHub.partitionCount : 2
- roleAssignments: contains(eventHub, 'roleAssignments') ? eventHub.roleAssignments : []
- status: contains(eventHub, 'status') ? eventHub.status : 'Active'
- retentionDescriptionCleanupPolicy: contains(eventHub, 'retentionDescriptionCleanupPolicy') ? eventHub.retentionDescriptionCleanupPolicy : 'Delete'
- retentionDescriptionRetentionTimeInHours: contains(eventHub, 'retentionDescriptionRetentionTimeInHours') ? eventHub.retentionDescriptionRetentionTimeInHours : 1
- retentionDescriptionTombstoneRetentionTimeInHours: contains(eventHub, 'retentionDescriptionTombstoneRetentionTimeInHours') ? eventHub.retentionDescriptionTombstoneRetentionTimeInHours : 1
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module eventHubNamespace_networkRuleSet 'network-rule-set/main.bicep' = if (!empty(networkRuleSets) || !empty(privateEndpoints)) {
- name: '${uniqueString(deployment().name, location)}-EvhbNamespace-NetworkRuleSet'
- params: {
- namespaceName: eventHubNamespace.name
- publicNetworkAccess: contains(networkRuleSets, 'publicNetworkAccess') ? networkRuleSets.publicNetworkAccess : (!empty(privateEndpoints) && empty(networkRuleSets) ? 'Disabled' : 'Enabled')
- defaultAction: contains(networkRuleSets, 'defaultAction') ? networkRuleSets.defaultAction : 'Allow'
- trustedServiceAccessEnabled: contains(networkRuleSets, 'trustedServiceAccessEnabled') ? networkRuleSets.trustedServiceAccessEnabled : true
- ipRules: contains(networkRuleSets, 'ipRules') ? networkRuleSets.ipRules : []
- virtualNetworkRules: contains(networkRuleSets, 'virtualNetworkRules') ? networkRuleSets.virtualNetworkRules : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module eventHubNamespace_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-eventHubNamespace-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'namespace'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(eventHubNamespace.id, '/'))}-${privateEndpoint.?service ?? 'namespace'}-${index}'
- serviceResourceId: eventHubNamespace.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource eventHubNamespace_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(eventHubNamespace.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: eventHubNamespace
-}]
-
-resource eventHubNamespace_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: eventHubNamespace
-}
-
-resource eventHubNamespace_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: eventHubNamespace
-}]
-
-@description('The name of the eventspace.')
-output name string = eventHubNamespace.name
-
-@description('The resource ID of the eventspace.')
-output resourceId string = eventHubNamespace.id
-
-@description('The resource group where the namespace is deployed.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(eventHubNamespace.identity, 'principalId') ? eventHubNamespace.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = eventHubNamespace.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/event-hub/namespace/main.json b/modules/event-hub/namespace/main.json
deleted file mode 100644
index 3850b06fb2..0000000000
--- a/modules/event-hub/namespace/main.json
+++ /dev/null
@@ -1,2593 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16593644436338874715"
- },
- "name": "Event Hub Namespaces",
- "description": "This module deploys an Event Hub Namespace.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 50,
- "metadata": {
- "description": "Required. The name of the event hub namespace."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "skuName": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Basic",
- "Standard",
- "Premium"
- ],
- "metadata": {
- "description": "Optional. event hub plan SKU name."
- }
- },
- "skuCapacity": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 20,
- "metadata": {
- "description": "Optional. The Event Hub's throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value should be 0 to 10 premium units."
- }
- },
- "zoneRedundant": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Switch to make the Event Hub Namespace zone redundant."
- }
- },
- "isAutoInflateEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Switch to enable the Auto Inflate feature of Event Hub. Auto Inflate is not supported in Premium SKU EventHub."
- }
- },
- "maximumThroughputUnits": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 0,
- "maxValue": 20,
- "metadata": {
- "description": "Optional. Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units."
- }
- },
- "authorizationRules": {
- "type": "array",
- "defaultValue": [
- {
- "name": "RootManageSharedAccessKey",
- "rights": [
- "Listen",
- "Manage",
- "Send"
- ]
- }
- ],
- "metadata": {
- "description": "Optional. Authorization Rules for the Event Hub namespace."
- }
- },
- "disableLocalAuth": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. This property disables SAS authentication for the Event Hubs namespace."
- }
- },
- "kafkaEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Value that indicates whether Kafka is enabled for Event Hubs Namespace."
- }
- },
- "minimumTlsVersion": {
- "type": "string",
- "defaultValue": "1.2",
- "allowedValues": [
- "1.0",
- "1.1",
- "1.2"
- ],
- "metadata": {
- "description": "Optional. The minimum TLS version for the cluster to support."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Disabled",
- "Enabled",
- "SecuredByPerimeter"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "networkRuleSets": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configure networking options. This object contains IPs/Subnets to allow or restrict access to private endpoints only. For security reasons, it is recommended to configure this object on the Namespace."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "requireInfrastructureEncryption": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Enable infrastructure encryption (double encryption). Note, this setting requires the configuration of Customer-Managed-Keys (CMK) via the corresponding module parameters."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "eventhubs": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The event hubs to deploy into this namespace."
- }
- },
- "disasterRecoveryConfig": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The disaster recovery config for this namespace."
- }
- }
- },
- "variables": {
- "maximumThroughputUnitsVar": "[if(not(parameters('isAutoInflateEnabled')), 0, parameters('maximumThroughputUnits'))]",
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Azure Event Hubs Data Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')]",
- "Azure Event Hubs Data Receiver": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a638d3c7-ab3a-418d-83e6-5f17a39d4fde')]",
- "Azure Event Hubs Data Sender": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "eventHubNamespace": {
- "type": "Microsoft.EventHub/namespaces",
- "apiVersion": "2022-10-01-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "sku": {
- "name": "[parameters('skuName')]",
- "tier": "[parameters('skuName')]",
- "capacity": "[parameters('skuCapacity')]"
- },
- "properties": {
- "disableLocalAuth": "[parameters('disableLocalAuth')]",
- "encryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('keySource', 'Microsoft.KeyVault', 'keyVaultProperties', createArray(createObject('identity', if(not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'))), createObject('userAssignedIdentity', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/')))), null()), 'keyName', parameters('customerManagedKey').keyName, 'keyVaultUri', reference('cMKKeyVault').vaultUri, 'keyVersion', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), parameters('customerManagedKey').keyVersion, last(split(reference('cMKKeyVault::cMKKey').keyUriWithVersion, '/'))))), 'requireInfrastructureEncryption', parameters('requireInfrastructureEncryption')), null())]",
- "isAutoInflateEnabled": "[parameters('isAutoInflateEnabled')]",
- "kafkaEnabled": "[parameters('kafkaEnabled')]",
- "maximumThroughputUnits": "[variables('maximumThroughputUnitsVar')]",
- "minimumTlsVersion": "[parameters('minimumTlsVersion')]",
- "publicNetworkAccess": "[if(contains(parameters('networkRuleSets'), 'publicNetworkAccess'), parameters('networkRuleSets').publicNetworkAccess, if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('networkRuleSets'))), 'Disabled', parameters('publicNetworkAccess')))]",
- "zoneRedundant": "[parameters('zoneRedundant')]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "eventHubNamespace_roleAssignments": {
- "copy": {
- "name": "eventHubNamespace_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.EventHub/namespaces', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_diagnosticSettings": {
- "copy": {
- "name": "eventHubNamespace_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_authorizationRules": {
- "copy": {
- "name": "eventHubNamespace_authorizationRules",
- "count": "[length(parameters('authorizationRules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-EvhbNamespace-AuthRule-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('authorizationRules')[copyIndex()].name]"
- },
- "rights": "[if(contains(parameters('authorizationRules')[copyIndex()], 'rights'), createObject('value', parameters('authorizationRules')[copyIndex()].rights), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7668723234672576868"
- },
- "name": "Event Hub Namespace Authorization Rule",
- "description": "This module deploys an Event Hub Namespace Authorization Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the authorization rule."
- }
- },
- "rights": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Listen",
- "Manage",
- "Send"
- ],
- "metadata": {
- "description": "Optional. The rights associated with the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/authorizationRules",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), parameters('name'))]",
- "properties": {
- "rights": "[parameters('rights')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the authorization rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the authorization rule."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the authorization rule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_disasterRecoveryConfig": {
- "condition": "[not(empty(parameters('disasterRecoveryConfig')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-EvhbNamespace-DisRecConfig', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('disasterRecoveryConfig').name]"
- },
- "partnerNamespaceId": "[if(contains(parameters('disasterRecoveryConfig'), 'partnerNamespaceId'), createObject('value', parameters('disasterRecoveryConfig').partnerNamespaceId), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7231520764645220131"
- },
- "name": "Event Hub Namespace Disaster Recovery Configs",
- "description": "This module deploys an Event Hub Namespace Disaster Recovery Config.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the disaster recovery config."
- }
- },
- "partnerNamespaceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the Primary/Secondary event hub namespace name, which is part of GEO DR pairing."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/disasterRecoveryConfigs",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), parameters('name'))]",
- "properties": {
- "partnerNamespace": "[parameters('partnerNamespaceId')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the disaster recovery config."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the disaster recovery config."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/disasterRecoveryConfigs', parameters('namespaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the disaster recovery config was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_eventhubs": {
- "copy": {
- "name": "eventHubNamespace_eventhubs",
- "count": "[length(parameters('eventhubs'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-EvhbNamespace-EventHub-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('eventhubs')[copyIndex()].name]"
- },
- "authorizationRules": "[if(contains(parameters('eventhubs')[copyIndex()], 'authorizationRules'), createObject('value', parameters('eventhubs')[copyIndex()].authorizationRules), createObject('value', createArray(createObject('name', 'RootManageSharedAccessKey', 'rights', createArray('Listen', 'Manage', 'Send')))))]",
- "captureDescriptionDestinationArchiveNameFormat": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionDestinationArchiveNameFormat'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionDestinationArchiveNameFormat), createObject('value', '{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}'))]",
- "captureDescriptionDestinationBlobContainer": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionDestinationBlobContainer'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionDestinationBlobContainer), createObject('value', ''))]",
- "captureDescriptionDestinationName": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionDestinationName'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionDestinationName), createObject('value', 'EventHubArchive.AzureBlockBlob'))]",
- "captureDescriptionDestinationStorageAccountResourceId": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionDestinationStorageAccountResourceId'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionDestinationStorageAccountResourceId), createObject('value', ''))]",
- "captureDescriptionEnabled": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionEnabled'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionEnabled), createObject('value', false()))]",
- "captureDescriptionEncoding": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionEncoding'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionEncoding), createObject('value', 'Avro'))]",
- "captureDescriptionIntervalInSeconds": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionIntervalInSeconds'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionIntervalInSeconds), createObject('value', 300))]",
- "captureDescriptionSizeLimitInBytes": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionSizeLimitInBytes'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionSizeLimitInBytes), createObject('value', 314572800))]",
- "captureDescriptionSkipEmptyArchives": "[if(contains(parameters('eventhubs')[copyIndex()], 'captureDescriptionSkipEmptyArchives'), createObject('value', parameters('eventhubs')[copyIndex()].captureDescriptionSkipEmptyArchives), createObject('value', false()))]",
- "consumergroups": "[if(contains(parameters('eventhubs')[copyIndex()], 'consumergroups'), createObject('value', parameters('eventhubs')[copyIndex()].consumergroups), createObject('value', createArray()))]",
- "lock": {
- "value": "[coalesce(tryGet(parameters('eventhubs')[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "messageRetentionInDays": "[if(contains(parameters('eventhubs')[copyIndex()], 'messageRetentionInDays'), createObject('value', parameters('eventhubs')[copyIndex()].messageRetentionInDays), createObject('value', 1))]",
- "partitionCount": "[if(contains(parameters('eventhubs')[copyIndex()], 'partitionCount'), createObject('value', parameters('eventhubs')[copyIndex()].partitionCount), createObject('value', 2))]",
- "roleAssignments": "[if(contains(parameters('eventhubs')[copyIndex()], 'roleAssignments'), createObject('value', parameters('eventhubs')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "status": "[if(contains(parameters('eventhubs')[copyIndex()], 'status'), createObject('value', parameters('eventhubs')[copyIndex()].status), createObject('value', 'Active'))]",
- "retentionDescriptionCleanupPolicy": "[if(contains(parameters('eventhubs')[copyIndex()], 'retentionDescriptionCleanupPolicy'), createObject('value', parameters('eventhubs')[copyIndex()].retentionDescriptionCleanupPolicy), createObject('value', 'Delete'))]",
- "retentionDescriptionRetentionTimeInHours": "[if(contains(parameters('eventhubs')[copyIndex()], 'retentionDescriptionRetentionTimeInHours'), createObject('value', parameters('eventhubs')[copyIndex()].retentionDescriptionRetentionTimeInHours), createObject('value', 1))]",
- "retentionDescriptionTombstoneRetentionTimeInHours": "[if(contains(parameters('eventhubs')[copyIndex()], 'retentionDescriptionTombstoneRetentionTimeInHours'), createObject('value', parameters('eventhubs')[copyIndex()].retentionDescriptionTombstoneRetentionTimeInHours), createObject('value', 1))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8940174354642715236"
- },
- "name": "Event Hub Namespace Event Hubs",
- "description": "This module deploys an Event Hub Namespace Event Hub.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the event hub."
- }
- },
- "authorizationRules": {
- "type": "array",
- "defaultValue": [
- {
- "name": "RootManageSharedAccessKey",
- "rights": [
- "Listen",
- "Manage",
- "Send"
- ]
- }
- ],
- "metadata": {
- "description": "Optional. Authorization Rules for the event hub."
- }
- },
- "messageRetentionInDays": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 7,
- "metadata": {
- "description": "Optional. Number of days to retain the events for this Event Hub, value should be 1 to 7 days. Will be automatically set to infinite retention if cleanup policy is set to \"Compact\"."
- }
- },
- "partitionCount": {
- "type": "int",
- "defaultValue": 2,
- "minValue": 1,
- "maxValue": 32,
- "metadata": {
- "description": "Optional. Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions."
- }
- },
- "status": {
- "type": "string",
- "defaultValue": "Active",
- "allowedValues": [
- "Active",
- "Creating",
- "Deleting",
- "Disabled",
- "ReceiveDisabled",
- "Renaming",
- "Restoring",
- "SendDisabled",
- "Unknown"
- ],
- "metadata": {
- "description": "Optional. Enumerates the possible values for the status of the Event Hub."
- }
- },
- "consumergroups": {
- "type": "array",
- "defaultValue": [
- {
- "name": "$Default"
- }
- ],
- "metadata": {
- "description": "Optional. The consumer groups to create in this event hub instance."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "captureDescriptionDestinationName": {
- "type": "string",
- "defaultValue": "EventHubArchive.AzureBlockBlob",
- "metadata": {
- "description": "Optional. Name for capture destination."
- }
- },
- "captureDescriptionDestinationArchiveNameFormat": {
- "type": "string",
- "defaultValue": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}",
- "metadata": {
- "description": "Optional. Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order."
- }
- },
- "captureDescriptionDestinationBlobContainer": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Blob container Name."
- }
- },
- "captureDescriptionDestinationStorageAccountResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Resource ID of the storage account to be used to create the blobs."
- }
- },
- "captureDescriptionEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. A value that indicates whether capture description is enabled."
- }
- },
- "captureDescriptionEncoding": {
- "type": "string",
- "defaultValue": "Avro",
- "allowedValues": [
- "Avro",
- "AvroDeflate"
- ],
- "metadata": {
- "description": "Optional. Enumerates the possible values for the encoding format of capture description. Note: \"AvroDeflate\" will be deprecated in New API Version."
- }
- },
- "captureDescriptionIntervalInSeconds": {
- "type": "int",
- "defaultValue": 300,
- "minValue": 60,
- "maxValue": 900,
- "metadata": {
- "description": "Optional. The time window allows you to set the frequency with which the capture to Azure Blobs will happen."
- }
- },
- "captureDescriptionSizeLimitInBytes": {
- "type": "int",
- "defaultValue": 314572800,
- "minValue": 10485760,
- "maxValue": 524288000,
- "metadata": {
- "description": "Optional. The size window defines the amount of data built up in your Event Hub before an capture operation."
- }
- },
- "captureDescriptionSkipEmptyArchives": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. A value that indicates whether to Skip Empty Archives."
- }
- },
- "retentionDescriptionCleanupPolicy": {
- "type": "string",
- "defaultValue": "Delete",
- "allowedValues": [
- "Compact",
- "Delete"
- ],
- "metadata": {
- "description": "Optional. Retention cleanup policy. Enumerates the possible values for cleanup policy."
- }
- },
- "retentionDescriptionRetentionTimeInHours": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 168,
- "metadata": {
- "description": "Optional. Retention time in hours. Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue."
- }
- },
- "retentionDescriptionTombstoneRetentionTimeInHours": {
- "type": "int",
- "defaultValue": 1,
- "minValue": 1,
- "maxValue": 168,
- "metadata": {
- "description": "Optional. Retention cleanup policy. Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "eventHubProperties": {
- "messageRetentionInDays": "[parameters('messageRetentionInDays')]",
- "partitionCount": "[parameters('partitionCount')]",
- "status": "[parameters('status')]",
- "retentionDescription": {
- "cleanupPolicy": "[parameters('retentionDescriptionCleanupPolicy')]",
- "retentionTimeInHours": "[if(equals(parameters('retentionDescriptionCleanupPolicy'), 'Delete'), parameters('retentionDescriptionRetentionTimeInHours'), null())]",
- "tombstoneRetentionTimeInHours": "[if(equals(parameters('retentionDescriptionCleanupPolicy'), 'Compact'), parameters('retentionDescriptionTombstoneRetentionTimeInHours'), null())]"
- }
- },
- "eventHubPropertiesCapture": {
- "captureDescription": {
- "destination": {
- "name": "[parameters('captureDescriptionDestinationName')]",
- "properties": {
- "archiveNameFormat": "[parameters('captureDescriptionDestinationArchiveNameFormat')]",
- "blobContainer": "[parameters('captureDescriptionDestinationBlobContainer')]",
- "storageAccountResourceId": "[parameters('captureDescriptionDestinationStorageAccountResourceId')]"
- }
- },
- "enabled": "[parameters('captureDescriptionEnabled')]",
- "encoding": "[parameters('captureDescriptionEncoding')]",
- "intervalInSeconds": "[parameters('captureDescriptionIntervalInSeconds')]",
- "sizeLimitInBytes": "[parameters('captureDescriptionSizeLimitInBytes')]",
- "skipEmptyArchives": "[parameters('captureDescriptionSkipEmptyArchives')]"
- }
- },
- "builtInRoleNames": {
- "Azure Event Hubs Data Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec')]",
- "Azure Event Hubs Data Receiver": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a638d3c7-ab3a-418d-83e6-5f17a39d4fde')]",
- "Azure Event Hubs Data Sender": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '2b629674-e913-4c01-ae53-ef4638d8f975')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "namespace": {
- "existing": true,
- "type": "Microsoft.EventHub/namespaces",
- "apiVersion": "2022-10-01-preview",
- "name": "[parameters('namespaceName')]"
- },
- "eventHub": {
- "type": "Microsoft.EventHub/namespaces/eventhubs",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), parameters('name'))]",
- "properties": "[if(parameters('captureDescriptionEnabled'), union(variables('eventHubProperties'), variables('eventHubPropertiesCapture')), variables('eventHubProperties'))]",
- "dependsOn": [
- "namespace"
- ]
- },
- "eventHub_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}/eventhubs/{1}', parameters('namespaceName'), parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "eventHub"
- ]
- },
- "eventHub_roleAssignments": {
- "copy": {
- "name": "eventHub_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.EventHub/namespaces/{0}/eventhubs/{1}', parameters('namespaceName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaceName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "eventHub"
- ]
- },
- "eventHub_consumergroups": {
- "copy": {
- "name": "eventHub_consumergroups",
- "count": "[length(parameters('consumergroups'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ConsumerGroup-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('namespaceName')]"
- },
- "eventHubName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('consumergroups')[copyIndex()].name]"
- },
- "userMetadata": "[if(contains(parameters('consumergroups')[copyIndex()], 'userMetadata'), createObject('value', parameters('consumergroups')[copyIndex()].userMetadata), createObject('value', ''))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7142673381100704232"
- },
- "name": "Event Hub Namespace Event Hub Consumer Groups",
- "description": "This module deploys an Event Hub Namespace Event Hub Consumer Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.s."
- }
- },
- "eventHubName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the consumer group."
- }
- },
- "userMetadata": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/eventhubs/consumergroups",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}/{2}', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]",
- "properties": {
- "userMetadata": "[if(not(empty(parameters('userMetadata'))), parameters('userMetadata'), null())]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the consumer group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the consumer group."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/consumergroups', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the consumer group was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHub"
- ]
- },
- "eventHub_authorizationRules": {
- "copy": {
- "name": "eventHub_authorizationRules",
- "count": "[length(parameters('authorizationRules'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-AuthRule-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('namespaceName')]"
- },
- "eventHubName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('authorizationRules')[copyIndex()].name]"
- },
- "rights": "[if(contains(parameters('authorizationRules')[copyIndex()], 'rights'), createObject('value', parameters('authorizationRules')[copyIndex()].rights), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4935957739850887741"
- },
- "name": "Event Hub Namespace Event Hub Authorization Rules",
- "description": "This module deploys an Event Hub Namespace Event Hub Authorization Rule.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "eventHubName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace event hub. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the authorization rule."
- }
- },
- "rights": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "Listen",
- "Manage",
- "Send"
- ],
- "metadata": {
- "description": "Optional. The rights associated with the rule."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/eventhubs/authorizationRules",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}/{2}', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]",
- "properties": {
- "rights": "[parameters('rights')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the authorization rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the authorization rule."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs/authorizationRules', parameters('namespaceName'), parameters('eventHubName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the authorization rule was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHub"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the event hub."
- },
- "value": "[parameters('name')]"
- },
- "eventHubId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the event hub."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the event hub was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The authentication rule resource ID of the event hub."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), 'RootManageSharedAccessKey')]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_networkRuleSet": {
- "condition": "[or(not(empty(parameters('networkRuleSets'))), not(empty(parameters('privateEndpoints'))))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-EvhbNamespace-NetworkRuleSet', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "namespaceName": {
- "value": "[parameters('name')]"
- },
- "publicNetworkAccess": "[if(contains(parameters('networkRuleSets'), 'publicNetworkAccess'), createObject('value', parameters('networkRuleSets').publicNetworkAccess), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('networkRuleSets'))), createObject('value', 'Disabled'), createObject('value', 'Enabled')))]",
- "defaultAction": "[if(contains(parameters('networkRuleSets'), 'defaultAction'), createObject('value', parameters('networkRuleSets').defaultAction), createObject('value', 'Allow'))]",
- "trustedServiceAccessEnabled": "[if(contains(parameters('networkRuleSets'), 'trustedServiceAccessEnabled'), createObject('value', parameters('networkRuleSets').trustedServiceAccessEnabled), createObject('value', true()))]",
- "ipRules": "[if(contains(parameters('networkRuleSets'), 'ipRules'), createObject('value', parameters('networkRuleSets').ipRules), createObject('value', createArray()))]",
- "virtualNetworkRules": "[if(contains(parameters('networkRuleSets'), 'virtualNetworkRules'), createObject('value', parameters('networkRuleSets').virtualNetworkRules), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "7843391232136950856"
- },
- "name": "Event Hub Namespace Network Rule Sets",
- "description": "This module deploys an Event Hub Namespace Network Rule Set.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. This determines if traffic is allowed over public network. Default is \"Enabled\". If set to \"Disabled\", traffic to this namespace will be restricted over Private Endpoints only and network rules will not be applied."
- }
- },
- "defaultAction": {
- "type": "string",
- "defaultValue": "Allow",
- "allowedValues": [
- "Allow",
- "Deny"
- ],
- "metadata": {
- "description": "Optional. Default Action for Network Rule Set. Default is \"Allow\". It will not be set if publicNetworkAccess is \"Disabled\". Otherwise, it will be set to \"Deny\" if ipRules or virtualNetworkRules are being used."
- }
- },
- "trustedServiceAccessEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Value that indicates whether Trusted Service Access is enabled or not. Default is \"true\". It will not be set if publicNetworkAccess is \"Disabled\"."
- }
- },
- "virtualNetworkRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of subnet resource ID objects that this Event Hub Namespace is exposed to via Service Endpoints. You can enable the `ignoreMissingVnetServiceEndpoint` if you wish to add this virtual network to Event Hub Namespace but do not have an existing service endpoint. It will not be set if publicNetworkAccess is \"Disabled\". Otherwise, when used, defaultAction will be set to \"Deny\"."
- }
- },
- "ipRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of objects for the public IP ranges you want to allow via the Event Hub Namespace firewall. Supports IPv4 address or CIDR. It will not be set if publicNetworkAccess is \"Disabled\". Otherwise, when used, defaultAction will be set to \"Deny\"."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "networkRules",
- "count": "[length(parameters('virtualNetworkRules'))]",
- "input": {
- "ignoreMissingVnetServiceEndpoint": "[if(contains(parameters('virtualNetworkRules')[copyIndex('networkRules')], 'ignoreMissingVnetServiceEndpoint'), parameters('virtualNetworkRules')[copyIndex('networkRules')].ignoreMissingVnetServiceEndpoint, null())]",
- "subnet": "[if(contains(parameters('virtualNetworkRules')[copyIndex('networkRules')], 'subnetResourceId'), createObject('id', parameters('virtualNetworkRules')[copyIndex('networkRules')].subnetResourceId), null())]"
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/networkRuleSets",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), 'default')]",
- "properties": {
- "publicNetworkAccess": "[parameters('publicNetworkAccess')]",
- "defaultAction": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), if(or(not(empty(parameters('ipRules'))), not(empty(parameters('virtualNetworkRules')))), 'Deny', parameters('defaultAction')))]",
- "trustedServiceAccessEnabled": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), parameters('trustedServiceAccessEnabled'))]",
- "ipRules": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), parameters('ipRules'))]",
- "virtualNetworkRules": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), variables('networkRules'))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the network rule set."
- },
- "value": "default"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the network rule set."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/networkRuleSets', parameters('namespaceName'), 'default')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the network rule set was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- },
- "eventHubNamespace_privateEndpoints": {
- "copy": {
- "name": "eventHubNamespace_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-eventHubNamespace-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'namespace')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.EventHub/namespaces', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'namespace'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.EventHub/namespaces', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "eventHubNamespace"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the eventspace."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the eventspace."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group where the namespace is deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('eventHubNamespace', '2022-10-01-preview', 'full').identity, 'principalId')), reference('eventHubNamespace', '2022-10-01-preview', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('eventHubNamespace', '2022-10-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/network-rule-set/README.md b/modules/event-hub/namespace/network-rule-set/README.md
deleted file mode 100644
index 55f4143a56..0000000000
--- a/modules/event-hub/namespace/network-rule-set/README.md
+++ /dev/null
@@ -1,117 +0,0 @@
-# Event Hub Namespace Network Rule Sets `[Microsoft.EventHub/namespaces/networkRuleSets]`
-
-This module deploys an Event Hub Namespace Network Rule Set.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.EventHub/namespaces/networkRuleSets` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/networkRuleSets) |
-
-## Parameters
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`namespaceName`](#parameter-namespacename) | string | The name of the parent event hub namespace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`defaultAction`](#parameter-defaultaction) | string | Default Action for Network Rule Set. Default is "Allow". It will not be set if publicNetworkAccess is "Disabled". Otherwise, it will be set to "Deny" if ipRules or virtualNetworkRules are being used. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`ipRules`](#parameter-iprules) | array | An array of objects for the public IP ranges you want to allow via the Event Hub Namespace firewall. Supports IPv4 address or CIDR. It will not be set if publicNetworkAccess is "Disabled". Otherwise, when used, defaultAction will be set to "Deny". |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | This determines if traffic is allowed over public network. Default is "Enabled". If set to "Disabled", traffic to this namespace will be restricted over Private Endpoints only and network rules will not be applied. |
-| [`trustedServiceAccessEnabled`](#parameter-trustedserviceaccessenabled) | bool | Value that indicates whether Trusted Service Access is enabled or not. Default is "true". It will not be set if publicNetworkAccess is "Disabled". |
-| [`virtualNetworkRules`](#parameter-virtualnetworkrules) | array | An array of subnet resource ID objects that this Event Hub Namespace is exposed to via Service Endpoints. You can enable the `ignoreMissingVnetServiceEndpoint` if you wish to add this virtual network to Event Hub Namespace but do not have an existing service endpoint. It will not be set if publicNetworkAccess is "Disabled". Otherwise, when used, defaultAction will be set to "Deny". |
-
-### Parameter: `namespaceName`
-
-The name of the parent event hub namespace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `defaultAction`
-
-Default Action for Network Rule Set. Default is "Allow". It will not be set if publicNetworkAccess is "Disabled". Otherwise, it will be set to "Deny" if ipRules or virtualNetworkRules are being used.
-
-- Required: No
-- Type: string
-- Default: `'Allow'`
-- Allowed:
- ```Bicep
- [
- 'Allow'
- 'Deny'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `ipRules`
-
-An array of objects for the public IP ranges you want to allow via the Event Hub Namespace firewall. Supports IPv4 address or CIDR. It will not be set if publicNetworkAccess is "Disabled". Otherwise, when used, defaultAction will be set to "Deny".
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `publicNetworkAccess`
-
-This determines if traffic is allowed over public network. Default is "Enabled". If set to "Disabled", traffic to this namespace will be restricted over Private Endpoints only and network rules will not be applied.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `trustedServiceAccessEnabled`
-
-Value that indicates whether Trusted Service Access is enabled or not. Default is "true". It will not be set if publicNetworkAccess is "Disabled".
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `virtualNetworkRules`
-
-An array of subnet resource ID objects that this Event Hub Namespace is exposed to via Service Endpoints. You can enable the `ignoreMissingVnetServiceEndpoint` if you wish to add this virtual network to Event Hub Namespace but do not have an existing service endpoint. It will not be set if publicNetworkAccess is "Disabled". Otherwise, when used, defaultAction will be set to "Deny".
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the network rule set. |
-| `resourceGroupName` | string | The name of the resource group the network rule set was created in. |
-| `resourceId` | string | The resource ID of the network rule set. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/event-hub/namespace/network-rule-set/main.bicep b/modules/event-hub/namespace/network-rule-set/main.bicep
deleted file mode 100644
index c84fe076bd..0000000000
--- a/modules/event-hub/namespace/network-rule-set/main.bicep
+++ /dev/null
@@ -1,76 +0,0 @@
-metadata name = 'Event Hub Namespace Network Rule Sets'
-metadata description = 'This module deploys an Event Hub Namespace Network Rule Set.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.')
-param namespaceName string
-
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-@description('Optional. This determines if traffic is allowed over public network. Default is "Enabled". If set to "Disabled", traffic to this namespace will be restricted over Private Endpoints only and network rules will not be applied.')
-param publicNetworkAccess string = 'Enabled'
-
-@allowed([
- 'Allow'
- 'Deny'
-])
-@description('Optional. Default Action for Network Rule Set. Default is "Allow". It will not be set if publicNetworkAccess is "Disabled". Otherwise, it will be set to "Deny" if ipRules or virtualNetworkRules are being used.')
-param defaultAction string = 'Allow'
-
-@description('Optional. Value that indicates whether Trusted Service Access is enabled or not. Default is "true". It will not be set if publicNetworkAccess is "Disabled".')
-param trustedServiceAccessEnabled bool = true
-
-@description('Optional. An array of subnet resource ID objects that this Event Hub Namespace is exposed to via Service Endpoints. You can enable the `ignoreMissingVnetServiceEndpoint` if you wish to add this virtual network to Event Hub Namespace but do not have an existing service endpoint. It will not be set if publicNetworkAccess is "Disabled". Otherwise, when used, defaultAction will be set to "Deny".')
-param virtualNetworkRules array = []
-
-@description('Optional. An array of objects for the public IP ranges you want to allow via the Event Hub Namespace firewall. Supports IPv4 address or CIDR. It will not be set if publicNetworkAccess is "Disabled". Otherwise, when used, defaultAction will be set to "Deny".')
-param ipRules array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var networkRules = [for (virtualNetworkRule, index) in virtualNetworkRules: {
- ignoreMissingVnetServiceEndpoint: contains(virtualNetworkRule, 'ignoreMissingVnetServiceEndpoint') ? virtualNetworkRule.ignoreMissingVnetServiceEndpoint : null
- subnet: contains(virtualNetworkRule, 'subnetResourceId') ? {
- id: virtualNetworkRule.subnetResourceId
- } : null
-}]
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource namespace 'Microsoft.EventHub/namespaces@2022-10-01-preview' existing = {
- name: namespaceName
-}
-
-resource networkRuleSet 'Microsoft.EventHub/namespaces/networkRuleSets@2022-10-01-preview' = {
- name: 'default'
- parent: namespace
- properties: {
- publicNetworkAccess: publicNetworkAccess
- defaultAction: publicNetworkAccess == 'Disabled' ? null : (!empty(ipRules) || !empty(virtualNetworkRules) ? 'Deny' : defaultAction)
- trustedServiceAccessEnabled: publicNetworkAccess == 'Disabled' ? null : trustedServiceAccessEnabled
- ipRules: publicNetworkAccess == 'Disabled' ? null : ipRules
- virtualNetworkRules: publicNetworkAccess == 'Disabled' ? null : networkRules
- }
-}
-
-@description('The name of the network rule set.')
-output name string = networkRuleSet.name
-
-@description('The resource ID of the network rule set.')
-output resourceId string = networkRuleSet.id
-
-@description('The name of the resource group the network rule set was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/event-hub/namespace/network-rule-set/main.json b/modules/event-hub/namespace/network-rule-set/main.json
deleted file mode 100644
index f4eab5a4ca..0000000000
--- a/modules/event-hub/namespace/network-rule-set/main.json
+++ /dev/null
@@ -1,135 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2605359643798084834"
- },
- "name": "Event Hub Namespace Network Rule Sets",
- "description": "This module deploys an Event Hub Namespace Network Rule Set.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "namespaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. This determines if traffic is allowed over public network. Default is \"Enabled\". If set to \"Disabled\", traffic to this namespace will be restricted over Private Endpoints only and network rules will not be applied."
- }
- },
- "defaultAction": {
- "type": "string",
- "defaultValue": "Allow",
- "allowedValues": [
- "Allow",
- "Deny"
- ],
- "metadata": {
- "description": "Optional. Default Action for Network Rule Set. Default is \"Allow\". It will not be set if publicNetworkAccess is \"Disabled\". Otherwise, it will be set to \"Deny\" if ipRules or virtualNetworkRules are being used."
- }
- },
- "trustedServiceAccessEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Value that indicates whether Trusted Service Access is enabled or not. Default is \"true\". It will not be set if publicNetworkAccess is \"Disabled\"."
- }
- },
- "virtualNetworkRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of subnet resource ID objects that this Event Hub Namespace is exposed to via Service Endpoints. You can enable the `ignoreMissingVnetServiceEndpoint` if you wish to add this virtual network to Event Hub Namespace but do not have an existing service endpoint. It will not be set if publicNetworkAccess is \"Disabled\". Otherwise, when used, defaultAction will be set to \"Deny\"."
- }
- },
- "ipRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of objects for the public IP ranges you want to allow via the Event Hub Namespace firewall. Supports IPv4 address or CIDR. It will not be set if publicNetworkAccess is \"Disabled\". Otherwise, when used, defaultAction will be set to \"Deny\"."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "networkRules",
- "count": "[length(parameters('virtualNetworkRules'))]",
- "input": {
- "ignoreMissingVnetServiceEndpoint": "[if(contains(parameters('virtualNetworkRules')[copyIndex('networkRules')], 'ignoreMissingVnetServiceEndpoint'), parameters('virtualNetworkRules')[copyIndex('networkRules')].ignoreMissingVnetServiceEndpoint, null())]",
- "subnet": "[if(contains(parameters('virtualNetworkRules')[copyIndex('networkRules')], 'subnetResourceId'), createObject('id', parameters('virtualNetworkRules')[copyIndex('networkRules')].subnetResourceId), null())]"
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.EventHub/namespaces/networkRuleSets",
- "apiVersion": "2022-10-01-preview",
- "name": "[format('{0}/{1}', parameters('namespaceName'), 'default')]",
- "properties": {
- "publicNetworkAccess": "[parameters('publicNetworkAccess')]",
- "defaultAction": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), if(or(not(empty(parameters('ipRules'))), not(empty(parameters('virtualNetworkRules')))), 'Deny', parameters('defaultAction')))]",
- "trustedServiceAccessEnabled": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), parameters('trustedServiceAccessEnabled'))]",
- "ipRules": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), parameters('ipRules'))]",
- "virtualNetworkRules": "[if(equals(parameters('publicNetworkAccess'), 'Disabled'), null(), variables('networkRules'))]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the network rule set."
- },
- "value": "default"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the network rule set."
- },
- "value": "[resourceId('Microsoft.EventHub/namespaces/networkRuleSets', parameters('namespaceName'), 'default')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the network rule set was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/event-hub/namespace/network-rule-set/version.json b/modules/event-hub/namespace/network-rule-set/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/event-hub/namespace/network-rule-set/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/event-hub/namespace/tests/e2e/defaults/main.test.bicep b/modules/event-hub/namespace/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 424ca90ffe..0000000000
--- a/modules/event-hub/namespace/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventhub.namespaces-${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 = 'ehnmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}
diff --git a/modules/event-hub/namespace/tests/e2e/encr/dependencies.bicep b/modules/event-hub/namespace/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index dab158fd15..0000000000
--- a/modules/event-hub/namespace/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,90 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by event hub namespace
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault::key.id}-${location}-${managedIdentity.id}-Key-Reader-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- // Key Vault Crypto User
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- principalType: 'ServicePrincipal'
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The name of the created encryption key.')
-output keyName string = keyVault::key.name
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/event-hub/namespace/tests/e2e/encr/main.test.bicep b/modules/event-hub/namespace/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index 56749b440d..0000000000
--- a/modules/event-hub/namespace/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,78 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventhub.namespaces-${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 = 'ehnenc'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- publicNetworkAccess: 'SecuredByPerimeter'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- skuName: 'Premium'
- managedIdentities: {
- systemAssigned: false
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- requireInfrastructureEncryption: true
- }
-}
diff --git a/modules/event-hub/namespace/tests/e2e/max/dependencies.bicep b/modules/event-hub/namespace/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 6bc7e40df9..0000000000
--- a/modules/event-hub/namespace/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,83 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.EventHub'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.servicebus.windows.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-hub/namespace/tests/e2e/max/main.test.bicep b/modules/event-hub/namespace/tests/e2e/max/main.test.bicep
deleted file mode 100644
index c909eeb152..0000000000
--- a/modules/event-hub/namespace/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,238 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventhub.namespaces-${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 = 'ehnmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- zoneRedundant: true
- skuName: 'Standard'
- skuCapacity: 2
- authorizationRules: [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- {
- name: 'SendListenAccess'
- rights: [
- 'Listen'
- 'Send'
- ]
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- eventhubs: [
- {
- name: '${namePrefix}-az-evh-x-001'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- }
- {
- name: '${namePrefix}-az-evh-x-002'
- authorizationRules: [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- {
- name: 'SendListenAccess'
- rights: [
- 'Listen'
- 'Send'
- ]
- }
- ]
- captureDescriptionDestinationArchiveNameFormat: '{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}'
- captureDescriptionDestinationBlobContainer: 'eventhub'
- captureDescriptionDestinationName: 'EventHubArchive.AzureBlockBlob'
- captureDescriptionDestinationStorageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId
- captureDescriptionEnabled: true
- captureDescriptionEncoding: 'Avro'
- captureDescriptionIntervalInSeconds: 300
- captureDescriptionSizeLimitInBytes: 314572800
- captureDescriptionSkipEmptyArchives: true
- consumergroups: [
- {
- name: 'custom'
- userMetadata: 'customMetadata'
- }
- ]
- messageRetentionInDays: 1
- partitionCount: 2
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- status: 'Active'
- retentionDescriptionCleanupPolicy: 'Delete'
- retentionDescriptionRetentionTimeInHours: 3
- }
- {
- name: '${namePrefix}-az-evh-x-003'
- retentionDescriptionCleanupPolicy: 'Compact'
- retentionDescriptionTombstoneRetentionTimeInHours: 24
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- networkRuleSets: {
- defaultAction: 'Deny'
- ipRules: [
- {
- action: 'Allow'
- ipMask: '10.10.10.10'
- }
- ]
- trustedServiceAccessEnabled: false
- virtualNetworkRules: [
- {
- ignoreMissingVnetServiceEndpoint: true
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'namespace'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- kafkaEnabled: true
- disableLocalAuth: true
- isAutoInflateEnabled: true
- minimumTlsVersion: '1.2'
- maximumThroughputUnits: 4
- publicNetworkAccess: 'Disabled'
- }
-}
diff --git a/modules/event-hub/namespace/tests/e2e/pe/dependencies.bicep b/modules/event-hub/namespace/tests/e2e/pe/dependencies.bicep
deleted file mode 100644
index a1124e6d21..0000000000
--- a/modules/event-hub/namespace/tests/e2e/pe/dependencies.bicep
+++ /dev/null
@@ -1,54 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.EventHub'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.servicebus.windows.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/event-hub/namespace/tests/e2e/pe/main.test.bicep b/modules/event-hub/namespace/tests/e2e/pe/main.test.bicep
deleted file mode 100644
index e55e3faf2f..0000000000
--- a/modules/event-hub/namespace/tests/e2e/pe/main.test.bicep
+++ /dev/null
@@ -1,74 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventhub.namespaces-${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 = 'ehnpe'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- skuName: 'Premium'
- skuCapacity: 2
- zoneRedundant: true
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/event-hub/namespace/tests/e2e/waf-aligned/dependencies.bicep b/modules/event-hub/namespace/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 6bc7e40df9..0000000000
--- a/modules/event-hub/namespace/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,83 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.EventHub'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.servicebus.windows.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/event-hub/namespace/tests/e2e/waf-aligned/main.test.bicep b/modules/event-hub/namespace/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index c00b8c1668..0000000000
--- a/modules/event-hub/namespace/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,221 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-eventhub.namespaces-${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 = 'ehnwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- zoneRedundant: true
- skuName: 'Standard'
- skuCapacity: 2
- authorizationRules: [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- {
- name: 'SendListenAccess'
- rights: [
- 'Listen'
- 'Send'
- ]
- }
- ]
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- eventhubs: [
- {
- name: '${namePrefix}-az-evh-x-001'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- }
- {
- name: '${namePrefix}-az-evh-x-002'
- authorizationRules: [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- {
- name: 'SendListenAccess'
- rights: [
- 'Listen'
- 'Send'
- ]
- }
- ]
- captureDescriptionDestinationArchiveNameFormat: '{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}'
- captureDescriptionDestinationBlobContainer: 'eventhub'
- captureDescriptionDestinationName: 'EventHubArchive.AzureBlockBlob'
- captureDescriptionDestinationStorageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId
- captureDescriptionEnabled: true
- captureDescriptionEncoding: 'Avro'
- captureDescriptionIntervalInSeconds: 300
- captureDescriptionSizeLimitInBytes: 314572800
- captureDescriptionSkipEmptyArchives: true
- consumergroups: [
- {
- name: 'custom'
- userMetadata: 'customMetadata'
- }
- ]
- messageRetentionInDays: 1
- partitionCount: 2
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- status: 'Active'
- retentionDescriptionCleanupPolicy: 'Delete'
- retentionDescriptionRetentionTimeInHours: 3
- }
- {
- name: '${namePrefix}-az-evh-x-003'
- retentionDescriptionCleanupPolicy: 'Compact'
- retentionDescriptionTombstoneRetentionTimeInHours: 24
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- networkRuleSets: {
- defaultAction: 'Deny'
- ipRules: [
- {
- action: 'Allow'
- ipMask: '10.10.10.10'
- }
- ]
- trustedServiceAccessEnabled: false
- virtualNetworkRules: [
- {
- ignoreMissingVnetServiceEndpoint: true
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- }
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'namespace'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- managedIdentities: {
- systemAssigned: true
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- kafkaEnabled: true
- disableLocalAuth: true
- isAutoInflateEnabled: true
- minimumTlsVersion: '1.2'
- maximumThroughputUnits: 4
- publicNetworkAccess: 'Disabled'
- }
-}
diff --git a/modules/event-hub/namespace/version.json b/modules/event-hub/namespace/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/event-hub/namespace/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/health-bot/health-bot/README.md b/modules/health-bot/health-bot/README.md
index 3b796cfb65..3bba9a0a1e 100644
--- a/modules/health-bot/health-bot/README.md
+++ b/modules/health-bot/health-bot/README.md
@@ -1,516 +1,7 @@
-# Azure Health Bots `[Microsoft.HealthBot/healthBots]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the resource. |
-| [`sku`](#parameter-sku) | string | The name of the Azure Health Bot SKU. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-Name of the resource.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `sku`
-
-The name of the Azure Health Bot SKU.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'C0'
- 'F0'
- 'S1'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the health bot. |
-| `resourceGroupName` | string | The resource group the health bot was deployed into. |
-| `resourceId` | string | The resource ID of the health bot. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/health-bot/health-bot/main.bicep b/modules/health-bot/health-bot/main.bicep
deleted file mode 100644
index bf0e08c90d..0000000000
--- a/modules/health-bot/health-bot/main.bicep
+++ /dev/null
@@ -1,145 +0,0 @@
-metadata name = 'Azure Health Bots'
-metadata description = 'This module deploys an Azure Health Bot.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the resource.')
-param name string
-
-@allowed([
- 'C0'
- 'F0'
- 'S1'
-])
-@description('Required. The name of the Azure Health Bot SKU.')
-param sku string
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: !empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource healthBot 'Microsoft.HealthBot/healthBots@2022-08-08' = {
- name: name
- location: location
- tags: tags
- identity: identity
- sku: {
- name: sku
- }
- properties: {}
-}
-
-resource healthBot_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: healthBot
-}
-
-resource healthBot_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(healthBot.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: healthBot
-}]
-
-@description('The resource group the health bot was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the health bot.')
-output name string = healthBot.name
-
-@description('The resource ID of the health bot.')
-output resourceId string = healthBot.id
-
-@description('The location the resource was deployed into.')
-output location string = healthBot.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/health-bot/health-bot/main.json b/modules/health-bot/health-bot/main.json
deleted file mode 100644
index 538d2d760a..0000000000
--- a/modules/health-bot/health-bot/main.json
+++ /dev/null
@@ -1,286 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "582765600236650029"
- },
- "name": "Azure Health Bots",
- "description": "This module deploys an Azure Health Bot.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the resource."
- }
- },
- "sku": {
- "type": "string",
- "allowedValues": [
- "C0",
- "F0",
- "S1"
- ],
- "metadata": {
- "description": "Required. The name of the Azure Health Bot SKU."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null()), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "healthBot": {
- "type": "Microsoft.HealthBot/healthBots",
- "apiVersion": "2022-08-08",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "sku": {
- "name": "[parameters('sku')]"
- },
- "properties": {}
- },
- "healthBot_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.HealthBot/healthBots/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "healthBot"
- ]
- },
- "healthBot_roleAssignments": {
- "copy": {
- "name": "healthBot_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.HealthBot/healthBots/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.HealthBot/healthBots', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "healthBot"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the health bot was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the health bot."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the health bot."
- },
- "value": "[resourceId('Microsoft.HealthBot/healthBots', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('healthBot', '2022-08-08', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/health-bot/health-bot/tests/e2e/defaults/main.test.bicep b/modules/health-bot/health-bot/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index f2b46c90a3..0000000000
--- a/modules/health-bot/health-bot/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,50 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-healthbot.healthbots-${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 = 'hbhbmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- sku: 'F0'
- }
-}]
diff --git a/modules/health-bot/health-bot/tests/e2e/max/dependencies.bicep b/modules/health-bot/health-bot/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 539240be2b..0000000000
--- a/modules/health-bot/health-bot/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/health-bot/health-bot/tests/e2e/max/main.test.bicep b/modules/health-bot/health-bot/tests/e2e/max/main.test.bicep
deleted file mode 100644
index d5e7889ab8..0000000000
--- a/modules/health-bot/health-bot/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-healthbot.healthbots-${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 = 'hbhbmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- sku: 'F0'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- }
-}]
diff --git a/modules/health-bot/health-bot/tests/e2e/waf-aligned/dependencies.bicep b/modules/health-bot/health-bot/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 539240be2b..0000000000
--- a/modules/health-bot/health-bot/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep b/modules/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 4e5cb79986..0000000000
--- a/modules/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,72 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-healthbot.healthbots-${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 = 'hbhbwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- sku: 'F0'
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- }
-}]
diff --git a/modules/health-bot/health-bot/version.json b/modules/health-bot/health-bot/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/health-bot/health-bot/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/healthcare-apis/workspace/README.md b/modules/healthcare-apis/workspace/README.md
index 8b7c4da9e7..32b5f47802 100644
--- a/modules/healthcare-apis/workspace/README.md
+++ b/modules/healthcare-apis/workspace/README.md
@@ -1,975 +1,7 @@
-# Healthcare API Workspaces `[Microsoft.HealthcareApis/workspaces]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the Health Data Services Workspace service. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dicomservices`](#parameter-dicomservices) | array | Deploy DICOM services. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`fhirservices`](#parameter-fhirservices) | array | Deploy FHIR services. |
-| [`iotconnectors`](#parameter-iotconnectors) | array | Deploy IOT connectors. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Control permission for data plane traffic coming from public networks while private endpoint is enabled. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the Health Data Services Workspace service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `dicomservices`
-
-Deploy DICOM services.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `fhirservices`
-
-Deploy FHIR services.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `iotconnectors`
-
-Deploy IOT connectors.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `publicNetworkAccess`
-
-Control permission for data plane traffic coming from public networks while private endpoint is enabled.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the health data services workspace. |
-| `resourceGroupName` | string | The resource group where the workspace is deployed. |
-| `resourceId` | string | The resource ID of the health data services workspace. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `iotconnectors`
-
-Create an IOT Connector (MedTech) service with the workspace.
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/healthcare-apis/workspace/dicomservice/README.md b/modules/healthcare-apis/workspace/dicomservice/README.md
deleted file mode 100644
index 454ed418e7..0000000000
--- a/modules/healthcare-apis/workspace/dicomservice/README.md
+++ /dev/null
@@ -1,322 +0,0 @@
-# Healthcare API Workspace DICOM Services `[Microsoft.HealthcareApis/workspaces/dicomservices]`
-
-This module deploys a Healthcare API Workspace DICOM Service.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.HealthcareApis/workspaces/dicomservices` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the DICOM service. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`workspaceName`](#parameter-workspacename) | string | The name of the parent health data services workspace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`corsAllowCredentials`](#parameter-corsallowcredentials) | bool | Use this setting to indicate that cookies should be included in CORS requests. |
-| [`corsHeaders`](#parameter-corsheaders) | array | Specify HTTP headers which can be used during the request. Use "*" for any header. |
-| [`corsMaxAge`](#parameter-corsmaxage) | int | Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes. |
-| [`corsMethods`](#parameter-corsmethods) | array | Specify the allowed HTTP methods. |
-| [`corsOrigins`](#parameter-corsorigins) | array | Specify URLs of origin sites that can access this API, or use "*" to allow access from any site. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Control permission for data plane traffic coming from public networks while private endpoint is enabled. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the DICOM service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `workspaceName`
-
-The name of the parent health data services workspace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `corsAllowCredentials`
-
-Use this setting to indicate that cookies should be included in CORS requests.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `corsHeaders`
-
-Specify HTTP headers which can be used during the request. Use "*" for any header.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `corsMaxAge`
-
-Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `corsMethods`
-
-Specify the allowed HTTP methods.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'DELETE'
- 'GET'
- 'OPTIONS'
- 'PATCH'
- 'POST'
- 'PUT'
- ]
- ```
-
-### Parameter: `corsOrigins`
-
-Specify URLs of origin sites that can access this API, or use "*" to allow access from any site.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `publicNetworkAccess`
-
-Control permission for data plane traffic coming from public networks while private endpoint is enabled.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the dicom service. |
-| `resourceGroupName` | string | The resource group where the namespace is deployed. |
-| `resourceId` | string | The resource ID of the dicom service. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/healthcare-apis/workspace/dicomservice/main.bicep b/modules/healthcare-apis/workspace/dicomservice/main.bicep
deleted file mode 100644
index ab6af14e3d..0000000000
--- a/modules/healthcare-apis/workspace/dicomservice/main.bicep
+++ /dev/null
@@ -1,210 +0,0 @@
-metadata name = 'Healthcare API Workspace DICOM Services'
-metadata description = 'This module deploys a Healthcare API Workspace DICOM Service.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the DICOM service.')
-@maxLength(50)
-param name string
-
-@description('Conditional. The name of the parent health data services workspace. Required if the template is used in a standalone deployment.')
-param workspaceName string
-
-@description('Optional. Specify URLs of origin sites that can access this API, or use "*" to allow access from any site.')
-param corsOrigins array = []
-
-@description('Optional. Specify HTTP headers which can be used during the request. Use "*" for any header.')
-param corsHeaders array = []
-
-@allowed([
- 'DELETE'
- 'GET'
- 'OPTIONS'
- 'PATCH'
- 'POST'
- 'PUT'
-])
-@description('Optional. Specify the allowed HTTP methods.')
-param corsMethods array = []
-
-@description('Optional. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.')
-param corsMaxAge int = -1
-
-@description('Optional. Use this setting to indicate that cookies should be included in CORS requests.')
-param corsAllowCredentials bool = false
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Control permission for data plane traffic coming from public networks while private endpoint is enabled.')
-param publicNetworkAccess string = 'Disabled'
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-// =========== //
-// Deployments //
-// =========== //
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource workspace 'Microsoft.HealthcareApis/workspaces@2022-06-01' existing = {
- name: workspaceName
-}
-
-resource dicom 'Microsoft.HealthcareApis/workspaces/dicomservices@2022-06-01' = {
- name: name
- location: location
- tags: tags
- parent: workspace
- identity: identity
- properties: {
- corsConfiguration: {
- allowCredentials: corsAllowCredentials
- headers: corsHeaders
- maxAge: corsMaxAge == -1 ? null : corsMaxAge
- methods: corsMethods
- origins: corsOrigins
- }
- publicNetworkAccess: publicNetworkAccess
- }
-}
-
-resource dicom_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: dicom
-}
-
-resource dicom_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: dicom
-}]
-
-@description('The name of the dicom service.')
-output name string = dicom.name
-
-@description('The resource ID of the dicom service.')
-output resourceId string = dicom.id
-
-@description('The resource group where the namespace is deployed.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(dicom.identity, 'principalId') ? dicom.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = dicom.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/healthcare-apis/workspace/dicomservice/main.json b/modules/healthcare-apis/workspace/dicomservice/main.json
deleted file mode 100644
index a2a2bbc78b..0000000000
--- a/modules/healthcare-apis/workspace/dicomservice/main.json
+++ /dev/null
@@ -1,400 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4829507560537153518"
- },
- "name": "Healthcare API Workspace DICOM Services",
- "description": "This module deploys a Healthcare API Workspace DICOM Service.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 50,
- "metadata": {
- "description": "Required. The name of the DICOM service."
- }
- },
- "workspaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent health data services workspace. Required if the template is used in a standalone deployment."
- }
- },
- "corsOrigins": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify URLs of origin sites that can access this API, or use \"*\" to allow access from any site."
- }
- },
- "corsHeaders": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify HTTP headers which can be used during the request. Use \"*\" for any header."
- }
- },
- "corsMethods": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "DELETE",
- "GET",
- "OPTIONS",
- "PATCH",
- "POST",
- "PUT"
- ],
- "metadata": {
- "description": "Optional. Specify the allowed HTTP methods."
- }
- },
- "corsMaxAge": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes."
- }
- },
- "corsAllowCredentials": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Use this setting to indicate that cookies should be included in CORS requests."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Control permission for data plane traffic coming from public networks while private endpoint is enabled."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]"
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "workspace": {
- "existing": true,
- "type": "Microsoft.HealthcareApis/workspaces",
- "apiVersion": "2022-06-01",
- "name": "[parameters('workspaceName')]"
- },
- "dicom": {
- "type": "Microsoft.HealthcareApis/workspaces/dicomservices",
- "apiVersion": "2022-06-01",
- "name": "[format('{0}/{1}', parameters('workspaceName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "corsConfiguration": {
- "allowCredentials": "[parameters('corsAllowCredentials')]",
- "headers": "[parameters('corsHeaders')]",
- "maxAge": "[if(equals(parameters('corsMaxAge'), -1), null(), parameters('corsMaxAge'))]",
- "methods": "[parameters('corsMethods')]",
- "origins": "[parameters('corsOrigins')]"
- },
- "publicNetworkAccess": "[parameters('publicNetworkAccess')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "dicom_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.HealthcareApis/workspaces/{0}/dicomservices/{1}', parameters('workspaceName'), parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "dicom"
- ]
- },
- "dicom_diagnosticSettings": {
- "copy": {
- "name": "dicom_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.HealthcareApis/workspaces/{0}/dicomservices/{1}', parameters('workspaceName'), parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "dicom"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the dicom service."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the dicom service."
- },
- "value": "[resourceId('Microsoft.HealthcareApis/workspaces/dicomservices', parameters('workspaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group where the namespace is deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('dicom', '2022-06-01', 'full').identity, 'principalId')), reference('dicom', '2022-06-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('dicom', '2022-06-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/healthcare-apis/workspace/dicomservice/version.json b/modules/healthcare-apis/workspace/dicomservice/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/healthcare-apis/workspace/dicomservice/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/healthcare-apis/workspace/fhirservice/README.md b/modules/healthcare-apis/workspace/fhirservice/README.md
deleted file mode 100644
index a5e3cad81d..0000000000
--- a/modules/healthcare-apis/workspace/fhirservice/README.md
+++ /dev/null
@@ -1,589 +0,0 @@
-# Healthcare API Workspace FHIR Services `[Microsoft.HealthcareApis/workspaces/fhirservices]`
-
-This module deploys a Healthcare API Workspace FHIR Service.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.HealthcareApis/workspaces/fhirservices` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the FHIR service. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`workspaceName`](#parameter-workspacename) | string | The name of the parent health data services workspace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`accessPolicyObjectIds`](#parameter-accesspolicyobjectids) | array | List of Azure AD object IDs (User or Apps) that is allowed access to the FHIR service. |
-| [`acrLoginServers`](#parameter-acrloginservers) | array | The list of the Azure container registry login servers. |
-| [`acrOciArtifacts`](#parameter-acrociartifacts) | array | The list of Open Container Initiative (OCI) artifacts. |
-| [`authenticationAudience`](#parameter-authenticationaudience) | string | The audience url for the service. |
-| [`authenticationAuthority`](#parameter-authenticationauthority) | string | The authority url for the service. |
-| [`corsAllowCredentials`](#parameter-corsallowcredentials) | bool | Use this setting to indicate that cookies should be included in CORS requests. |
-| [`corsHeaders`](#parameter-corsheaders) | array | Specify HTTP headers which can be used during the request. Use "*" for any header. |
-| [`corsMaxAge`](#parameter-corsmaxage) | int | Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes. |
-| [`corsMethods`](#parameter-corsmethods) | array | Specify the allowed HTTP methods. |
-| [`corsOrigins`](#parameter-corsorigins) | array | Specify URLs of origin sites that can access this API, or use "*" to allow access from any site. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`exportStorageAccountName`](#parameter-exportstorageaccountname) | string | The name of the default export storage account. |
-| [`importEnabled`](#parameter-importenabled) | bool | If the import operation is enabled. |
-| [`importStorageAccountName`](#parameter-importstorageaccountname) | string | The name of the default integration storage account. |
-| [`initialImportMode`](#parameter-initialimportmode) | bool | If the FHIR service is in InitialImportMode. |
-| [`kind`](#parameter-kind) | string | The kind of the service. Defaults to R4. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Control permission for data plane traffic coming from public networks while private endpoint is enabled. |
-| [`resourceVersionOverrides`](#parameter-resourceversionoverrides) | object | A list of FHIR Resources and their version policy overrides. |
-| [`resourceVersionPolicy`](#parameter-resourceversionpolicy) | string | The default value for tracking history across all resources. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`smartProxyEnabled`](#parameter-smartproxyenabled) | bool | If the SMART on FHIR proxy is enabled. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-The name of the FHIR service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `workspaceName`
-
-The name of the parent health data services workspace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `accessPolicyObjectIds`
-
-List of Azure AD object IDs (User or Apps) that is allowed access to the FHIR service.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `acrLoginServers`
-
-The list of the Azure container registry login servers.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `acrOciArtifacts`
-
-The list of Open Container Initiative (OCI) artifacts.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `authenticationAudience`
-
-The audience url for the service.
-
-- Required: No
-- Type: string
-- Default: `[format('https://{0}-{1}.fhir.azurehealthcareapis.com', parameters('workspaceName'), parameters('name'))]`
-
-### Parameter: `authenticationAuthority`
-
-The authority url for the service.
-
-- Required: No
-- Type: string
-- Default: `[uri(environment().authentication.loginEndpoint, subscription().tenantId)]`
-
-### Parameter: `corsAllowCredentials`
-
-Use this setting to indicate that cookies should be included in CORS requests.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `corsHeaders`
-
-Specify HTTP headers which can be used during the request. Use "*" for any header.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `corsMaxAge`
-
-Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `corsMethods`
-
-Specify the allowed HTTP methods.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'DELETE'
- 'GET'
- 'OPTIONS'
- 'PATCH'
- 'POST'
- 'PUT'
- ]
- ```
-
-### Parameter: `corsOrigins`
-
-Specify URLs of origin sites that can access this API, or use "*" to allow access from any site.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exportStorageAccountName`
-
-The name of the default export storage account.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `importEnabled`
-
-If the import operation is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `importStorageAccountName`
-
-The name of the default integration storage account.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `initialImportMode`
-
-If the FHIR service is in InitialImportMode.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `kind`
-
-The kind of the service. Defaults to R4.
-
-- Required: No
-- Type: string
-- Default: `'fhir-R4'`
-- Allowed:
- ```Bicep
- [
- 'fhir-R4'
- 'fhir-Stu3'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `publicNetworkAccess`
-
-Control permission for data plane traffic coming from public networks while private endpoint is enabled.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `resourceVersionOverrides`
-
-A list of FHIR Resources and their version policy overrides.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `resourceVersionPolicy`
-
-The default value for tracking history across all resources.
-
-- Required: No
-- Type: string
-- Default: `'versioned'`
-- Allowed:
- ```Bicep
- [
- 'no-version'
- 'versioned'
- 'versioned-update'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `smartProxyEnabled`
-
-If the SMART on FHIR proxy is enabled.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the fhir service. |
-| `resourceGroupName` | string | The resource group where the namespace is deployed. |
-| `resourceId` | string | The resource ID of the fhir service. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-| `workspaceName` | string | The name of the fhir workspace. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `acrOciArtifacts`
-
-You can specify multiple Azure Container OCI artifacts using the following format:
-
-
diff --git a/modules/healthcare-apis/workspace/fhirservice/main.bicep b/modules/healthcare-apis/workspace/fhirservice/main.bicep
deleted file mode 100644
index b41f57a9b9..0000000000
--- a/modules/healthcare-apis/workspace/fhirservice/main.bicep
+++ /dev/null
@@ -1,347 +0,0 @@
-metadata name = 'Healthcare API Workspace FHIR Services'
-metadata description = 'This module deploys a Healthcare API Workspace FHIR Service.'
-metadata owner = 'Azure/module-maintainers'
-
-@maxLength(50)
-@description('Required. The name of the FHIR service.')
-param name string
-
-@allowed([
- 'fhir-R4'
- 'fhir-Stu3'
-])
-@description('Optional. The kind of the service. Defaults to R4.')
-param kind string = 'fhir-R4'
-
-@description('Conditional. The name of the parent health data services workspace. Required if the template is used in a standalone deployment.')
-param workspaceName string
-
-@description('Optional. List of Azure AD object IDs (User or Apps) that is allowed access to the FHIR service.')
-param accessPolicyObjectIds array = []
-
-@description('Optional. The list of the Azure container registry login servers.')
-param acrLoginServers array = []
-
-@description('Optional. The list of Open Container Initiative (OCI) artifacts.')
-param acrOciArtifacts array = []
-
-@description('Optional. The authority url for the service.')
-param authenticationAuthority string = uri(environment().authentication.loginEndpoint, subscription().tenantId)
-
-@description('Optional. The audience url for the service.')
-param authenticationAudience string = 'https://${workspaceName}-${name}.fhir.azurehealthcareapis.com'
-
-@description('Optional. Specify URLs of origin sites that can access this API, or use "*" to allow access from any site.')
-param corsOrigins array = []
-
-@description('Optional. Specify HTTP headers which can be used during the request. Use "*" for any header.')
-param corsHeaders array = []
-
-@allowed([
- 'DELETE'
- 'GET'
- 'OPTIONS'
- 'PATCH'
- 'POST'
- 'PUT'
-])
-@description('Optional. Specify the allowed HTTP methods.')
-param corsMethods array = []
-
-@description('Optional. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes.')
-param corsMaxAge int = -1
-
-@description('Optional. Use this setting to indicate that cookies should be included in CORS requests.')
-param corsAllowCredentials bool = false
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The name of the default export storage account.')
-param exportStorageAccountName string = ''
-
-@description('Optional. The name of the default integration storage account.')
-param importStorageAccountName string = ''
-
-@description('Optional. If the import operation is enabled.')
-param importEnabled bool = false
-
-@description('Optional. If the FHIR service is in InitialImportMode.')
-param initialImportMode bool = false
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@allowed([
- 'Disabled'
- 'Enabled'
-])
-@description('Optional. Control permission for data plane traffic coming from public networks while private endpoint is enabled.')
-param publicNetworkAccess string = 'Disabled'
-
-@allowed([
- 'no-version'
- 'versioned'
- 'versioned-update'
-])
-@description('Optional. The default value for tracking history across all resources.')
-param resourceVersionPolicy string = 'versioned'
-
-@description('Optional. A list of FHIR Resources and their version policy overrides.')
-param resourceVersionOverrides object = {}
-
-@description('Optional. If the SMART on FHIR proxy is enabled.')
-param smartProxyEnabled bool = false
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var accessPolicies = [for id in accessPolicyObjectIds: {
- objectId: id
-}]
-
-var exportConfiguration = {
- storageAccountName: exportStorageAccountName
-}
-
-// =========== //
-// Deployments //
-// =========== //
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'DICOM Data Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '58a3b984-7adf-4c20-983a-32417c86fbc8')
- 'DICOM Data Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e89c7a3c-2f64-4fa1-a847-3e4c9ba4283a')
- 'FHIR Data Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5a1fc7df-4bf1-4951-a576-89034ee01acd')
- 'FHIR Data Converter': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a1705bd2-3a8f-45a5-8683-466fcfd5cc24')
- 'FHIR Data Exporter': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3db33094-8700-4567-8da5-1501d4e7e843')
- 'FHIR Data Importer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4465e953-8ced-4406-a58e-0f6e3f3b530b')
- 'FHIR Data Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4c8d0bbc-75d3-4935-991f-5f3c56d81508')
- 'FHIR Data Writer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3f88fce4-5892-4214-ae73-ba5294559913')
- 'FHIR SMART User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4ba50f17-9666-485c-a643-ff00808643f0')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource workspace 'Microsoft.HealthcareApis/workspaces@2022-06-01' existing = {
- name: workspaceName
-}
-
-resource fhir 'Microsoft.HealthcareApis/workspaces/fhirservices@2022-06-01' = {
- name: name
- parent: workspace
- location: location
- kind: kind
- tags: tags
- identity: identity
- properties: {
- accessPolicies: accessPolicies
- authenticationConfiguration: {
- authority: authenticationAuthority
- audience: authenticationAudience
- smartProxyEnabled: smartProxyEnabled
- }
- corsConfiguration: {
- allowCredentials: corsAllowCredentials
- headers: corsHeaders
- maxAge: corsMaxAge == -1 ? null : corsMaxAge
- methods: corsMethods
- origins: corsOrigins
- }
- publicNetworkAccess: publicNetworkAccess
- exportConfiguration: exportStorageAccountName == '' ? {} : exportConfiguration
- importConfiguration: {
- enabled: importEnabled
- initialImportMode: initialImportMode
- integrationDataStore: importStorageAccountName == '' ? null : importStorageAccountName
- }
- resourceVersionPolicyConfiguration: {
- default: resourceVersionPolicy
- resourceTypeOverrides: empty(resourceVersionOverrides) ? null : resourceVersionOverrides
- }
- acrConfiguration: {
- loginServers: acrLoginServers
- ociArtifacts: empty(acrOciArtifacts) ? null : acrOciArtifacts
- }
- }
-}
-
-resource fhir_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: fhir
-}
-
-resource fhir_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: fhir
-}]
-
-resource fhir_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(fhir.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: fhir
-}]
-
-@description('The name of the fhir service.')
-output name string = fhir.name
-
-@description('The resource ID of the fhir service.')
-output resourceId string = fhir.id
-
-@description('The resource group where the namespace is deployed.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(fhir.identity, 'principalId') ? fhir.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = fhir.location
-
-@description('The name of the fhir workspace.')
-output workspaceName string = workspace.name
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/healthcare-apis/workspace/fhirservice/main.json b/modules/healthcare-apis/workspace/fhirservice/main.json
deleted file mode 100644
index f02cfeeaed..0000000000
--- a/modules/healthcare-apis/workspace/fhirservice/main.json
+++ /dev/null
@@ -1,650 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13185908730981475512"
- },
- "name": "Healthcare API Workspace FHIR Services",
- "description": "This module deploys a Healthcare API Workspace FHIR Service.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 50,
- "metadata": {
- "description": "Required. The name of the FHIR service."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "fhir-R4",
- "allowedValues": [
- "fhir-R4",
- "fhir-Stu3"
- ],
- "metadata": {
- "description": "Optional. The kind of the service. Defaults to R4."
- }
- },
- "workspaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent health data services workspace. Required if the template is used in a standalone deployment."
- }
- },
- "accessPolicyObjectIds": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of Azure AD object IDs (User or Apps) that is allowed access to the FHIR service."
- }
- },
- "acrLoginServers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of the Azure container registry login servers."
- }
- },
- "acrOciArtifacts": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of Open Container Initiative (OCI) artifacts."
- }
- },
- "authenticationAuthority": {
- "type": "string",
- "defaultValue": "[uri(environment().authentication.loginEndpoint, subscription().tenantId)]",
- "metadata": {
- "description": "Optional. The authority url for the service."
- }
- },
- "authenticationAudience": {
- "type": "string",
- "defaultValue": "[format('https://{0}-{1}.fhir.azurehealthcareapis.com', parameters('workspaceName'), parameters('name'))]",
- "metadata": {
- "description": "Optional. The audience url for the service."
- }
- },
- "corsOrigins": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify URLs of origin sites that can access this API, or use \"*\" to allow access from any site."
- }
- },
- "corsHeaders": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Specify HTTP headers which can be used during the request. Use \"*\" for any header."
- }
- },
- "corsMethods": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "DELETE",
- "GET",
- "OPTIONS",
- "PATCH",
- "POST",
- "PUT"
- ],
- "metadata": {
- "description": "Optional. Specify the allowed HTTP methods."
- }
- },
- "corsMaxAge": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Specify how long a result from a request can be cached in seconds. Example: 600 means 10 minutes."
- }
- },
- "corsAllowCredentials": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Use this setting to indicate that cookies should be included in CORS requests."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "exportStorageAccountName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the default export storage account."
- }
- },
- "importStorageAccountName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The name of the default integration storage account."
- }
- },
- "importEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If the import operation is enabled."
- }
- },
- "initialImportMode": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If the FHIR service is in InitialImportMode."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Disabled",
- "Enabled"
- ],
- "metadata": {
- "description": "Optional. Control permission for data plane traffic coming from public networks while private endpoint is enabled."
- }
- },
- "resourceVersionPolicy": {
- "type": "string",
- "defaultValue": "versioned",
- "allowedValues": [
- "no-version",
- "versioned",
- "versioned-update"
- ],
- "metadata": {
- "description": "Optional. The default value for tracking history across all resources."
- }
- },
- "resourceVersionOverrides": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. A list of FHIR Resources and their version policy overrides."
- }
- },
- "smartProxyEnabled": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If the SMART on FHIR proxy is enabled."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "accessPolicies",
- "count": "[length(parameters('accessPolicyObjectIds'))]",
- "input": {
- "objectId": "[parameters('accessPolicyObjectIds')[copyIndex('accessPolicies')]]"
- }
- }
- ],
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "exportConfiguration": {
- "storageAccountName": "[parameters('exportStorageAccountName')]"
- },
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DICOM Data Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '58a3b984-7adf-4c20-983a-32417c86fbc8')]",
- "DICOM Data Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e89c7a3c-2f64-4fa1-a847-3e4c9ba4283a')]",
- "FHIR Data Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '5a1fc7df-4bf1-4951-a576-89034ee01acd')]",
- "FHIR Data Converter": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a1705bd2-3a8f-45a5-8683-466fcfd5cc24')]",
- "FHIR Data Exporter": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3db33094-8700-4567-8da5-1501d4e7e843')]",
- "FHIR Data Importer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4465e953-8ced-4406-a58e-0f6e3f3b530b')]",
- "FHIR Data Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4c8d0bbc-75d3-4935-991f-5f3c56d81508')]",
- "FHIR Data Writer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3f88fce4-5892-4214-ae73-ba5294559913')]",
- "FHIR SMART User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4ba50f17-9666-485c-a643-ff00808643f0')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "workspace": {
- "existing": true,
- "type": "Microsoft.HealthcareApis/workspaces",
- "apiVersion": "2022-06-01",
- "name": "[parameters('workspaceName')]"
- },
- "fhir": {
- "type": "Microsoft.HealthcareApis/workspaces/fhirservices",
- "apiVersion": "2022-06-01",
- "name": "[format('{0}/{1}', parameters('workspaceName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "kind": "[parameters('kind')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "properties": {
- "accessPolicies": "[variables('accessPolicies')]",
- "authenticationConfiguration": {
- "authority": "[parameters('authenticationAuthority')]",
- "audience": "[parameters('authenticationAudience')]",
- "smartProxyEnabled": "[parameters('smartProxyEnabled')]"
- },
- "corsConfiguration": {
- "allowCredentials": "[parameters('corsAllowCredentials')]",
- "headers": "[parameters('corsHeaders')]",
- "maxAge": "[if(equals(parameters('corsMaxAge'), -1), null(), parameters('corsMaxAge'))]",
- "methods": "[parameters('corsMethods')]",
- "origins": "[parameters('corsOrigins')]"
- },
- "publicNetworkAccess": "[parameters('publicNetworkAccess')]",
- "exportConfiguration": "[if(equals(parameters('exportStorageAccountName'), ''), createObject(), variables('exportConfiguration'))]",
- "importConfiguration": {
- "enabled": "[parameters('importEnabled')]",
- "initialImportMode": "[parameters('initialImportMode')]",
- "integrationDataStore": "[if(equals(parameters('importStorageAccountName'), ''), null(), parameters('importStorageAccountName'))]"
- },
- "resourceVersionPolicyConfiguration": {
- "default": "[parameters('resourceVersionPolicy')]",
- "resourceTypeOverrides": "[if(empty(parameters('resourceVersionOverrides')), null(), parameters('resourceVersionOverrides'))]"
- },
- "acrConfiguration": {
- "loginServers": "[parameters('acrLoginServers')]",
- "ociArtifacts": "[if(empty(parameters('acrOciArtifacts')), null(), parameters('acrOciArtifacts'))]"
- }
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "fhir_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.HealthcareApis/workspaces/{0}/fhirservices/{1}', parameters('workspaceName'), parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "fhir"
- ]
- },
- "fhir_diagnosticSettings": {
- "copy": {
- "name": "fhir_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.HealthcareApis/workspaces/{0}/fhirservices/{1}', parameters('workspaceName'), parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "fhir"
- ]
- },
- "fhir_roleAssignments": {
- "copy": {
- "name": "fhir_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.HealthcareApis/workspaces/{0}/fhirservices/{1}', parameters('workspaceName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.HealthcareApis/workspaces/fhirservices', parameters('workspaceName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "fhir"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the fhir service."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the fhir service."
- },
- "value": "[resourceId('Microsoft.HealthcareApis/workspaces/fhirservices', parameters('workspaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group where the namespace is deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('fhir', '2022-06-01', 'full').identity, 'principalId')), reference('fhir', '2022-06-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('fhir', '2022-06-01', 'full').location]"
- },
- "workspaceName": {
- "type": "string",
- "metadata": {
- "description": "The name of the fhir workspace."
- },
- "value": "[parameters('workspaceName')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/healthcare-apis/workspace/fhirservice/version.json b/modules/healthcare-apis/workspace/fhirservice/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/healthcare-apis/workspace/fhirservice/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/healthcare-apis/workspace/iotconnector/README.md b/modules/healthcare-apis/workspace/iotconnector/README.md
deleted file mode 100644
index 72dff50dec..0000000000
--- a/modules/healthcare-apis/workspace/iotconnector/README.md
+++ /dev/null
@@ -1,441 +0,0 @@
-# Healthcare API Workspace IoT Connectors `[Microsoft.HealthcareApis/workspaces/iotconnectors]`
-
-This module deploys a Healthcare API Workspace IoT Connector.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.HealthcareApis/workspaces/iotconnectors` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.HealthcareApis/workspaces/iotconnectors/fhirdestinations` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`deviceMapping`](#parameter-devicemapping) | object | The mapping JSON that determines how incoming device data is normalized. |
-| [`eventHubName`](#parameter-eventhubname) | string | Event Hub name to connect to. |
-| [`eventHubNamespaceName`](#parameter-eventhubnamespacename) | string | Namespace of the Event Hub to connect to. |
-| [`name`](#parameter-name) | string | The name of the MedTech service. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`workspaceName`](#parameter-workspacename) | string | The name of the parent health data services workspace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`consumerGroup`](#parameter-consumergroup) | string | Consumer group of the event hub to connected to. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`fhirdestination`](#parameter-fhirdestination) | object | FHIR Destination. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `deviceMapping`
-
-The mapping JSON that determines how incoming device data is normalized.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- template: []
- templateType: 'CollectionContent'
- }
- ```
-
-### Parameter: `eventHubName`
-
-Event Hub name to connect to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `eventHubNamespaceName`
-
-Namespace of the Event Hub to connect to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the MedTech service.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `workspaceName`
-
-The name of the parent health data services workspace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `consumerGroup`
-
-Consumer group of the event hub to connected to.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `fhirdestination`
-
-FHIR Destination.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the medtech service. |
-| `resourceGroupName` | string | The resource group where the namespace is deployed. |
-| `resourceId` | string | The resource ID of the medtech service. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-| `workspaceName` | string | The name of the medtech workspace. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `deviceMapping`
-
-You can specify a collection of device mapping using the following format:
-
-> NOTE: More detailed information on device mappings can be found [here](https://learn.microsoft.com/en-us/azure/healthcare-apis/iot/how-to-use-device-mappings).
-
-
-
-### Parameter Usage: `destinationMapping`
-
-You can specify a collection of destination mapping using the following format:
-
-> NOTE: More detailed information on destination mappings can be found [here](https://learn.microsoft.com/en-us/azure/healthcare-apis/iot/how-to-use-fhir-mappings).
-
-
diff --git a/modules/healthcare-apis/workspace/iotconnector/fhirdestination/README.md b/modules/healthcare-apis/workspace/iotconnector/fhirdestination/README.md
deleted file mode 100644
index 2b4f0ee464..0000000000
--- a/modules/healthcare-apis/workspace/iotconnector/fhirdestination/README.md
+++ /dev/null
@@ -1,198 +0,0 @@
-# Healthcare API Workspace IoT Connector FHIR Destinations `[Microsoft.HealthcareApis/workspaces/iotconnectors/fhirdestinations]`
-
-This module deploys a Healthcare API Workspace IoT Connector FHIR Destination.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.HealthcareApis/workspaces/iotconnectors/fhirdestinations` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`destinationMapping`](#parameter-destinationmapping) | object | The mapping JSON that determines how normalized data is converted to FHIR Observations. |
-| [`fhirServiceResourceId`](#parameter-fhirserviceresourceid) | string | The resource identifier of the FHIR Service to connect to. |
-| [`name`](#parameter-name) | string | The name of the FHIR destination. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`iotConnectorName`](#parameter-iotconnectorname) | string | The name of the MedTech service to add this destination to. Required if the template is used in a standalone deployment. |
-| [`workspaceName`](#parameter-workspacename) | string | The name of the parent health data services workspace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`resourceIdentityResolutionType`](#parameter-resourceidentityresolutiontype) | string | Determines how resource identity is resolved on the destination. |
-
-### Parameter: `destinationMapping`
-
-The mapping JSON that determines how normalized data is converted to FHIR Observations.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- template: []
- templateType: 'CollectionFhir'
- }
- ```
-
-### Parameter: `fhirServiceResourceId`
-
-The resource identifier of the FHIR Service to connect to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the FHIR destination.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `iotConnectorName`
-
-The name of the MedTech service to add this destination to. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `workspaceName`
-
-The name of the parent health data services workspace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `resourceIdentityResolutionType`
-
-Determines how resource identity is resolved on the destination.
-
-- Required: No
-- Type: string
-- Default: `'Lookup'`
-- Allowed:
- ```Bicep
- [
- 'Create'
- 'Lookup'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `iotConnectorName` | string | The name of the medtech service. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the FHIR destination. |
-| `resourceGroupName` | string | The resource group where the namespace is deployed. |
-| `resourceId` | string | The resource ID of the FHIR destination. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `destinationMapping`
-
-You can specify a collection of destination mapping using the following format:
-
-> NOTE: More detailed information on destination mappings can be found [here](https://learn.microsoft.com/en-us/azure/healthcare-apis/iot/how-to-use-fhir-mappings).
-
-
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`groupShortName`](#parameter-groupshortname) | string | The short name of the action group. |
-| [`name`](#parameter-name) | string | The name of the action group. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`armRoleReceivers`](#parameter-armrolereceivers) | array | The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. |
-| [`automationRunbookReceivers`](#parameter-automationrunbookreceivers) | array | The list of AutomationRunbook receivers that are part of this action group. |
-| [`azureAppPushReceivers`](#parameter-azureapppushreceivers) | array | The list of AzureAppPush receivers that are part of this action group. |
-| [`azureFunctionReceivers`](#parameter-azurefunctionreceivers) | array | The list of function receivers that are part of this action group. |
-| [`emailReceivers`](#parameter-emailreceivers) | array | The list of email receivers that are part of this action group. |
-| [`enabled`](#parameter-enabled) | bool | Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`itsmReceivers`](#parameter-itsmreceivers) | array | The list of ITSM receivers that are part of this action group. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`logicAppReceivers`](#parameter-logicappreceivers) | array | The list of logic app receivers that are part of this action group. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`smsReceivers`](#parameter-smsreceivers) | array | The list of SMS receivers that are part of this action group. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`voiceReceivers`](#parameter-voicereceivers) | array | The list of voice receivers that are part of this action group. |
-| [`webhookReceivers`](#parameter-webhookreceivers) | array | The list of webhook receivers that are part of this action group. |
-
-### Parameter: `groupShortName`
-
-The short name of the action group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the action group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `armRoleReceivers`
-
-The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `automationRunbookReceivers`
-
-The list of AutomationRunbook receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `azureAppPushReceivers`
-
-The list of AzureAppPush receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `azureFunctionReceivers`
-
-The list of function receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `emailReceivers`
-
-The list of email receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enabled`
-
-Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `itsmReceivers`
-
-The list of ITSM receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `'global'`
-
-### Parameter: `logicAppReceivers`
-
-The list of logic app receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `smsReceivers`
-
-The list of SMS receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `voiceReceivers`
-
-The list of voice receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `webhookReceivers`
-
-The list of webhook receivers that are part of this action group.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the action group . |
-| `resourceGroupName` | string | The resource group the action group was deployed into. |
-| `resourceId` | string | The resource ID of the action group . |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-- Receiver name must be unique across the ActionGroup.
-- Email, SMS, Azure App push and Voice can be grouped in the same Action. To do so, the `name` field of the receivers must be in the `RecName_-ActionType-` format where:
- - _RecName_ is the name you want to give to the Action
- - _ActionType_ is one of the action types that can be grouped together. Possible values are:
- - EmailAction
- - SMSAction
- - AzureAppAction
- - VoiceAction
-
-- To understand the impact of the `useCommonAlertSchema` field, see [documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-common-schema).
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/action-group/main.bicep b/modules/insights/action-group/main.bicep
deleted file mode 100644
index bca49be2f7..0000000000
--- a/modules/insights/action-group/main.bicep
+++ /dev/null
@@ -1,146 +0,0 @@
-metadata name = 'Action Groups'
-metadata description = 'This module deploys an Action Group.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the action group.')
-param name string
-
-@description('Required. The short name of the action group.')
-param groupShortName string
-
-@description('Optional. Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications.')
-param enabled bool = true
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The list of email receivers that are part of this action group.')
-param emailReceivers array = []
-
-@description('Optional. The list of SMS receivers that are part of this action group.')
-param smsReceivers array = []
-
-@description('Optional. The list of webhook receivers that are part of this action group.')
-param webhookReceivers array = []
-
-@description('Optional. The list of ITSM receivers that are part of this action group.')
-param itsmReceivers array = []
-
-@description('Optional. The list of AzureAppPush receivers that are part of this action group.')
-param azureAppPushReceivers array = []
-
-@description('Optional. The list of AutomationRunbook receivers that are part of this action group.')
-param automationRunbookReceivers array = []
-
-@description('Optional. The list of voice receivers that are part of this action group.')
-param voiceReceivers array = []
-
-@description('Optional. The list of logic app receivers that are part of this action group.')
-param logicAppReceivers array = []
-
-@description('Optional. The list of function receivers that are part of this action group.')
-param azureFunctionReceivers array = []
-
-@description('Optional. The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.')
-param armRoleReceivers array = []
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Location for all resources.')
-param location string = 'global'
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource actionGroup 'Microsoft.Insights/actionGroups@2023-01-01' = {
- name: name
- location: location
- tags: tags
- properties: {
- groupShortName: groupShortName
- enabled: enabled
- emailReceivers: (empty(emailReceivers) ? null : emailReceivers)
- smsReceivers: (empty(smsReceivers) ? null : smsReceivers)
- webhookReceivers: (empty(webhookReceivers) ? null : webhookReceivers)
- itsmReceivers: (empty(itsmReceivers) ? null : itsmReceivers)
- azureAppPushReceivers: (empty(azureAppPushReceivers) ? null : azureAppPushReceivers)
- automationRunbookReceivers: (empty(automationRunbookReceivers) ? null : automationRunbookReceivers)
- voiceReceivers: (empty(voiceReceivers) ? null : voiceReceivers)
- logicAppReceivers: (empty(logicAppReceivers) ? null : logicAppReceivers)
- azureFunctionReceivers: (empty(azureFunctionReceivers) ? null : azureFunctionReceivers)
- armRoleReceivers: (empty(armRoleReceivers) ? null : armRoleReceivers)
- }
-}
-
-resource actionGroup_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(actionGroup.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: actionGroup
-}]
-
-@description('The resource group the action group was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the action group .')
-output name string = actionGroup.name
-
-@description('The resource ID of the action group .')
-output resourceId string = actionGroup.id
-
-@description('The location the resource was deployed into.')
-output location string = actionGroup.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/action-group/main.json b/modules/insights/action-group/main.json
deleted file mode 100644
index ac749fc55c..0000000000
--- a/modules/insights/action-group/main.json
+++ /dev/null
@@ -1,299 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17468299355631227280"
- },
- "name": "Action Groups",
- "description": "This module deploys an Action Group.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the action group."
- }
- },
- "groupShortName": {
- "type": "string",
- "metadata": {
- "description": "Required. The short name of the action group."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "emailReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of email receivers that are part of this action group."
- }
- },
- "smsReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of SMS receivers that are part of this action group."
- }
- },
- "webhookReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of webhook receivers that are part of this action group."
- }
- },
- "itsmReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of ITSM receivers that are part of this action group."
- }
- },
- "azureAppPushReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of AzureAppPush receivers that are part of this action group."
- }
- },
- "automationRunbookReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of AutomationRunbook receivers that are part of this action group."
- }
- },
- "voiceReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of voice receivers that are part of this action group."
- }
- },
- "logicAppReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of logic app receivers that are part of this action group."
- }
- },
- "azureFunctionReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of function receivers that are part of this action group."
- }
- },
- "armRoleReceivers": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "global",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "actionGroup": {
- "type": "Microsoft.Insights/actionGroups",
- "apiVersion": "2023-01-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "groupShortName": "[parameters('groupShortName')]",
- "enabled": "[parameters('enabled')]",
- "emailReceivers": "[if(empty(parameters('emailReceivers')), null(), parameters('emailReceivers'))]",
- "smsReceivers": "[if(empty(parameters('smsReceivers')), null(), parameters('smsReceivers'))]",
- "webhookReceivers": "[if(empty(parameters('webhookReceivers')), null(), parameters('webhookReceivers'))]",
- "itsmReceivers": "[if(empty(parameters('itsmReceivers')), null(), parameters('itsmReceivers'))]",
- "azureAppPushReceivers": "[if(empty(parameters('azureAppPushReceivers')), null(), parameters('azureAppPushReceivers'))]",
- "automationRunbookReceivers": "[if(empty(parameters('automationRunbookReceivers')), null(), parameters('automationRunbookReceivers'))]",
- "voiceReceivers": "[if(empty(parameters('voiceReceivers')), null(), parameters('voiceReceivers'))]",
- "logicAppReceivers": "[if(empty(parameters('logicAppReceivers')), null(), parameters('logicAppReceivers'))]",
- "azureFunctionReceivers": "[if(empty(parameters('azureFunctionReceivers')), null(), parameters('azureFunctionReceivers'))]",
- "armRoleReceivers": "[if(empty(parameters('armRoleReceivers')), null(), parameters('armRoleReceivers'))]"
- }
- },
- "actionGroup_roleAssignments": {
- "copy": {
- "name": "actionGroup_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/actionGroups/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/actionGroups', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "actionGroup"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the action group was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the action group ."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the action group ."
- },
- "value": "[resourceId('Microsoft.Insights/actionGroups', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('actionGroup', '2023-01-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/action-group/tests/e2e/defaults/main.test.bicep b/modules/insights/action-group/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 019b31bb3b..0000000000
--- a/modules/insights/action-group/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,50 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.actiongroups-${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 = 'iagmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- groupShortName: 'ag${serviceShort}001'
- }
-}]
diff --git a/modules/insights/action-group/tests/e2e/max/dependencies.bicep b/modules/insights/action-group/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/insights/action-group/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/action-group/tests/e2e/max/main.test.bicep b/modules/insights/action-group/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 55291588f1..0000000000
--- a/modules/insights/action-group/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.actiongroups-${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 = 'iagmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- groupShortName: 'ag${serviceShort}001'
- emailReceivers: [
- {
- emailAddress: 'test.user@testcompany.com'
- name: 'TestUser_-EmailAction-'
- useCommonAlertSchema: true
- }
- {
- emailAddress: 'test.user2@testcompany.com'
- name: 'TestUser2'
- useCommonAlertSchema: true
- }
- ]
- smsReceivers: [
- {
- countryCode: '1'
- name: 'TestUser_-SMSAction-'
- phoneNumber: '2345678901'
- }
- ]
- roleAssignments: [
- {
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Reader'
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/action-group/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/action-group/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/insights/action-group/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/action-group/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/action-group/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 33b5630927..0000000000
--- a/modules/insights/action-group/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,89 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.actiongroups-${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 = 'iagwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- groupShortName: 'ag${serviceShort}001'
- emailReceivers: [
- {
- emailAddress: 'test.user@testcompany.com'
- name: 'TestUser_-EmailAction-'
- useCommonAlertSchema: true
- }
- {
- emailAddress: 'test.user2@testcompany.com'
- name: 'TestUser2'
- useCommonAlertSchema: true
- }
- ]
- smsReceivers: [
- {
- countryCode: '1'
- name: 'TestUser_-SMSAction-'
- phoneNumber: '2345678901'
- }
- ]
- roleAssignments: [
- {
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- roleDefinitionIdOrName: 'Reader'
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/action-group/version.json b/modules/insights/action-group/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/action-group/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/activity-log-alert/README.md b/modules/insights/activity-log-alert/README.md
index b7efef2649..16025f553f 100644
--- a/modules/insights/activity-log-alert/README.md
+++ b/modules/insights/activity-log-alert/README.md
@@ -1,557 +1,7 @@
-# Activity Log Alerts `[Microsoft.Insights/activityLogAlerts]`
+
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`conditions`](#parameter-conditions) | array | An Array of objects containing conditions that will cause this alert to activate. Conditions can also be combined with logical operators `allOf` and `anyOf`. Each condition can specify only one field between `equals` and `containsAny`. An alert rule condition must have exactly one category (Administrative, ServiceHealth, ResourceHealth, Alert, Autoscale, Recommendation, Security, or Policy). |
-| [`name`](#parameter-name) | string | The name of the alert. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | The list of actions to take when alert triggers. |
-| [`alertDescription`](#parameter-alertdescription) | string | Description of the alert. |
-| [`enabled`](#parameter-enabled) | bool | Indicates whether this alert is enabled. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`scopes`](#parameter-scopes) | array | The list of resource IDs that this Activity Log Alert is scoped to. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `conditions`
-
-An Array of objects containing conditions that will cause this alert to activate. Conditions can also be combined with logical operators `allOf` and `anyOf`. Each condition can specify only one field between `equals` and `containsAny`. An alert rule condition must have exactly one category (Administrative, ServiceHealth, ResourceHealth, Alert, Autoscale, Recommendation, Security, or Policy).
-
-- Required: Yes
-- Type: array
-
-### Parameter: `name`
-
-The name of the alert.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actions`
-
-The list of actions to take when alert triggers.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `alertDescription`
-
-Description of the alert.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enabled`
-
-Indicates whether this alert is enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `'global'`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `scopes`
-
-The list of resource IDs that this Activity Log Alert is scoped to.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- '[subscription().id]'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the activity log alert. |
-| `resourceGroupName` | string | The resource group the activity log alert was deployed into. |
-| `resourceId` | string | The resource ID of the activity log alert. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/activity-log-alert/main.bicep b/modules/insights/activity-log-alert/main.bicep
deleted file mode 100644
index 86c5717716..0000000000
--- a/modules/insights/activity-log-alert/main.bicep
+++ /dev/null
@@ -1,129 +0,0 @@
-metadata name = 'Activity Log Alerts'
-metadata description = 'This module deploys an Activity Log Alert.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the alert.')
-param name string
-
-@description('Optional. Description of the alert.')
-param alertDescription string = ''
-
-@description('Optional. Location for all resources.')
-param location string = 'global'
-
-@description('Optional. Indicates whether this alert is enabled.')
-param enabled bool = true
-
-@description('Optional. The list of resource IDs that this Activity Log Alert is scoped to.')
-param scopes array = [
- subscription().id
-]
-
-@description('Optional. The list of actions to take when alert triggers.')
-param actions array = []
-
-@description('Required. An Array of objects containing conditions that will cause this alert to activate. Conditions can also be combined with logical operators `allOf` and `anyOf`. Each condition can specify only one field between `equals` and `containsAny`. An alert rule condition must have exactly one category (Administrative, ServiceHealth, ResourceHealth, Alert, Autoscale, Recommendation, Security, or Policy).')
-param conditions array
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var actionGroups = [for action in actions: {
- actionGroupId: contains(action, 'actionGroupId') ? action.actionGroupId : action
- webhookProperties: contains(action, 'webhookProperties') ? action.webhookProperties : null
-}]
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource activityLogAlert 'Microsoft.Insights/activityLogAlerts@2020-10-01' = {
- name: name
- location: location
- tags: tags
- properties: {
- scopes: scopes
- condition: {
- allOf: conditions
- }
- actions: {
- actionGroups: actionGroups
- }
- enabled: enabled
- description: alertDescription
- }
-}
-
-resource activityLogAlert_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(activityLogAlert.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: activityLogAlert
-}]
-
-@description('The name of the activity log alert.')
-output name string = activityLogAlert.name
-
-@description('The resource ID of the activity log alert.')
-output resourceId string = activityLogAlert.id
-
-@description('The resource group the activity log alert was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = activityLogAlert.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/activity-log-alert/main.json b/modules/insights/activity-log-alert/main.json
deleted file mode 100644
index 404dcfedae..0000000000
--- a/modules/insights/activity-log-alert/main.json
+++ /dev/null
@@ -1,259 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10623125824018281845"
- },
- "name": "Activity Log Alerts",
- "description": "This module deploys an Activity Log Alert.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the alert."
- }
- },
- "alertDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the alert."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "global",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates whether this alert is enabled."
- }
- },
- "scopes": {
- "type": "array",
- "defaultValue": [
- "[subscription().id]"
- ],
- "metadata": {
- "description": "Optional. The list of resource IDs that this Activity Log Alert is scoped to."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of actions to take when alert triggers."
- }
- },
- "conditions": {
- "type": "array",
- "metadata": {
- "description": "Required. An Array of objects containing conditions that will cause this alert to activate. Conditions can also be combined with logical operators `allOf` and `anyOf`. Each condition can specify only one field between `equals` and `containsAny`. An alert rule condition must have exactly one category (Administrative, ServiceHealth, ResourceHealth, Alert, Autoscale, Recommendation, Security, or Policy)."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "actionGroups",
- "count": "[length(parameters('actions'))]",
- "input": {
- "actionGroupId": "[if(contains(parameters('actions')[copyIndex('actionGroups')], 'actionGroupId'), parameters('actions')[copyIndex('actionGroups')].actionGroupId, parameters('actions')[copyIndex('actionGroups')])]",
- "webhookProperties": "[if(contains(parameters('actions')[copyIndex('actionGroups')], 'webhookProperties'), parameters('actions')[copyIndex('actionGroups')].webhookProperties, null())]"
- }
- }
- ],
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "activityLogAlert": {
- "type": "Microsoft.Insights/activityLogAlerts",
- "apiVersion": "2020-10-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "scopes": "[parameters('scopes')]",
- "condition": {
- "allOf": "[parameters('conditions')]"
- },
- "actions": {
- "actionGroups": "[variables('actionGroups')]"
- },
- "enabled": "[parameters('enabled')]",
- "description": "[parameters('alertDescription')]"
- }
- },
- "activityLogAlert_roleAssignments": {
- "copy": {
- "name": "activityLogAlert_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/activityLogAlerts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/activityLogAlerts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "activityLogAlert"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the activity log alert."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the activity log alert."
- },
- "value": "[resourceId('Microsoft.Insights/activityLogAlerts', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the activity log alert was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('activityLogAlert', '2020-10-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/activity-log-alert/tests/e2e/max/dependencies.bicep b/modules/insights/activity-log-alert/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index f031089363..0000000000
--- a/modules/insights/activity-log-alert/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,28 +0,0 @@
-@description('Required. The name of the Action Group to create.')
-param actionGroupName string
-
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource actionGroup 'Microsoft.Insights/actionGroups@2022-06-01' = {
- name: actionGroupName
- location: 'global'
- properties: {
- groupShortName: substring(replace(actionGroupName, '-', ''), 0, 11)
- enabled: true
- }
-}
-
-@description('The resource ID of the created Action Group.')
-output actionGroupResourceId string = actionGroup.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/activity-log-alert/tests/e2e/max/main.test.bicep b/modules/insights/activity-log-alert/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 09f337ec7c..0000000000
--- a/modules/insights/activity-log-alert/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,120 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.activityLogAlerts-${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 = 'ialamax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- conditions: [
- {
- field: 'category'
- equals: 'ServiceHealth'
- }
- {
- anyOf: [
- {
- field: 'properties.incidentType'
- equals: 'Incident'
- }
- {
- field: 'properties.incidentType'
- equals: 'Maintenance'
- }
- ]
- }
- {
- field: 'properties.impactedServices[*].ServiceName'
- containsAny: [
- 'Action Groups'
- 'Activity Logs & Alerts'
- ]
- }
- {
- field: 'properties.impactedServices[*].ImpactedRegions[*].RegionName'
- containsAny: [
- 'West Europe'
- 'Global'
- ]
- }
- ]
- actions: [
- {
- actionGroupId: nestedDependencies.outputs.actionGroupResourceId
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- scopes: [
- subscription().id
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/activity-log-alert/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/activity-log-alert/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index f031089363..0000000000
--- a/modules/insights/activity-log-alert/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,28 +0,0 @@
-@description('Required. The name of the Action Group to create.')
-param actionGroupName string
-
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource actionGroup 'Microsoft.Insights/actionGroups@2022-06-01' = {
- name: actionGroupName
- location: 'global'
- properties: {
- groupShortName: substring(replace(actionGroupName, '-', ''), 0, 11)
- enabled: true
- }
-}
-
-@description('The resource ID of the created Action Group.')
-output actionGroupResourceId string = actionGroup.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 4efeddccfe..0000000000
--- a/modules/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,103 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.activityLogAlerts-${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 = 'ialawaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- conditions: [
- {
- field: 'category'
- equals: 'ServiceHealth'
- }
- {
- anyOf: [
- {
- field: 'properties.incidentType'
- equals: 'Incident'
- }
- {
- field: 'properties.incidentType'
- equals: 'Maintenance'
- }
- ]
- }
- {
- field: 'properties.impactedServices[*].ServiceName'
- containsAny: [
- 'Action Groups'
- 'Activity Logs & Alerts'
- ]
- }
- {
- field: 'properties.impactedServices[*].ImpactedRegions[*].RegionName'
- containsAny: [
- 'West Europe'
- 'Global'
- ]
- }
- ]
- actions: [
- {
- actionGroupId: nestedDependencies.outputs.actionGroupResourceId
- }
- ]
- scopes: [
- subscription().id
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/activity-log-alert/version.json b/modules/insights/activity-log-alert/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/activity-log-alert/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/component/MOVED-TO-AVM.md b/modules/insights/component/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/insights/component/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/insights/component/README.md b/modules/insights/component/README.md
index 71509c45e5..ae617029d2 100644
--- a/modules/insights/component/README.md
+++ b/modules/insights/component/README.md
@@ -1,647 +1,7 @@
-# Application Insights `[Microsoft.Insights/components]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Application Insights. |
-| [`workspaceResourceId`](#parameter-workspaceresourceid) | string | Resource ID of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationType`](#parameter-applicationtype) | string | Application type. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`kind`](#parameter-kind) | string | The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`publicNetworkAccessForIngestion`](#parameter-publicnetworkaccessforingestion) | string | The network access type for accessing Application Insights ingestion. - Enabled or Disabled. |
-| [`publicNetworkAccessForQuery`](#parameter-publicnetworkaccessforquery) | string | The network access type for accessing Application Insights query. - Enabled or Disabled. |
-| [`retentionInDays`](#parameter-retentionindays) | int | Retention period in days. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`samplingPercentage`](#parameter-samplingpercentage) | int | Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `name`
-
-Name of the Application Insights.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `workspaceResourceId`
-
-Resource ID of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `applicationType`
-
-Application type.
-
-- Required: No
-- Type: string
-- Default: `'web'`
-- Allowed:
- ```Bicep
- [
- 'other'
- 'web'
- ]
- ```
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `kind`
-
-The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `publicNetworkAccessForIngestion`
-
-The network access type for accessing Application Insights ingestion. - Enabled or Disabled.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `publicNetworkAccessForQuery`
-
-The network access type for accessing Application Insights query. - Enabled or Disabled.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `retentionInDays`
-
-Retention period in days.
-
-- Required: No
-- Type: int
-- Default: `365`
-- Allowed:
- ```Bicep
- [
- 30
- 60
- 90
- 120
- 180
- 270
- 365
- 550
- 730
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `samplingPercentage`
-
-Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry.
-
-- Required: No
-- Type: int
-- Default: `100`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `applicationId` | string | The application ID of the application insights component. |
-| `instrumentationKey` | string | Application Insights Instrumentation key. A read-only value that applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction of each new Application Insights component. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the application insights component. |
-| `resourceGroupName` | string | The resource group the application insights component was deployed into. |
-| `resourceId` | string | The resource ID of the application insights component. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/component/main.bicep b/modules/insights/component/main.bicep
deleted file mode 100644
index 801e9eb20a..0000000000
--- a/modules/insights/component/main.bicep
+++ /dev/null
@@ -1,223 +0,0 @@
-metadata name = 'Application Insights'
-metadata description = 'This component deploys an Application Insights instance.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Application Insights.')
-param name string
-
-@description('Optional. Application type.')
-@allowed([
- 'web'
- 'other'
-])
-param applicationType string = 'web'
-
-@description('Required. Resource ID of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property.')
-param workspaceResourceId string
-
-@description('Optional. The network access type for accessing Application Insights ingestion. - Enabled or Disabled.')
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccessForIngestion string = 'Enabled'
-
-@description('Optional. The network access type for accessing Application Insights query. - Enabled or Disabled.')
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccessForQuery string = 'Enabled'
-
-@description('Optional. Retention period in days.')
-@allowed([
- 30
- 60
- 90
- 120
- 180
- 270
- 365
- 550
- 730
-])
-param retentionInDays int = 365
-
-@description('Optional. Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry.')
-@minValue(0)
-@maxValue(100)
-param samplingPercentage int = 100
-
-@description('Optional. The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone.')
-param kind string = ''
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: name
- location: location
- tags: tags
- kind: kind
- properties: {
- Application_Type: applicationType
- WorkspaceResourceId: workspaceResourceId
- publicNetworkAccessForIngestion: publicNetworkAccessForIngestion
- publicNetworkAccessForQuery: publicNetworkAccessForQuery
- RetentionInDays: retentionInDays
- SamplingPercentage: samplingPercentage
- }
-}
-
-resource appInsights_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(appInsights.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: appInsights
-}]
-
-resource appInsights_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: appInsights
-}]
-@description('The name of the application insights component.')
-output name string = appInsights.name
-
-@description('The resource ID of the application insights component.')
-output resourceId string = appInsights.id
-
-@description('The resource group the application insights component was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The application ID of the application insights component.')
-output applicationId string = appInsights.properties.AppId
-
-@description('The location the resource was deployed into.')
-output location string = appInsights.location
-
-@description('Application Insights Instrumentation key. A read-only value that applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction of each new Application Insights component.')
-output instrumentationKey string = appInsights.properties.InstrumentationKey
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/insights/component/main.json b/modules/insights/component/main.json
deleted file mode 100644
index 8e8789fea1..0000000000
--- a/modules/insights/component/main.json
+++ /dev/null
@@ -1,433 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16117162182230487170"
- },
- "name": "Application Insights",
- "description": "This component deploys an Application Insights instance.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Application Insights."
- }
- },
- "applicationType": {
- "type": "string",
- "defaultValue": "web",
- "allowedValues": [
- "web",
- "other"
- ],
- "metadata": {
- "description": "Optional. Application type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property."
- }
- },
- "publicNetworkAccessForIngestion": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. The network access type for accessing Application Insights ingestion. - Enabled or Disabled."
- }
- },
- "publicNetworkAccessForQuery": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. The network access type for accessing Application Insights query. - Enabled or Disabled."
- }
- },
- "retentionInDays": {
- "type": "int",
- "defaultValue": 365,
- "allowedValues": [
- 30,
- 60,
- 90,
- 120,
- 180,
- 270,
- 365,
- 550,
- 730
- ],
- "metadata": {
- "description": "Optional. Retention period in days."
- }
- },
- "samplingPercentage": {
- "type": "int",
- "defaultValue": 100,
- "minValue": 0,
- "maxValue": 100,
- "metadata": {
- "description": "Optional. Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "appInsights": {
- "type": "Microsoft.Insights/components",
- "apiVersion": "2020-02-02",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "kind": "[parameters('kind')]",
- "properties": {
- "Application_Type": "[parameters('applicationType')]",
- "WorkspaceResourceId": "[parameters('workspaceResourceId')]",
- "publicNetworkAccessForIngestion": "[parameters('publicNetworkAccessForIngestion')]",
- "publicNetworkAccessForQuery": "[parameters('publicNetworkAccessForQuery')]",
- "RetentionInDays": "[parameters('retentionInDays')]",
- "SamplingPercentage": "[parameters('samplingPercentage')]"
- }
- },
- "appInsights_roleAssignments": {
- "copy": {
- "name": "appInsights_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/components/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/components', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "appInsights"
- ]
- },
- "appInsights_diagnosticSettings": {
- "copy": {
- "name": "appInsights_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Insights/components/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "appInsights"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the application insights component."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the application insights component."
- },
- "value": "[resourceId('Microsoft.Insights/components', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the application insights component was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "applicationId": {
- "type": "string",
- "metadata": {
- "description": "The application ID of the application insights component."
- },
- "value": "[reference('appInsights').AppId]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('appInsights', '2020-02-02', 'full').location]"
- },
- "instrumentationKey": {
- "type": "string",
- "metadata": {
- "description": "Application Insights Instrumentation key. A read-only value that applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction of each new Application Insights component."
- },
- "value": "[reference('appInsights').InstrumentationKey]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/component/tests/e2e/defaults/dependencies.bicep b/modules/insights/component/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index cc24476629..0000000000
--- a/modules/insights/component/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
diff --git a/modules/insights/component/tests/e2e/defaults/main.test.bicep b/modules/insights/component/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 2c505a853f..0000000000
--- a/modules/insights/component/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,58 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.components-${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 = 'icmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- workspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
-}]
diff --git a/modules/insights/component/tests/e2e/max/dependencies.bicep b/modules/insights/component/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/insights/component/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/component/tests/e2e/max/main.test.bicep b/modules/insights/component/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 69e8998fab..0000000000
--- a/modules/insights/component/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,98 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.components-${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 = 'icmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/component/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/component/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/insights/component/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/component/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/component/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index e1940171ae..0000000000
--- a/modules/insights/component/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,98 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.components-${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 = 'icwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/component/version.json b/modules/insights/component/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/component/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/data-collection-endpoint/MOVED-TO-AVM.md b/modules/insights/data-collection-endpoint/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/insights/data-collection-endpoint/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/insights/data-collection-endpoint/README.md b/modules/insights/data-collection-endpoint/README.md
index 48b0cc4d25..ad2d3249d0 100644
--- a/modules/insights/data-collection-endpoint/README.md
+++ b/modules/insights/data-collection-endpoint/README.md
@@ -1,489 +1,7 @@
-# Data Collection Endpoints `[Microsoft.Insights/dataCollectionEndpoints]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the data collection endpoint. The name is case insensitive. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`kind`](#parameter-kind) | string | The kind of the resource. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | The configuration to set whether network access from public internet to the endpoints are allowed. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `name`
-
-The name of the data collection endpoint. The name is case insensitive.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `kind`
-
-The kind of the resource.
-
-- Required: No
-- Type: string
-- Default: `'Linux'`
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `publicNetworkAccess`
-
-The configuration to set whether network access from public internet to the endpoints are allowed.
-
-- Required: No
-- Type: string
-- Default: `'Disabled'`
-- Allowed:
- ```Bicep
- [
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the dataCollectionEndpoint. |
-| `resourceGroupName` | string | The name of the resource group the dataCollectionEndpoint was created in. |
-| `resourceId` | string | The resource ID of the dataCollectionEndpoint. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/data-collection-endpoint/main.bicep b/modules/insights/data-collection-endpoint/main.bicep
deleted file mode 100644
index b4f4003adb..0000000000
--- a/modules/insights/data-collection-endpoint/main.bicep
+++ /dev/null
@@ -1,149 +0,0 @@
-metadata name = 'Data Collection Endpoints'
-metadata description = 'This module deploys a Data Collection Endpoint.'
-metadata owner = 'Azure/module-maintainers'
-
-// ============== //
-// Parameters //
-// ============== //
-
-@description('Required. The name of the data collection endpoint. The name is case insensitive.')
-param name string
-
-@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. The kind of the resource.')
-@allowed([
- 'Linux'
- 'Windows'
-])
-param kind string = 'Linux'
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The configuration to set whether network access from public internet to the endpoints are allowed.')
-@allowed([
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = 'Disabled'
-
-@description('Optional. Resource tags.')
-param tags object?
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-// =============== //
-// Deployments //
-// =============== //
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource dataCollectionEndpoint 'Microsoft.Insights/dataCollectionEndpoints@2021-04-01' = {
- kind: kind
- location: location
- name: name
- tags: tags
- properties: {
- networkAcls: {
- publicNetworkAccess: publicNetworkAccess
- }
- }
-}
-
-resource dataCollectionEndpoint_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: dataCollectionEndpoint
-}
-
-resource dataCollectionEndpoint_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(dataCollectionEndpoint.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: dataCollectionEndpoint
-}]
-
-// =========== //
-// Outputs //
-// =========== //
-
-@description('The name of the dataCollectionEndpoint.')
-output name string = dataCollectionEndpoint.name
-
-@description('The resource ID of the dataCollectionEndpoint.')
-output resourceId string = dataCollectionEndpoint.id
-
-@description('The name of the resource group the dataCollectionEndpoint was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = dataCollectionEndpoint.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/data-collection-endpoint/main.json b/modules/insights/data-collection-endpoint/main.json
deleted file mode 100644
index fbababc42e..0000000000
--- a/modules/insights/data-collection-endpoint/main.json
+++ /dev/null
@@ -1,275 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15918286561058568413"
- },
- "name": "Data Collection Endpoints",
- "description": "This module deploys a Data Collection Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the data collection endpoint. The name is case insensitive."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "Linux",
- "allowedValues": [
- "Linux",
- "Windows"
- ],
- "metadata": {
- "description": "Optional. The kind of the resource."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "Disabled",
- "allowedValues": [
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. The configuration to set whether network access from public internet to the endpoints are allowed."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "dataCollectionEndpoint": {
- "type": "Microsoft.Insights/dataCollectionEndpoints",
- "apiVersion": "2021-04-01",
- "name": "[parameters('name')]",
- "kind": "[parameters('kind')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "networkAcls": {
- "publicNetworkAccess": "[parameters('publicNetworkAccess')]"
- }
- }
- },
- "dataCollectionEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Insights/dataCollectionEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "dataCollectionEndpoint"
- ]
- },
- "dataCollectionEndpoint_roleAssignments": {
- "copy": {
- "name": "dataCollectionEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/dataCollectionEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/dataCollectionEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "dataCollectionEndpoint"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the dataCollectionEndpoint."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the dataCollectionEndpoint."
- },
- "value": "[resourceId('Microsoft.Insights/dataCollectionEndpoints', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the dataCollectionEndpoint was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('dataCollectionEndpoint', '2021-04-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep b/modules/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 9d0759239d..0000000000
--- a/modules/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionEndpoints-${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 = 'idcemin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/insights/data-collection-endpoint/tests/e2e/max/dependencies.bicep b/modules/insights/data-collection-endpoint/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index d16e1031b1..0000000000
--- a/modules/insights/data-collection-endpoint/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep b/modules/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 3cc4c9c606..0000000000
--- a/modules/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,75 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionEndpoints-${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 = 'idcemax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module resourceGroupResources 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- publicNetworkAccess: 'Enabled'
- kind: 'Windows'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: resourceGroupResources.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Data Collection Rules'
- kind: 'Windows'
- }
- }
-}]
diff --git a/modules/insights/data-collection-endpoint/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/data-collection-endpoint/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index d16e1031b1..0000000000
--- a/modules/insights/data-collection-endpoint/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index db4a6e31a0..0000000000
--- a/modules/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,75 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionEndpoints-${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 = 'idcewaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// Deployments //
-// =========== //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module resourceGroupResources 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-paramNested'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- publicNetworkAccess: 'Enabled'
- kind: 'Windows'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: resourceGroupResources.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'Data Collection Rules'
- kind: 'Windows'
- }
- }
-}]
diff --git a/modules/insights/data-collection-endpoint/version.json b/modules/insights/data-collection-endpoint/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/data-collection-endpoint/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/data-collection-rule/README.md b/modules/insights/data-collection-rule/README.md
index ea8e8c8b8b..11a1247e80 100644
--- a/modules/insights/data-collection-rule/README.md
+++ b/modules/insights/data-collection-rule/README.md
@@ -1,1734 +1,7 @@
-# Data Collection Rules `[Microsoft.Insights/dataCollectionRules]`
+
-
-
-
-### Example 2: _Custombasic_
-
-
-
-
-
-### Example 3: _Customiis_
-
-
-
-
-
-### Example 4: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-
-
-
-
-### Example 5: _Linux_
-
-
-
-
-
-### Example 6: _Windows_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dataFlows`](#parameter-dataflows) | array | The specification of data flows. |
-| [`dataSources`](#parameter-datasources) | object | Specification of data sources that will be collected. |
-| [`destinations`](#parameter-destinations) | object | Specification of destinations that can be used in data flows. |
-| [`name`](#parameter-name) | string | The name of the data collection rule. The name is case insensitive. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`dataCollectionEndpointId`](#parameter-datacollectionendpointid) | string | The resource ID of the data collection endpoint that this rule can be used with. |
-| [`description`](#parameter-description) | string | Description of the data collection rule. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via the Customer Usage Attribution ID (GUID). |
-| [`kind`](#parameter-kind) | string | The kind of the resource. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`streamDeclarations`](#parameter-streamdeclarations) | object | Declaration of custom streams used in this rule. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `dataFlows`
-
-The specification of data flows.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `dataSources`
-
-Specification of data sources that will be collected.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `destinations`
-
-Specification of destinations that can be used in data flows.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-The name of the data collection rule. The name is case insensitive.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `dataCollectionEndpointId`
-
-The resource ID of the data collection endpoint that this rule can be used with.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `description`
-
-Description of the data collection rule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via the Customer Usage Attribution ID (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `kind`
-
-The kind of the resource.
-
-- Required: No
-- Type: string
-- Default: `'Linux'`
-- Allowed:
- ```Bicep
- [
- 'Linux'
- 'Windows'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `streamDeclarations`
-
-Declaration of custom streams used in this rule.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the dataCollectionRule. |
-| `resourceGroupName` | string | The name of the resource group the dataCollectionRule was created in. |
-| `resourceId` | string | The resource ID of the dataCollectionRule. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/data-collection-rule/main.bicep b/modules/insights/data-collection-rule/main.bicep
deleted file mode 100644
index e5086019f1..0000000000
--- a/modules/insights/data-collection-rule/main.bicep
+++ /dev/null
@@ -1,163 +0,0 @@
-metadata name = 'Data Collection Rules'
-metadata description = 'This module deploys a Data Collection Rule.'
-metadata owner = 'Azure/module-maintainers'
-
-// ============== //
-// Parameters //
-// ============== //
-
-@sys.description('Required. The name of the data collection rule. The name is case insensitive.')
-param name string
-
-@sys.description('Optional. The resource ID of the data collection endpoint that this rule can be used with.')
-param dataCollectionEndpointId string = ''
-
-@sys.description('Required. The specification of data flows.')
-param dataFlows array
-
-@sys.description('Required. Specification of data sources that will be collected.')
-param dataSources object
-
-@sys.description('Optional. Description of the data collection rule.')
-param description string = ''
-
-@sys.description('Required. Specification of destinations that can be used in data flows.')
-param destinations object
-
-@sys.description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. The kind of the resource.')
-@allowed([
- 'Linux'
- 'Windows'
-])
-param kind string = 'Linux'
-
-@sys.description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. The lock settings of the service.')
-param lock lockType
-
-@sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@sys.description('Optional. Declaration of custom streams used in this rule.')
-param streamDeclarations object = {}
-
-@sys.description('Optional. Resource tags.')
-param tags object?
-
-// =============== //
-// Deployments //
-// =============== //
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource dataCollectionRule 'Microsoft.Insights/dataCollectionRules@2021-09-01-preview' = {
- kind: kind
- location: location
- name: name
- tags: tags
- properties: {
- dataSources: dataSources
- destinations: destinations
- dataFlows: dataFlows
- dataCollectionEndpointId: !empty(dataCollectionEndpointId) ? dataCollectionEndpointId : null
- streamDeclarations: !empty(streamDeclarations) ? streamDeclarations : null
- description: !empty(description) ? description : null
- }
-}
-
-resource dataCollectionRule_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: dataCollectionRule
-}
-
-resource dataCollectionRule_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(dataCollectionRule.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: dataCollectionRule
-}]
-
-// =========== //
-// Outputs //
-// =========== //
-
-@sys.description('The name of the dataCollectionRule.')
-output name string = dataCollectionRule.name
-
-@sys.description('The resource ID of the dataCollectionRule.')
-output resourceId string = dataCollectionRule.id
-
-@sys.description('The name of the resource group the dataCollectionRule was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The location the resource was deployed into.')
-output location string = dataCollectionRule.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @sys.description('Optional. Specify the name of lock.')
- name: string?
-
- @sys.description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/data-collection-rule/main.json b/modules/insights/data-collection-rule/main.json
deleted file mode 100644
index f35574da13..0000000000
--- a/modules/insights/data-collection-rule/main.json
+++ /dev/null
@@ -1,306 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10935624485627515874"
- },
- "name": "Data Collection Rules",
- "description": "This module deploys a Data Collection Rule.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the data collection rule. The name is case insensitive."
- }
- },
- "dataCollectionEndpointId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the data collection endpoint that this rule can be used with."
- }
- },
- "dataFlows": {
- "type": "array",
- "metadata": {
- "description": "Required. The specification of data flows."
- }
- },
- "dataSources": {
- "type": "object",
- "metadata": {
- "description": "Required. Specification of data sources that will be collected."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the data collection rule."
- }
- },
- "destinations": {
- "type": "object",
- "metadata": {
- "description": "Required. Specification of destinations that can be used in data flows."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via the Customer Usage Attribution ID (GUID)."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "Linux",
- "allowedValues": [
- "Linux",
- "Windows"
- ],
- "metadata": {
- "description": "Optional. The kind of the resource."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "streamDeclarations": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Declaration of custom streams used in this rule."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "dataCollectionRule": {
- "type": "Microsoft.Insights/dataCollectionRules",
- "apiVersion": "2021-09-01-preview",
- "name": "[parameters('name')]",
- "kind": "[parameters('kind')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "dataSources": "[parameters('dataSources')]",
- "destinations": "[parameters('destinations')]",
- "dataFlows": "[parameters('dataFlows')]",
- "dataCollectionEndpointId": "[if(not(empty(parameters('dataCollectionEndpointId'))), parameters('dataCollectionEndpointId'), null())]",
- "streamDeclarations": "[if(not(empty(parameters('streamDeclarations'))), parameters('streamDeclarations'), null())]",
- "description": "[if(not(empty(parameters('description'))), parameters('description'), null())]"
- }
- },
- "dataCollectionRule_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Insights/dataCollectionRules/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "dataCollectionRule"
- ]
- },
- "dataCollectionRule_roleAssignments": {
- "copy": {
- "name": "dataCollectionRule_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/dataCollectionRules/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/dataCollectionRules', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "dataCollectionRule"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the dataCollectionRule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the dataCollectionRule."
- },
- "value": "[resourceId('Microsoft.Insights/dataCollectionRules', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the dataCollectionRule was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('dataCollectionRule', '2021-09-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/data-collection-rule/tests/e2e/customadv/dependencies.bicep b/modules/insights/data-collection-rule/tests/e2e/customadv/dependencies.bicep
deleted file mode 100644
index e31386a910..0000000000
--- a/modules/insights/data-collection-rule/tests/e2e/customadv/dependencies.bicep
+++ /dev/null
@@ -1,79 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the data collection endpoint to create.')
-param dataCollectionEndpointName string
-
-@description('Required. The name of the log analytics workspace to create.')
-param logAnalyticsWorkspaceName string
-
-@description('Required. The name of the managed identity to create.')
-param managedIdentityName string
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-
- resource customTableAdvanced 'tables@2022-10-01' = {
- name: 'CustomTableAdvanced_CL'
- properties: {
- schema: {
- name: 'CustomTableAdvanced_CL'
- columns: [
- {
- name: 'TimeGenerated'
- type: 'DateTime'
- }
- {
- name: 'EventTime'
- type: 'DateTime'
- }
- {
- name: 'EventLevel'
- type: 'String'
- }
- {
- name: 'EventCode'
- type: 'Int'
- }
- {
- name: 'Message'
- type: 'String'
- }
- {
- name: 'RawData'
- type: 'String'
- }
- ]
- }
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource dataCollectionEndpoint 'Microsoft.Insights/dataCollectionEndpoints@2021-04-01' = {
- kind: 'Windows'
- location: location
- name: dataCollectionEndpointName
- properties: {
- networkAcls: {
- publicNetworkAccess: 'Enabled'
- }
- }
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
-
-@description('The name of the deployed log analytics workspace.')
-output logAnalyticsWorkspaceName string = logAnalyticsWorkspace.name
-
-@description('The principal ID of the created managed identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Data Collection Endpoint.')
-output dataCollectionEndpointResourceId string = dataCollectionEndpoint.id
diff --git a/modules/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep b/modules/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep
deleted file mode 100644
index df94e99d0e..0000000000
--- a/modules/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep
+++ /dev/null
@@ -1,145 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${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 = 'idcrcusadv'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// =========== //
-// 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: {
- dataCollectionEndpointName: 'dep-${namePrefix}-dce-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- dataCollectionEndpointId: resourceGroupResources.outputs.dataCollectionEndpointResourceId
- description: 'Collecting custom text logs with ingestion-time transformation to columns. Expected format of a log line (comma separated values): "
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-eventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-eventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`logAnalyticsDestinationType`](#parameter-loganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-logcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-marketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-metriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-name) | string | Name of the Diagnostic settings. |
-| [`storageAccountResourceId`](#parameter-storageaccountresourceid) | string | Resource ID of the diagnostic storage account. |
-| [`workspaceResourceId`](#parameter-workspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. |
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category.
-
-- Required: No
-- Type: string
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`category`](#parameter-logcategoriesandgroupscategory) | string | Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here. |
-| [`categoryGroup`](#parameter-logcategoriesandgroupscategorygroup) | string | Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs. |
-
-### Parameter: `logCategoriesAndGroups.category`
-
-Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
-
-- Required: No
-- Type: string
-
-### Parameter: `logCategoriesAndGroups.categoryGroup`
-
-Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`category`](#parameter-metriccategoriescategory) | string | Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics. |
-
-### Parameter: `metricCategories.category`
-
-Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the Diagnostic settings.
-
-- Required: No
-- Type: string
-- Default: `[format('{0}-diagnosticSettings', uniqueString(subscription().id))]`
-
-### Parameter: `storageAccountResourceId`
-
-Resource ID of the diagnostic storage account.
-
-- Required: No
-- Type: string
-
-### Parameter: `workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace.
-
-- Required: No
-- Type: string
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the diagnostic settings. |
-| `resourceId` | string | The resource ID of the diagnostic settings. |
-| `subscriptionName` | string | The name of the subscription to deploy into. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/diagnostic-setting/main.bicep b/modules/insights/diagnostic-setting/main.bicep
deleted file mode 100644
index 1022dca764..0000000000
--- a/modules/insights/diagnostic-setting/main.bicep
+++ /dev/null
@@ -1,111 +0,0 @@
-metadata name = 'Diagnostic Settings (Activity Logs) for Azure Subscriptions'
-metadata description = 'This module deploys a Subscription wide export of the Activity Log.'
-metadata owner = 'Azure/module-maintainers'
-
-targetScope = 'subscription'
-
-@description('Optional. Name of the Diagnostic settings.')
-@minLength(1)
-@maxLength(260)
-param name string = '${uniqueString(subscription().id)}-diagnosticSettings'
-
-@description('Optional. Resource ID of the diagnostic storage account.')
-param storageAccountResourceId string?
-
-@description('Optional. Resource ID of the diagnostic log analytics workspace.')
-param workspaceResourceId string?
-
-@description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
-param eventHubAuthorizationRuleResourceId string?
-
-@description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category.')
-param eventHubName string?
-
-@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
-param logCategoriesAndGroups logCategoriesAndGroupsType
-
-@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
-param metricCategories metricCategoriesType?
-
-@description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
-@allowed([
- ''
- 'Dedicated'
- 'AzureDiagnostics'
-])
-param logAnalyticsDestinationType string = ''
-
-@description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
-param marketplacePartnerResourceId string?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Location deployment metadata.')
-param location string = deployment().location
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- location: location
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource diagnosticSetting 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
- name: name
- properties: {
- storageAccountId: storageAccountResourceId
- workspaceId: workspaceResourceId
- eventHubAuthorizationRuleId: eventHubAuthorizationRuleResourceId
- eventHubName: eventHubName
- logAnalyticsDestinationType: !empty(logAnalyticsDestinationType) ? logAnalyticsDestinationType : null
- marketplacePartnerId: marketplacePartnerResourceId
- logs: logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- metrics: metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- }
-}
-
-@description('The name of the diagnostic settings.')
-output name string = diagnosticSetting.name
-
-@description('The resource ID of the diagnostic settings.')
-output resourceId string = diagnosticSetting.id
-
-@description('The name of the subscription to deploy into.')
-output subscriptionName string = subscription().displayName
-
-// =============== //
-// Definitions //
-// =============== //
-
-@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
-type logCategoriesAndGroupsType = {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
-}[]?
-
-@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
-type metricCategoriesType = {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
-}[]?
diff --git a/modules/insights/diagnostic-setting/main.json b/modules/insights/diagnostic-setting/main.json
deleted file mode 100644
index 15e8e5876f..0000000000
--- a/modules/insights/diagnostic-setting/main.json
+++ /dev/null
@@ -1,201 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14463307770250978710"
- },
- "name": "Diagnostic Settings (Activity Logs) for Azure Subscriptions",
- "description": "This module deploys a Subscription wide export of the Activity Log.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "logCategoriesAndGroupsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategoriesType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[format('{0}-diagnosticSettings', uniqueString(subscription().id))]",
- "minLength": 1,
- "maxLength": 260,
- "metadata": {
- "description": "Optional. Name of the Diagnostic settings."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category."
- }
- },
- "logCategoriesAndGroups": {
- "$ref": "#/definitions/logCategoriesAndGroupsType",
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "$ref": "#/definitions/metricCategoriesType",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Dedicated",
- "AzureDiagnostics"
- ],
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[deployment().location]",
- "metadata": {
- "description": "Optional. Location deployment metadata."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "location": "[parameters('location')]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "diagnosticSetting": {
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "name": "[parameters('name')]",
- "properties": {
- "storageAccountId": "[parameters('storageAccountResourceId')]",
- "workspaceId": "[parameters('workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[parameters('eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[parameters('eventHubName')]",
- "logAnalyticsDestinationType": "[if(not(empty(parameters('logAnalyticsDestinationType'))), parameters('logAnalyticsDestinationType'), null())]",
- "marketplacePartnerId": "[parameters('marketplacePartnerResourceId')]",
- "logs": "[coalesce(parameters('logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "metrics": "[coalesce(parameters('metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]"
- }
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the diagnostic settings."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the diagnostic settings."
- },
- "value": "[subscriptionResourceId('Microsoft.Insights/diagnosticSettings', parameters('name'))]"
- },
- "subscriptionName": {
- "type": "string",
- "metadata": {
- "description": "The name of the subscription to deploy into."
- },
- "value": "[subscription().displayName]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/diagnostic-setting/tests/e2e/max/main.test.bicep b/modules/insights/diagnostic-setting/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 82001d753f..0000000000
--- a/modules/insights/diagnostic-setting/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,71 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-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 = 'idsmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
-}]
diff --git a/modules/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index a84b3f82bc..0000000000
--- a/modules/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,71 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-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 = 'idswaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
-}]
diff --git a/modules/insights/diagnostic-setting/version.json b/modules/insights/diagnostic-setting/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/diagnostic-setting/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/metric-alert/README.md b/modules/insights/metric-alert/README.md
index 4a80c79593..0985b6e3cd 100644
--- a/modules/insights/metric-alert/README.md
+++ b/modules/insights/metric-alert/README.md
@@ -1,590 +1,7 @@
-# Metric Alerts `[Microsoft.Insights/metricAlerts]`
+
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`criterias`](#parameter-criterias) | array | Criterias to trigger the alert. Array of 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' or 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria' objects. When using MultipleResourceMultipleMetricCriteria criteria type, some parameters becomes mandatory. It is not possible to convert from SingleResourceMultipleMetricCriteria to MultipleResourceMultipleMetricCriteria. The alert must be deleted and recreated. |
-| [`name`](#parameter-name) | string | The name of the alert. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`targetResourceRegion`](#parameter-targetresourceregion) | string | The region of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria. |
-| [`targetResourceType`](#parameter-targetresourcetype) | string | The resource type of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | The list of actions to take when alert triggers. |
-| [`alertCriteriaType`](#parameter-alertcriteriatype) | string | Maps to the 'odata.type' field. Specifies the type of the alert criteria. |
-| [`alertDescription`](#parameter-alertdescription) | string | Description of the alert. |
-| [`autoMitigate`](#parameter-automitigate) | bool | The flag that indicates whether the alert should be auto resolved or not. |
-| [`enabled`](#parameter-enabled) | bool | Indicates whether this alert is enabled. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`evaluationFrequency`](#parameter-evaluationfrequency) | string | how often the metric alert is evaluated represented in ISO 8601 duration format. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`scopes`](#parameter-scopes) | array | the list of resource IDs that this metric alert is scoped to. |
-| [`severity`](#parameter-severity) | int | The severity of the alert. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`windowSize`](#parameter-windowsize) | string | the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. |
-
-### Parameter: `criterias`
-
-Criterias to trigger the alert. Array of 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' or 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria' objects. When using MultipleResourceMultipleMetricCriteria criteria type, some parameters becomes mandatory. It is not possible to convert from SingleResourceMultipleMetricCriteria to MultipleResourceMultipleMetricCriteria. The alert must be deleted and recreated.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `name`
-
-The name of the alert.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `targetResourceRegion`
-
-The region of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `targetResourceType`
-
-The resource type of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `actions`
-
-The list of actions to take when alert triggers.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `alertCriteriaType`
-
-Maps to the 'odata.type' field. Specifies the type of the alert criteria.
-
-- Required: No
-- Type: string
-- Default: `'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'`
-- Allowed:
- ```Bicep
- [
- 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
- 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria'
- 'Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria'
- ]
- ```
-
-### Parameter: `alertDescription`
-
-Description of the alert.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `autoMitigate`
-
-The flag that indicates whether the alert should be auto resolved or not.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enabled`
-
-Indicates whether this alert is enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `evaluationFrequency`
-
-how often the metric alert is evaluated represented in ISO 8601 duration format.
-
-- Required: No
-- Type: string
-- Default: `'PT5M'`
-- Allowed:
- ```Bicep
- [
- 'PT15M'
- 'PT1H'
- 'PT1M'
- 'PT30M'
- 'PT5M'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `'global'`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `scopes`
-
-the list of resource IDs that this metric alert is scoped to.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- '[subscription().id]'
- ]
- ```
-
-### Parameter: `severity`
-
-The severity of the alert.
-
-- Required: No
-- Type: int
-- Default: `3`
-- Allowed:
- ```Bicep
- [
- 0
- 1
- 2
- 3
- 4
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `windowSize`
-
-the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
-
-- Required: No
-- Type: string
-- Default: `'PT15M'`
-- Allowed:
- ```Bicep
- [
- 'P1D'
- 'PT12H'
- 'PT15M'
- 'PT1H'
- 'PT1M'
- 'PT30M'
- 'PT5M'
- 'PT6H'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the metric alert. |
-| `resourceGroupName` | string | The resource group the metric alert was deployed into. |
-| `resourceId` | string | The resource ID of the metric alert. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/metric-alert/main.bicep b/modules/insights/metric-alert/main.bicep
deleted file mode 100644
index 9ac5667d66..0000000000
--- a/modules/insights/metric-alert/main.bicep
+++ /dev/null
@@ -1,184 +0,0 @@
-metadata name = 'Metric Alerts'
-metadata description = 'This module deploys a Metric Alert.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the alert.')
-param name string
-
-@description('Optional. Description of the alert.')
-param alertDescription string = ''
-
-@description('Optional. Location for all resources.')
-param location string = 'global'
-
-@description('Optional. Indicates whether this alert is enabled.')
-param enabled bool = true
-
-@description('Optional. The severity of the alert.')
-@allowed([
- 0
- 1
- 2
- 3
- 4
-])
-param severity int = 3
-
-@description('Optional. how often the metric alert is evaluated represented in ISO 8601 duration format.')
-@allowed([
- 'PT1M'
- 'PT5M'
- 'PT15M'
- 'PT30M'
- 'PT1H'
-])
-param evaluationFrequency string = 'PT5M'
-
-@description('Optional. the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.')
-@allowed([
- 'PT1M'
- 'PT5M'
- 'PT15M'
- 'PT30M'
- 'PT1H'
- 'PT6H'
- 'PT12H'
- 'P1D'
-])
-param windowSize string = 'PT15M'
-
-@description('Optional. the list of resource IDs that this metric alert is scoped to.')
-param scopes array = [
- subscription().id
-]
-
-@description('Conditional. The resource type of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria.')
-param targetResourceType string = ''
-
-@description('Conditional. The region of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria.')
-param targetResourceRegion string = ''
-
-@description('Optional. The flag that indicates whether the alert should be auto resolved or not.')
-param autoMitigate bool = true
-
-@description('Optional. The list of actions to take when alert triggers.')
-param actions array = []
-
-@description('Optional. Maps to the \'odata.type\' field. Specifies the type of the alert criteria.')
-@allowed([
- 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria'
- 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
- 'Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria'
-])
-param alertCriteriaType string = 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
-
-@description('Required. Criterias to trigger the alert. Array of \'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\' or \'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\' objects. When using MultipleResourceMultipleMetricCriteria criteria type, some parameters becomes mandatory. It is not possible to convert from SingleResourceMultipleMetricCriteria to MultipleResourceMultipleMetricCriteria. The alert must be deleted and recreated.')
-param criterias array
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var actionGroups = [for action in actions: {
- actionGroupId: contains(action, 'actionGroupId') ? action.actionGroupId : action
- webHookProperties: contains(action, 'webHookProperties') ? action.webHookProperties : null
-}]
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource metricAlert 'Microsoft.Insights/metricAlerts@2018-03-01' = {
- name: name
- location: location
- tags: tags
- properties: {
- description: alertDescription
- severity: severity
- enabled: enabled
- scopes: scopes
- evaluationFrequency: evaluationFrequency
- windowSize: windowSize
- targetResourceType: targetResourceType
- targetResourceRegion: targetResourceRegion
- criteria: {
- 'odata.type': any(alertCriteriaType)
- allOf: criterias
- }
- autoMitigate: autoMitigate
- actions: actionGroups
- }
-}
-
-resource metricAlert_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(metricAlert.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: metricAlert
-}]
-
-@description('The resource group the metric alert was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the metric alert.')
-output name string = metricAlert.name
-
-@description('The resource ID of the metric alert.')
-output resourceId string = metricAlert.id
-
-@description('The location the resource was deployed into.')
-output location string = metricAlert.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/metric-alert/main.json b/modules/insights/metric-alert/main.json
deleted file mode 100644
index bb99105f80..0000000000
--- a/modules/insights/metric-alert/main.json
+++ /dev/null
@@ -1,342 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3497356791031567888"
- },
- "name": "Metric Alerts",
- "description": "This module deploys a Metric Alert.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the alert."
- }
- },
- "alertDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Description of the alert."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "global",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Indicates whether this alert is enabled."
- }
- },
- "severity": {
- "type": "int",
- "defaultValue": 3,
- "allowedValues": [
- 0,
- 1,
- 2,
- 3,
- 4
- ],
- "metadata": {
- "description": "Optional. The severity of the alert."
- }
- },
- "evaluationFrequency": {
- "type": "string",
- "defaultValue": "PT5M",
- "allowedValues": [
- "PT1M",
- "PT5M",
- "PT15M",
- "PT30M",
- "PT1H"
- ],
- "metadata": {
- "description": "Optional. how often the metric alert is evaluated represented in ISO 8601 duration format."
- }
- },
- "windowSize": {
- "type": "string",
- "defaultValue": "PT15M",
- "allowedValues": [
- "PT1M",
- "PT5M",
- "PT15M",
- "PT30M",
- "PT1H",
- "PT6H",
- "PT12H",
- "P1D"
- ],
- "metadata": {
- "description": "Optional. the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold."
- }
- },
- "scopes": {
- "type": "array",
- "defaultValue": [
- "[subscription().id]"
- ],
- "metadata": {
- "description": "Optional. the list of resource IDs that this metric alert is scoped to."
- }
- },
- "targetResourceType": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The resource type of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria."
- }
- },
- "targetResourceRegion": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The region of the target resource(s) on which the alert is created/updated. Required if alertCriteriaType is MultipleResourceMultipleMetricCriteria."
- }
- },
- "autoMitigate": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. The flag that indicates whether the alert should be auto resolved or not."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of actions to take when alert triggers."
- }
- },
- "alertCriteriaType": {
- "type": "string",
- "defaultValue": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
- "allowedValues": [
- "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
- "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
- "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria"
- ],
- "metadata": {
- "description": "Optional. Maps to the 'odata.type' field. Specifies the type of the alert criteria."
- }
- },
- "criterias": {
- "type": "array",
- "metadata": {
- "description": "Required. Criterias to trigger the alert. Array of 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' or 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria' objects. When using MultipleResourceMultipleMetricCriteria criteria type, some parameters becomes mandatory. It is not possible to convert from SingleResourceMultipleMetricCriteria to MultipleResourceMultipleMetricCriteria. The alert must be deleted and recreated."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "actionGroups",
- "count": "[length(parameters('actions'))]",
- "input": {
- "actionGroupId": "[if(contains(parameters('actions')[copyIndex('actionGroups')], 'actionGroupId'), parameters('actions')[copyIndex('actionGroups')].actionGroupId, parameters('actions')[copyIndex('actionGroups')])]",
- "webHookProperties": "[if(contains(parameters('actions')[copyIndex('actionGroups')], 'webHookProperties'), parameters('actions')[copyIndex('actionGroups')].webHookProperties, null())]"
- }
- }
- ],
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "metricAlert": {
- "type": "Microsoft.Insights/metricAlerts",
- "apiVersion": "2018-03-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('alertDescription')]",
- "severity": "[parameters('severity')]",
- "enabled": "[parameters('enabled')]",
- "scopes": "[parameters('scopes')]",
- "evaluationFrequency": "[parameters('evaluationFrequency')]",
- "windowSize": "[parameters('windowSize')]",
- "targetResourceType": "[parameters('targetResourceType')]",
- "targetResourceRegion": "[parameters('targetResourceRegion')]",
- "criteria": {
- "odata.type": "[parameters('alertCriteriaType')]",
- "allOf": "[parameters('criterias')]"
- },
- "autoMitigate": "[parameters('autoMitigate')]",
- "actions": "[variables('actionGroups')]"
- }
- },
- "metricAlert_roleAssignments": {
- "copy": {
- "name": "metricAlert_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/metricAlerts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/metricAlerts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "metricAlert"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the metric alert was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the metric alert."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the metric alert."
- },
- "value": "[resourceId('Microsoft.Insights/metricAlerts', parameters('name'))]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('metricAlert', '2018-03-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/metric-alert/tests/e2e/max/dependencies.bicep b/modules/insights/metric-alert/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index eb23eca835..0000000000
--- a/modules/insights/metric-alert/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,29 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Action Group to create.')
-param actionGroupName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource actionGroup 'Microsoft.Insights/actionGroups@2022-06-01' = {
- name: actionGroupName
- location: 'global'
-
- properties: {
- enabled: true
- groupShortName: substring(actionGroupName, 0, 11)
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Action Group.')
-output actionGroupResourceId string = actionGroup.id
diff --git a/modules/insights/metric-alert/tests/e2e/max/main.test.bicep b/modules/insights/metric-alert/tests/e2e/max/main.test.bicep
deleted file mode 100644
index ef36753b63..0000000000
--- a/modules/insights/metric-alert/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,98 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.metricalerts-${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 = 'imamax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- criterias: [
- {
- criterionType: 'StaticThresholdCriterion'
- metricName: 'Percentage CPU'
- metricNamespace: 'microsoft.compute/virtualmachines'
- name: 'HighCPU'
- operator: 'GreaterThan'
- threshold: '90'
- timeAggregation: 'Average'
- }
- ]
- actions: [
- nestedDependencies.outputs.actionGroupResourceId
- ]
- alertCriteriaType: 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- targetResourceRegion: 'westeurope'
- targetResourceType: 'microsoft.compute/virtualmachines'
- windowSize: 'PT15M'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/metric-alert/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/metric-alert/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index eb23eca835..0000000000
--- a/modules/insights/metric-alert/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,29 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Action Group to create.')
-param actionGroupName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource actionGroup 'Microsoft.Insights/actionGroups@2022-06-01' = {
- name: actionGroupName
- location: 'global'
-
- properties: {
- enabled: true
- groupShortName: substring(actionGroupName, 0, 11)
- }
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Action Group.')
-output actionGroupResourceId string = actionGroup.id
diff --git a/modules/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 8af9b43124..0000000000
--- a/modules/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,81 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.metricalerts-${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 = 'imawaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- criterias: [
- {
- criterionType: 'StaticThresholdCriterion'
- metricName: 'Percentage CPU'
- metricNamespace: 'microsoft.compute/virtualmachines'
- name: 'HighCPU'
- operator: 'GreaterThan'
- threshold: '90'
- timeAggregation: 'Average'
- }
- ]
- actions: [
- nestedDependencies.outputs.actionGroupResourceId
- ]
- alertCriteriaType: 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
- targetResourceRegion: 'westeurope'
- targetResourceType: 'microsoft.compute/virtualmachines'
- windowSize: 'PT15M'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/metric-alert/version.json b/modules/insights/metric-alert/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/metric-alert/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/private-link-scope/README.md b/modules/insights/private-link-scope/README.md
index 4470ffb40d..290b03cfbc 100644
--- a/modules/insights/private-link-scope/README.md
+++ b/modules/insights/private-link-scope/README.md
@@ -1,769 +1,7 @@
-# Azure Monitor Private Link Scopes `[microsoft.insights/privateLinkScopes]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the private link scope. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | The location of the private link scope. Should be global. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`scopedResources`](#parameter-scopedresources) | array | Configuration details for Azure Monitor Resources. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `name`
-
-Name of the private link scope.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-The location of the private link scope. Should be global.
-
-- Required: No
-- Type: string
-- Default: `'global'`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | Array of role assignments to create. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `scopedResources`
-
-Configuration details for Azure Monitor Resources.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the private link scope. |
-| `resourceGroupName` | string | The resource group the private link scope was deployed into. |
-| `resourceId` | string | The resource ID of the private link scope. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/private-link-scope/main.bicep b/modules/insights/private-link-scope/main.bicep
deleted file mode 100644
index aff38da1dd..0000000000
--- a/modules/insights/private-link-scope/main.bicep
+++ /dev/null
@@ -1,229 +0,0 @@
-metadata name = 'Azure Monitor Private Link Scopes'
-metadata description = 'This module deploys an Azure Monitor Private Link Scope.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the private link scope.')
-@minLength(1)
-param name string
-
-@description('Optional. The location of the private link scope. Should be global.')
-param location string = 'global'
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Configuration details for Azure Monitor Resources.')
-param scopedResources array = []
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. Resource tags.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource privateLinkScope 'Microsoft.Insights/privateLinkScopes@2019-10-17-preview' = {
- name: name
- location: location
- tags: tags
- properties: {}
-}
-
-module privateLinkScope_scopedResource 'scoped-resource/main.bicep' = [for (scopedResource, index) in scopedResources: {
- name: '${uniqueString(deployment().name, location)}-PvtLinkScope-ScopedRes-${index}'
- params: {
- name: scopedResource.name
- privateLinkScopeName: privateLinkScope.name
- linkedResourceId: scopedResource.linkedResourceId
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource privateLinkScope_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: privateLinkScope
-}
-
-module privateLinkScope_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-privateLinkScope-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'azuremonitor'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(privateLinkScope.id, '/'))}-${privateEndpoint.?service ?? 'azuremonitor'}-${index}'
- serviceResourceId: privateLinkScope.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource privateLinkScope_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(privateLinkScope.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: privateLinkScope
-}]
-
-@description('The name of the private link scope.')
-output name string = privateLinkScope.name
-
-@description('The resource ID of the private link scope.')
-output resourceId string = privateLinkScope.id
-
-@description('The resource group the private link scope was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = privateLinkScope.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @description('Optional. Array of role assignments to create.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
diff --git a/modules/insights/private-link-scope/main.json b/modules/insights/private-link-scope/main.json
deleted file mode 100644
index 826cdce33e..0000000000
--- a/modules/insights/private-link-scope/main.json
+++ /dev/null
@@ -1,1176 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3912801049685613645"
- },
- "name": "Azure Monitor Private Link Scopes",
- "description": "This module deploys an Azure Monitor Private Link Scope.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Required. Name of the private link scope."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "global",
- "metadata": {
- "description": "Optional. The location of the private link scope. Should be global."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "scopedResources": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Configuration details for Azure Monitor Resources."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateLinkScope": {
- "type": "microsoft.insights/privateLinkScopes",
- "apiVersion": "2019-10-17-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {}
- },
- "privateLinkScope_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('microsoft.insights/privateLinkScopes/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateLinkScope"
- ]
- },
- "privateLinkScope_roleAssignments": {
- "copy": {
- "name": "privateLinkScope_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('microsoft.insights/privateLinkScopes/{0}', parameters('name'))]",
- "name": "[guid(resourceId('microsoft.insights/privateLinkScopes', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateLinkScope"
- ]
- },
- "privateLinkScope_scopedResource": {
- "copy": {
- "name": "privateLinkScope_scopedResource",
- "count": "[length(parameters('scopedResources'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PvtLinkScope-ScopedRes-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('scopedResources')[copyIndex()].name]"
- },
- "privateLinkScopeName": {
- "value": "[parameters('name')]"
- },
- "linkedResourceId": {
- "value": "[parameters('scopedResources')[copyIndex()].linkedResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6728675477102381760"
- },
- "name": "Private Link Scope Scoped Resources",
- "description": "This module deploys a Private Link Scope Scoped Resource.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Required. Name of the private link scoped resource."
- }
- },
- "privateLinkScopeName": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Conditional. The name of the parent private link scope. Required if the template is used in a standalone deployment."
- }
- },
- "linkedResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the scoped Azure monitor resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Insights/privateLinkScopes/scopedResources",
- "apiVersion": "2021-07-01-preview",
- "name": "[format('{0}/{1}', parameters('privateLinkScopeName'), parameters('name'))]",
- "properties": {
- "linkedResourceId": "[parameters('linkedResourceId')]"
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group where the resource has been deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed scopedResource."
- },
- "value": "[resourceId('Microsoft.Insights/privateLinkScopes/scopedResources', parameters('privateLinkScopeName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The full name of the deployed Scoped Resource."
- },
- "value": "[parameters('name')]"
- }
- }
- }
- },
- "dependsOn": [
- "privateLinkScope"
- ]
- },
- "privateLinkScope_privateEndpoints": {
- "copy": {
- "name": "privateLinkScope_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-privateLinkScope-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'azuremonitor')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('microsoft.insights/privateLinkScopes', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'azuremonitor'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('microsoft.insights/privateLinkScopes', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "privateLinkScope"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private link scope."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private link scope."
- },
- "value": "[resourceId('microsoft.insights/privateLinkScopes', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private link scope was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateLinkScope', '2019-10-17-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/private-link-scope/scoped-resource/README.md b/modules/insights/private-link-scope/scoped-resource/README.md
deleted file mode 100644
index 5946a32116..0000000000
--- a/modules/insights/private-link-scope/scoped-resource/README.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Private Link Scope Scoped Resources `[Microsoft.Insights/privateLinkScopes/scopedResources]`
-
-This module deploys a Private Link Scope Scoped Resource.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Insights/privateLinkScopes/scopedResources` | [2021-07-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-07-01-preview/privateLinkScopes/scopedResources) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`linkedResourceId`](#parameter-linkedresourceid) | string | The resource ID of the scoped Azure monitor resource. |
-| [`name`](#parameter-name) | string | Name of the private link scoped resource. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`privateLinkScopeName`](#parameter-privatelinkscopename) | string | The name of the parent private link scope. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `linkedResourceId`
-
-The resource ID of the scoped Azure monitor resource.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-Name of the private link scoped resource.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateLinkScopeName`
-
-The name of the parent private link scope. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The full name of the deployed Scoped Resource. |
-| `resourceGroupName` | string | The name of the resource group where the resource has been deployed. |
-| `resourceId` | string | The resource ID of the deployed scopedResource. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/insights/private-link-scope/scoped-resource/main.bicep b/modules/insights/private-link-scope/scoped-resource/main.bicep
deleted file mode 100644
index 0c42825f72..0000000000
--- a/modules/insights/private-link-scope/scoped-resource/main.bicep
+++ /dev/null
@@ -1,50 +0,0 @@
-metadata name = 'Private Link Scope Scoped Resources'
-metadata description = 'This module deploys a Private Link Scope Scoped Resource.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the private link scoped resource.')
-@minLength(1)
-param name string
-
-@description('Conditional. The name of the parent private link scope. Required if the template is used in a standalone deployment.')
-@minLength(1)
-param privateLinkScopeName string
-
-@description('Required. The resource ID of the scoped Azure monitor resource.')
-param linkedResourceId string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource privateLinkScope 'Microsoft.Insights/privateLinkScopes@2021-07-01-preview' existing = {
- name: privateLinkScopeName
-}
-
-resource scopedResource 'Microsoft.Insights/privateLinkScopes/scopedResources@2021-07-01-preview' = {
- name: name
- parent: privateLinkScope
- properties: {
- linkedResourceId: linkedResourceId
- }
-}
-
-@description('The name of the resource group where the resource has been deployed.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The resource ID of the deployed scopedResource.')
-output resourceId string = scopedResource.id
-
-@description('The full name of the deployed Scoped Resource.')
-output name string = scopedResource.name
diff --git a/modules/insights/private-link-scope/scoped-resource/main.json b/modules/insights/private-link-scope/scoped-resource/main.json
deleted file mode 100644
index 349184548c..0000000000
--- a/modules/insights/private-link-scope/scoped-resource/main.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "13415430389319270642"
- },
- "name": "Private Link Scope Scoped Resources",
- "description": "This module deploys a Private Link Scope Scoped Resource.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Required. Name of the private link scoped resource."
- }
- },
- "privateLinkScopeName": {
- "type": "string",
- "minLength": 1,
- "metadata": {
- "description": "Conditional. The name of the parent private link scope. Required if the template is used in a standalone deployment."
- }
- },
- "linkedResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the scoped Azure monitor resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Insights/privateLinkScopes/scopedResources",
- "apiVersion": "2021-07-01-preview",
- "name": "[format('{0}/{1}', parameters('privateLinkScopeName'), parameters('name'))]",
- "properties": {
- "linkedResourceId": "[parameters('linkedResourceId')]"
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group where the resource has been deployed."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the deployed scopedResource."
- },
- "value": "[resourceId('Microsoft.Insights/privateLinkScopes/scopedResources', parameters('privateLinkScopeName'), parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The full name of the deployed Scoped Resource."
- },
- "value": "[parameters('name')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/private-link-scope/scoped-resource/version.json b/modules/insights/private-link-scope/scoped-resource/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/private-link-scope/scoped-resource/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/private-link-scope/tests/e2e/defaults/main.test.bicep b/modules/insights/private-link-scope/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 33740e555d..0000000000
--- a/modules/insights/private-link-scope/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.privatelinkscopes-${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 = 'iplsmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/insights/private-link-scope/tests/e2e/max/dependencies.bicep b/modules/insights/private-link-scope/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index e09c9b5a0c..0000000000
--- a/modules/insights/private-link-scope/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,71 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.monitor.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
diff --git a/modules/insights/private-link-scope/tests/e2e/max/main.test.bicep b/modules/insights/private-link-scope/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 917468f472..0000000000
--- a/modules/insights/private-link-scope/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,100 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.privatelinkscopes-${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 = 'iplsmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-la-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- scopedResources: [
- {
- name: 'scoped1'
- linkedResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/private-link-scope/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/private-link-scope/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index e09c9b5a0c..0000000000
--- a/modules/insights/private-link-scope/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,71 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.monitor.azure.com'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
diff --git a/modules/insights/private-link-scope/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/private-link-scope/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 8fa06958a0..0000000000
--- a/modules/insights/private-link-scope/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,83 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.privatelinkscopes-${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 = 'iplswaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-la-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- scopedResources: [
- {
- name: 'scoped1'
- linkedResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/private-link-scope/version.json b/modules/insights/private-link-scope/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/private-link-scope/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/scheduled-query-rule/README.md b/modules/insights/scheduled-query-rule/README.md
index 4b925dc11d..af0014cf91 100644
--- a/modules/insights/scheduled-query-rule/README.md
+++ b/modules/insights/scheduled-query-rule/README.md
@@ -1,653 +1,7 @@
-# Scheduled Query Rules `[Microsoft.Insights/scheduledQueryRules]`
+
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`criterias`](#parameter-criterias) | object | The rule criteria that defines the conditions of the scheduled query rule. |
-| [`name`](#parameter-name) | string | The name of the Alert. |
-| [`scopes`](#parameter-scopes) | array | The list of resource IDs that this scheduled query rule is scoped to. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actions`](#parameter-actions) | array | Actions to invoke when the alert fires. |
-| [`alertDescription`](#parameter-alertdescription) | string | The description of the scheduled query rule. |
-| [`autoMitigate`](#parameter-automitigate) | bool | The flag that indicates whether the alert should be automatically resolved or not. Relevant only for rules of the kind LogAlert. |
-| [`enabled`](#parameter-enabled) | bool | The flag which indicates whether this scheduled query rule is enabled. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`evaluationFrequency`](#parameter-evaluationfrequency) | string | How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert. |
-| [`kind`](#parameter-kind) | string | Indicates the type of scheduled query rule. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`queryTimeRange`](#parameter-querytimerange) | string | If specified (in ISO 8601 duration format) then overrides the query time range. Relevant only for rules of the kind LogAlert. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`severity`](#parameter-severity) | int | Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. |
-| [`skipQueryValidation`](#parameter-skipqueryvalidation) | bool | The flag which indicates whether the provided query should be validated or not. Relevant only for rules of the kind LogAlert. |
-| [`suppressForMinutes`](#parameter-suppressforminutes) | string | Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. If set, autoMitigate must be disabled.Relevant only for rules of the kind LogAlert. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`targetResourceTypes`](#parameter-targetresourcetypes) | array | List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert. |
-| [`windowSize`](#parameter-windowsize) | string | The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert. |
-
-### Parameter: `criterias`
-
-The rule criteria that defines the conditions of the scheduled query rule.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-The name of the Alert.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `scopes`
-
-The list of resource IDs that this scheduled query rule is scoped to.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `actions`
-
-Actions to invoke when the alert fires.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `alertDescription`
-
-The description of the scheduled query rule.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `autoMitigate`
-
-The flag that indicates whether the alert should be automatically resolved or not. Relevant only for rules of the kind LogAlert.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enabled`
-
-The flag which indicates whether this scheduled query rule is enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `evaluationFrequency`
-
-How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `kind`
-
-Indicates the type of scheduled query rule.
-
-- Required: No
-- Type: string
-- Default: `'LogAlert'`
-- Allowed:
- ```Bicep
- [
- 'LogAlert'
- 'LogToMetric'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `queryTimeRange`
-
-If specified (in ISO 8601 duration format) then overrides the query time range. Relevant only for rules of the kind LogAlert.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `severity`
-
-Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.
-
-- Required: No
-- Type: int
-- Default: `3`
-- Allowed:
- ```Bicep
- [
- 0
- 1
- 2
- 3
- 4
- ]
- ```
-
-### Parameter: `skipQueryValidation`
-
-The flag which indicates whether the provided query should be validated or not. Relevant only for rules of the kind LogAlert.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `suppressForMinutes`
-
-Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. If set, autoMitigate must be disabled.Relevant only for rules of the kind LogAlert.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `targetResourceTypes`
-
-List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `windowSize`
-
-The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The Name of the created query rule. |
-| `resourceGroupName` | string | The Resource Group of the created query rule. |
-| `resourceId` | string | The resource ID of the created query rule. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/scheduled-query-rule/main.bicep b/modules/insights/scheduled-query-rule/main.bicep
deleted file mode 100644
index 5a205cd495..0000000000
--- a/modules/insights/scheduled-query-rule/main.bicep
+++ /dev/null
@@ -1,169 +0,0 @@
-metadata name = 'Scheduled Query Rules'
-metadata description = 'This module deploys a Scheduled Query Rule.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Alert.')
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The description of the scheduled query rule.')
-param alertDescription string = ''
-
-@description('Optional. The flag which indicates whether this scheduled query rule is enabled.')
-param enabled bool = true
-
-@description('Optional. Indicates the type of scheduled query rule.')
-@allowed([
- 'LogAlert'
- 'LogToMetric'
-])
-param kind string = 'LogAlert'
-
-@description('Optional. The flag that indicates whether the alert should be automatically resolved or not. Relevant only for rules of the kind LogAlert.')
-param autoMitigate bool = true
-
-@description('Optional. If specified (in ISO 8601 duration format) then overrides the query time range. Relevant only for rules of the kind LogAlert.')
-param queryTimeRange string = ''
-
-@description('Optional. The flag which indicates whether the provided query should be validated or not. Relevant only for rules of the kind LogAlert.')
-param skipQueryValidation bool = false
-
-@description('Optional. List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert.')
-param targetResourceTypes array = []
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Required. The list of resource IDs that this scheduled query rule is scoped to.')
-param scopes array
-
-@description('Optional. Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.')
-@allowed([
- 0
- 1
- 2
- 3
- 4
-])
-param severity int = 3
-
-@description('Optional. How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.')
-param evaluationFrequency string = ''
-
-@description('Optional. The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert.')
-param windowSize string = ''
-
-@description('Optional. Actions to invoke when the alert fires.')
-param actions array = []
-
-@description('Required. The rule criteria that defines the conditions of the scheduled query rule.')
-param criterias object
-
-@description('Optional. Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. If set, autoMitigate must be disabled.Relevant only for rules of the kind LogAlert.')
-param suppressForMinutes string = ''
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource queryRule 'Microsoft.Insights/scheduledQueryRules@2021-02-01-preview' = {
- name: name
- location: location
- tags: tags
- kind: kind
- properties: {
- actions: {
- actionGroups: actions
- customProperties: {}
- }
- autoMitigate: (kind == 'LogAlert') ? autoMitigate : null
- criteria: criterias
- description: alertDescription
- displayName: name
- enabled: enabled
- evaluationFrequency: (kind == 'LogAlert' && !empty(evaluationFrequency)) ? evaluationFrequency : null
- muteActionsDuration: (kind == 'LogAlert' && !empty(suppressForMinutes)) ? suppressForMinutes : null
- overrideQueryTimeRange: (kind == 'LogAlert' && !empty(queryTimeRange)) ? queryTimeRange : null
- scopes: scopes
- severity: (kind == 'LogAlert') ? severity : null
- skipQueryValidation: (kind == 'LogAlert') ? skipQueryValidation : null
- targetResourceTypes: (kind == 'LogAlert') ? targetResourceTypes : null
- windowSize: (kind == 'LogAlert' && !empty(windowSize)) ? windowSize : null
- }
-}
-
-resource queryRule_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(queryRule.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: queryRule
-}]
-
-@description('The Name of the created query rule.')
-output name string = queryRule.name
-
-@description('The resource ID of the created query rule.')
-output resourceId string = queryRule.id
-
-@description('The Resource Group of the created query rule.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = queryRule.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/scheduled-query-rule/main.json b/modules/insights/scheduled-query-rule/main.json
deleted file mode 100644
index 87d5b4cd95..0000000000
--- a/modules/insights/scheduled-query-rule/main.json
+++ /dev/null
@@ -1,329 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "12406976097155234839"
- },
- "name": "Scheduled Query Rules",
- "description": "This module deploys a Scheduled Query Rule.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Alert."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "alertDescription": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the scheduled query rule."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. The flag which indicates whether this scheduled query rule is enabled."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "LogAlert",
- "allowedValues": [
- "LogAlert",
- "LogToMetric"
- ],
- "metadata": {
- "description": "Optional. Indicates the type of scheduled query rule."
- }
- },
- "autoMitigate": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. The flag that indicates whether the alert should be automatically resolved or not. Relevant only for rules of the kind LogAlert."
- }
- },
- "queryTimeRange": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. If specified (in ISO 8601 duration format) then overrides the query time range. Relevant only for rules of the kind LogAlert."
- }
- },
- "skipQueryValidation": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. The flag which indicates whether the provided query should be validated or not. Relevant only for rules of the kind LogAlert."
- }
- },
- "targetResourceTypes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "scopes": {
- "type": "array",
- "metadata": {
- "description": "Required. The list of resource IDs that this scheduled query rule is scoped to."
- }
- },
- "severity": {
- "type": "int",
- "defaultValue": 3,
- "allowedValues": [
- 0,
- 1,
- 2,
- 3,
- 4
- ],
- "metadata": {
- "description": "Optional. Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert."
- }
- },
- "evaluationFrequency": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert."
- }
- },
- "windowSize": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert."
- }
- },
- "actions": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Actions to invoke when the alert fires."
- }
- },
- "criterias": {
- "type": "object",
- "metadata": {
- "description": "Required. The rule criteria that defines the conditions of the scheduled query rule."
- }
- },
- "suppressForMinutes": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. If set, autoMitigate must be disabled.Relevant only for rules of the kind LogAlert."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "queryRule": {
- "type": "Microsoft.Insights/scheduledQueryRules",
- "apiVersion": "2021-02-01-preview",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "kind": "[parameters('kind')]",
- "properties": {
- "actions": {
- "actionGroups": "[parameters('actions')]",
- "customProperties": {}
- },
- "autoMitigate": "[if(equals(parameters('kind'), 'LogAlert'), parameters('autoMitigate'), null())]",
- "criteria": "[parameters('criterias')]",
- "description": "[parameters('alertDescription')]",
- "displayName": "[parameters('name')]",
- "enabled": "[parameters('enabled')]",
- "evaluationFrequency": "[if(and(equals(parameters('kind'), 'LogAlert'), not(empty(parameters('evaluationFrequency')))), parameters('evaluationFrequency'), null())]",
- "muteActionsDuration": "[if(and(equals(parameters('kind'), 'LogAlert'), not(empty(parameters('suppressForMinutes')))), parameters('suppressForMinutes'), null())]",
- "overrideQueryTimeRange": "[if(and(equals(parameters('kind'), 'LogAlert'), not(empty(parameters('queryTimeRange')))), parameters('queryTimeRange'), null())]",
- "scopes": "[parameters('scopes')]",
- "severity": "[if(equals(parameters('kind'), 'LogAlert'), parameters('severity'), null())]",
- "skipQueryValidation": "[if(equals(parameters('kind'), 'LogAlert'), parameters('skipQueryValidation'), null())]",
- "targetResourceTypes": "[if(equals(parameters('kind'), 'LogAlert'), parameters('targetResourceTypes'), null())]",
- "windowSize": "[if(and(equals(parameters('kind'), 'LogAlert'), not(empty(parameters('windowSize')))), parameters('windowSize'), null())]"
- }
- },
- "queryRule_roleAssignments": {
- "copy": {
- "name": "queryRule_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/scheduledQueryRules/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/scheduledQueryRules', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "queryRule"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The Name of the created query rule."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the created query rule."
- },
- "value": "[resourceId('Microsoft.Insights/scheduledQueryRules', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The Resource Group of the created query rule."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('queryRule', '2021-02-01-preview', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/scheduled-query-rule/tests/e2e/max/dependencies.bicep b/modules/insights/scheduled-query-rule/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 9e9a8f2510..0000000000
--- a/modules/insights/scheduled-query-rule/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,24 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
diff --git a/modules/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep b/modules/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep
deleted file mode 100644
index b6aa16ced8..0000000000
--- a/modules/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,116 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.scheduledqueryrules-${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 = 'isqrmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- alertDescription: 'My sample Alert'
- autoMitigate: false
- criterias: {
- allOf: [
- {
- dimensions: [
- {
- name: 'Computer'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- {
- name: 'InstanceName'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- ]
- metricMeasureColumn: 'AggregatedValue'
- operator: 'GreaterThan'
- query: 'Perf | where ObjectName == "LogicalDisk" | where CounterName == "% Free Space" | where InstanceName <> "HarddiskVolume1" and InstanceName <> "_Total" | summarize AggregatedValue = min(CounterValue) by Computer, InstanceName, bin(TimeGenerated,5m)'
- threshold: 0
- timeAggregation: 'Average'
- }
- ]
- }
- evaluationFrequency: 'PT5M'
- queryTimeRange: 'PT5M'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- scopes: [
- nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- ]
- suppressForMinutes: 'PT5M'
- windowSize: 'PT5M'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/scheduled-query-rule/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/scheduled-query-rule/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 9e9a8f2510..0000000000
--- a/modules/insights/scheduled-query-rule/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,24 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output logAnalyticsWorkspaceResourceId string = logAnalyticsWorkspace.id
diff --git a/modules/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 3504694196..0000000000
--- a/modules/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,99 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.scheduledqueryrules-${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 = 'isqrwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- alertDescription: 'My sample Alert'
- autoMitigate: false
- criterias: {
- allOf: [
- {
- dimensions: [
- {
- name: 'Computer'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- {
- name: 'InstanceName'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- ]
- metricMeasureColumn: 'AggregatedValue'
- operator: 'GreaterThan'
- query: 'Perf | where ObjectName == "LogicalDisk" | where CounterName == "% Free Space" | where InstanceName <> "HarddiskVolume1" and InstanceName <> "_Total" | summarize AggregatedValue = min(CounterValue) by Computer, InstanceName, bin(TimeGenerated,5m)'
- threshold: 0
- timeAggregation: 'Average'
- }
- ]
- }
- evaluationFrequency: 'PT5M'
- queryTimeRange: 'PT5M'
- scopes: [
- nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
- ]
- suppressForMinutes: 'PT5M'
- windowSize: 'PT5M'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/insights/scheduled-query-rule/version.json b/modules/insights/scheduled-query-rule/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/scheduled-query-rule/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/insights/webtest/README.md b/modules/insights/webtest/README.md
index e08756c1d1..0d96dc1ca3 100644
--- a/modules/insights/webtest/README.md
+++ b/modules/insights/webtest/README.md
@@ -1,620 +1,7 @@
-# Web Tests `[Microsoft.Insights/webtests]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the webtest. |
-| [`request`](#parameter-request) | object | The collection of request properties. |
-| [`tags`](#parameter-tags) | object | A single hidden-link tag pointing to an existing AI component is required. |
-| [`webTestName`](#parameter-webtestname) | string | User defined name if this WebTest. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`configuration`](#parameter-configuration) | object | An XML configuration specification for a WebTest. |
-| [`description`](#parameter-description) | string | User defined description for this WebTest. |
-| [`enabled`](#parameter-enabled) | bool | Is the test actively being monitored. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`frequency`](#parameter-frequency) | int | Interval in seconds between test runs for this WebTest. |
-| [`kind`](#parameter-kind) | string | The kind of WebTest that this web test watches. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`locations`](#parameter-locations) | array | List of where to physically run the tests from to give global coverage for accessibility of your application. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`retryEnabled`](#parameter-retryenabled) | bool | Allow for retries should this WebTest fail. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`syntheticMonitorId`](#parameter-syntheticmonitorid) | string | Unique ID of this WebTest. |
-| [`timeout`](#parameter-timeout) | int | Seconds until this WebTest will timeout and fail. |
-| [`validationRules`](#parameter-validationrules) | object | The collection of validation rule properties. |
-
-### Parameter: `name`
-
-Name of the webtest.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `request`
-
-The collection of request properties.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `tags`
-
-A single hidden-link tag pointing to an existing AI component is required.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `webTestName`
-
-User defined name if this WebTest.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `configuration`
-
-An XML configuration specification for a WebTest.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `description`
-
-User defined description for this WebTest.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enabled`
-
-Is the test actively being monitored.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `frequency`
-
-Interval in seconds between test runs for this WebTest.
-
-- Required: No
-- Type: int
-- Default: `300`
-
-### Parameter: `kind`
-
-The kind of WebTest that this web test watches.
-
-- Required: No
-- Type: string
-- Default: `'standard'`
-- Allowed:
- ```Bicep
- [
- 'multistep'
- 'ping'
- 'standard'
- ]
- ```
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `locations`
-
-List of where to physically run the tests from to give global coverage for accessibility of your application.
-
-- Required: No
-- Type: array
-- Default:
- ```Bicep
- [
- {
- Id: 'us-il-ch1-azr'
- }
- {
- Id: 'us-fl-mia-edge'
- }
- {
- Id: 'latam-br-gru-edge'
- }
- {
- Id: 'apac-sg-sin-azr'
- }
- {
- Id: 'emea-nl-ams-azr'
- }
- ]
- ```
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `retryEnabled`
-
-Allow for retries should this WebTest fail.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `syntheticMonitorId`
-
-Unique ID of this WebTest.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `timeout`
-
-Seconds until this WebTest will timeout and fail.
-
-- Required: No
-- Type: int
-- Default: `30`
-
-### Parameter: `validationRules`
-
-The collection of validation rule properties.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the webtest. |
-| `resourceGroupName` | string | The resource group the resource was deployed into. |
-| `resourceId` | string | The resource ID of the webtest. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/insights/webtest/main.bicep b/modules/insights/webtest/main.bicep
deleted file mode 100644
index b5d72e8b02..0000000000
--- a/modules/insights/webtest/main.bicep
+++ /dev/null
@@ -1,188 +0,0 @@
-metadata name = 'Web Tests'
-metadata description = 'This module deploys a Web Test.'
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Required. Name of the webtest.')
-param name string
-
-@sys.description('Required. User defined name if this WebTest.')
-param webTestName string
-
-@sys.description('Required. A single hidden-link tag pointing to an existing AI component is required.')
-param tags object
-
-@sys.description('Required. The collection of request properties.')
-param request object
-
-@sys.description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. User defined description for this WebTest.')
-param description string = ''
-
-@sys.description('Optional. Unique ID of this WebTest.')
-param syntheticMonitorId string = name
-
-@sys.description('Optional. The kind of WebTest that this web test watches.')
-@allowed([
- 'multistep'
- 'ping'
- 'standard'
-])
-param kind string = 'standard'
-
-@sys.description('Optional. List of where to physically run the tests from to give global coverage for accessibility of your application.')
-param locations array = [
- {
- Id: 'us-il-ch1-azr'
- }
- {
- Id: 'us-fl-mia-edge'
- }
- {
- Id: 'latam-br-gru-edge'
- }
- {
- Id: 'apac-sg-sin-azr'
- }
- {
- Id: 'emea-nl-ams-azr'
- }
-]
-
-@sys.description('Optional. Is the test actively being monitored.')
-param enabled bool = true
-
-@sys.description('Optional. Interval in seconds between test runs for this WebTest.')
-param frequency int = 300
-
-@sys.description('Optional. Seconds until this WebTest will timeout and fail.')
-param timeout int = 30
-
-@sys.description('Optional. Allow for retries should this WebTest fail.')
-param retryEnabled bool = true
-
-@sys.description('Optional. The collection of validation rule properties.')
-param validationRules object = {}
-
-@sys.description('Optional. An XML configuration specification for a WebTest.')
-param configuration object = {}
-
-@sys.description('Optional. The lock settings of the service.')
-param lock lockType
-
-@sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource webtest 'Microsoft.Insights/webtests@2022-06-15' = {
- name: name
- location: location
- tags: tags
- properties: {
- Kind: kind
- Locations: locations
- Name: webTestName
- Description: description
- SyntheticMonitorId: syntheticMonitorId
- Enabled: enabled
- Frequency: frequency
- Timeout: timeout
- RetryEnabled: retryEnabled
- Request: request
- ValidationRules: validationRules
- Configuration: configuration
- }
-}
-
-resource webtest_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: webtest
-}
-
-resource webtest_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(webtest.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: webtest
-}]
-
-@sys.description('The name of the webtest.')
-output name string = webtest.name
-
-@sys.description('The resource ID of the webtest.')
-output resourceId string = webtest.id
-
-@sys.description('The resource group the resource was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The location the resource was deployed into.')
-output location string = webtest.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @sys.description('Optional. Specify the name of lock.')
- name: string?
-
- @sys.description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/insights/webtest/main.json b/modules/insights/webtest/main.json
deleted file mode 100644
index 5275b0e4c2..0000000000
--- a/modules/insights/webtest/main.json
+++ /dev/null
@@ -1,363 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "1408808004644515116"
- },
- "name": "Web Tests",
- "description": "This module deploys a Web Test.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the webtest."
- }
- },
- "webTestName": {
- "type": "string",
- "metadata": {
- "description": "Required. User defined name if this WebTest."
- }
- },
- "tags": {
- "type": "object",
- "metadata": {
- "description": "Required. A single hidden-link tag pointing to an existing AI component is required."
- }
- },
- "request": {
- "type": "object",
- "metadata": {
- "description": "Required. The collection of request properties."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. User defined description for this WebTest."
- }
- },
- "syntheticMonitorId": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. Unique ID of this WebTest."
- }
- },
- "kind": {
- "type": "string",
- "defaultValue": "standard",
- "allowedValues": [
- "multistep",
- "ping",
- "standard"
- ],
- "metadata": {
- "description": "Optional. The kind of WebTest that this web test watches."
- }
- },
- "locations": {
- "type": "array",
- "defaultValue": [
- {
- "Id": "us-il-ch1-azr"
- },
- {
- "Id": "us-fl-mia-edge"
- },
- {
- "Id": "latam-br-gru-edge"
- },
- {
- "Id": "apac-sg-sin-azr"
- },
- {
- "Id": "emea-nl-ams-azr"
- }
- ],
- "metadata": {
- "description": "Optional. List of where to physically run the tests from to give global coverage for accessibility of your application."
- }
- },
- "enabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Is the test actively being monitored."
- }
- },
- "frequency": {
- "type": "int",
- "defaultValue": 300,
- "metadata": {
- "description": "Optional. Interval in seconds between test runs for this WebTest."
- }
- },
- "timeout": {
- "type": "int",
- "defaultValue": 30,
- "metadata": {
- "description": "Optional. Seconds until this WebTest will timeout and fail."
- }
- },
- "retryEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Allow for retries should this WebTest fail."
- }
- },
- "validationRules": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The collection of validation rule properties."
- }
- },
- "configuration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. An XML configuration specification for a WebTest."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "webtest": {
- "type": "Microsoft.Insights/webtests",
- "apiVersion": "2022-06-15",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "Kind": "[parameters('kind')]",
- "Locations": "[parameters('locations')]",
- "Name": "[parameters('webTestName')]",
- "Description": "[parameters('description')]",
- "SyntheticMonitorId": "[parameters('syntheticMonitorId')]",
- "Enabled": "[parameters('enabled')]",
- "Frequency": "[parameters('frequency')]",
- "Timeout": "[parameters('timeout')]",
- "RetryEnabled": "[parameters('retryEnabled')]",
- "Request": "[parameters('request')]",
- "ValidationRules": "[parameters('validationRules')]",
- "Configuration": "[parameters('configuration')]"
- }
- },
- "webtest_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Insights/webtests/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "webtest"
- ]
- },
- "webtest_roleAssignments": {
- "copy": {
- "name": "webtest_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Insights/webtests/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Insights/webtests', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "webtest"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the webtest."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the webtest."
- },
- "value": "[resourceId('Microsoft.Insights/webtests', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the resource was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('webtest', '2022-06-15', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/insights/webtest/tests/e2e/defaults/dependencies.bicep b/modules/insights/webtest/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index 79e003515d..0000000000
--- a/modules/insights/webtest/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,26 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param appInsightName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-resource appInsight 'Microsoft.Insights/components@2020-02-02' = {
- name: appInsightName
- location: location
- kind: 'web'
- properties: {
- Application_Type: 'web'
- WorkspaceResourceId: logAnalyticsWorkspace.id
- }
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output appInsightResourceId string = appInsight.id
diff --git a/modules/insights/webtest/tests/e2e/defaults/main.test.bicep b/modules/insights/webtest/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index a8c77a7505..0000000000
--- a/modules/insights/webtest/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,68 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.webtests-${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 = 'iwtmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- appInsightName: 'dep-${namePrefix}-appi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- 'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- webTestName: 'wt${namePrefix}$${serviceShort}001'
- request: {
- RequestUrl: 'https://learn.microsoft.com/en-us/'
- HttpVerb: 'GET'
- }
- }
-}]
diff --git a/modules/insights/webtest/tests/e2e/max/dependencies.bicep b/modules/insights/webtest/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 79e003515d..0000000000
--- a/modules/insights/webtest/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,26 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param appInsightName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-resource appInsight 'Microsoft.Insights/components@2020-02-02' = {
- name: appInsightName
- location: location
- kind: 'web'
- properties: {
- Application_Type: 'web'
- WorkspaceResourceId: logAnalyticsWorkspace.id
- }
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output appInsightResourceId string = appInsight.id
diff --git a/modules/insights/webtest/tests/e2e/max/main.test.bicep b/modules/insights/webtest/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 6821002ea8..0000000000
--- a/modules/insights/webtest/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,78 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.webtests-${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 = 'iwtmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- appInsightName: 'dep-${namePrefix}-appi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- 'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- webTestName: 'wt${namePrefix}$${serviceShort}001'
- syntheticMonitorId: '${namePrefix}${serviceShort}001'
- locations: [
- {
- Id: 'emea-nl-ams-azr'
- }
- ]
- request: {
- RequestUrl: 'https://learn.microsoft.com/en-us/'
- HttpVerb: 'GET'
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- }
-}]
diff --git a/modules/insights/webtest/tests/e2e/waf-aligned/dependencies.bicep b/modules/insights/webtest/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 79e003515d..0000000000
--- a/modules/insights/webtest/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,26 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param appInsightName string
-
-@description('Required. The name of the Log Analytics Workspace to create.')
-param logAnalyticsWorkspaceName string
-
-resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
- name: logAnalyticsWorkspaceName
- location: location
-}
-
-resource appInsight 'Microsoft.Insights/components@2020-02-02' = {
- name: appInsightName
- location: location
- kind: 'web'
- properties: {
- Application_Type: 'web'
- WorkspaceResourceId: logAnalyticsWorkspace.id
- }
-}
-
-@description('The resource ID of the created Log Analytics Workspace.')
-output appInsightResourceId string = appInsight.id
diff --git a/modules/insights/webtest/tests/e2e/waf-aligned/main.test.bicep b/modules/insights/webtest/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 8674910b4f..0000000000
--- a/modules/insights/webtest/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,78 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-insights.webtests-${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 = 'iwtwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- appInsightName: 'dep-${namePrefix}-appi-${serviceShort}'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- name: '${namePrefix}${serviceShort}001'
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- 'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
- }
- enableDefaultTelemetry: enableDefaultTelemetry
- webTestName: 'wt${namePrefix}$${serviceShort}001'
- syntheticMonitorId: '${namePrefix}${serviceShort}001'
- locations: [
- {
- Id: 'emea-nl-ams-azr'
- }
- ]
- request: {
- RequestUrl: 'https://learn.microsoft.com/en-us/'
- HttpVerb: 'GET'
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- }
-}]
diff --git a/modules/insights/webtest/version.json b/modules/insights/webtest/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/insights/webtest/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/key-vault/vault/MOVED-TO-AVM.md b/modules/key-vault/vault/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/key-vault/vault/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/key-vault/vault/README.md b/modules/key-vault/vault/README.md
index d78189962a..78c9ee539b 100644
--- a/modules/key-vault/vault/README.md
+++ b/modules/key-vault/vault/README.md
@@ -1,1754 +1,7 @@
-# Key Vaults `[Microsoft.KeyVault/vaults]`
+
-
-
-
-### Example 2: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _Pe_
-
-
-
-
-
-### Example 5: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Key Vault. Must be globally unique. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`accessPolicies`](#parameter-accesspolicies) | array | All access policies to create. |
-| [`createMode`](#parameter-createmode) | string | The vault's create mode to indicate whether the vault need to be recovered or not. - recover or default. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`enablePurgeProtection`](#parameter-enablepurgeprotection) | bool | Provide 'true' to enable Key Vault's purge protection feature. |
-| [`enableRbacAuthorization`](#parameter-enablerbacauthorization) | bool | Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. Note that management actions are always authorized with RBAC. |
-| [`enableSoftDelete`](#parameter-enablesoftdelete) | bool | Switch to enable/disable Key Vault's soft delete feature. |
-| [`enableVaultForDeployment`](#parameter-enablevaultfordeployment) | bool | Specifies if the vault is enabled for deployment by script or compute. |
-| [`enableVaultForDiskEncryption`](#parameter-enablevaultfordiskencryption) | bool | Specifies if the azure platform has access to the vault for enabling disk encryption scenarios. |
-| [`enableVaultForTemplateDeployment`](#parameter-enablevaultfortemplatedeployment) | bool | Specifies if the vault is enabled for a template deployment. |
-| [`keys`](#parameter-keys) | array | All keys to create. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`networkAcls`](#parameter-networkacls) | object | Service endpoint object information. For security reasons, it is recommended to set the DefaultAction Deny. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`secrets`](#parameter-secrets) | secureObject | All secrets to create. |
-| [`softDeleteRetentionInDays`](#parameter-softdeleteretentionindays) | int | softDelete data retention days. It accepts >=7 and <=90. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-| [`vaultSku`](#parameter-vaultsku) | string | Specifies the SKU for the vault. |
-
-### Parameter: `name`
-
-Name of the Key Vault. Must be globally unique.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `accessPolicies`
-
-All access policies to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `createMode`
-
-The vault's create mode to indicate whether the vault need to be recovered or not. - recover or default.
-
-- Required: No
-- Type: string
-- Default: `'default'`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enablePurgeProtection`
-
-Provide 'true' to enable Key Vault's purge protection feature.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableRbacAuthorization`
-
-Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. Note that management actions are always authorized with RBAC.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableSoftDelete`
-
-Switch to enable/disable Key Vault's soft delete feature.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableVaultForDeployment`
-
-Specifies if the vault is enabled for deployment by script or compute.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableVaultForDiskEncryption`
-
-Specifies if the azure platform has access to the vault for enabling disk encryption scenarios.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `enableVaultForTemplateDeployment`
-
-Specifies if the vault is enabled for a template deployment.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `keys`
-
-All keys to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `networkAcls`
-
-Service endpoint object information. For security reasons, it is recommended to set the DefaultAction Deny.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `secrets`
-
-All secrets to create.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `softDeleteRetentionInDays`
-
-softDelete data retention days. It accepts >=7 and <=90.
-
-- Required: No
-- Type: int
-- Default: `90`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-### Parameter: `vaultSku`
-
-Specifies the SKU for the vault.
-
-- Required: No
-- Type: string
-- Default: `'premium'`
-- Allowed:
- ```Bicep
- [
- 'premium'
- 'standard'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the key vault. |
-| `resourceGroupName` | string | The name of the resource group the key vault was created in. |
-| `resourceId` | string | The resource ID of the key vault. |
-| `uri` | string | The URI of the key vault. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/key-vault/vault/access-policy/README.md b/modules/key-vault/vault/access-policy/README.md
deleted file mode 100644
index 4e417d6857..0000000000
--- a/modules/key-vault/vault/access-policy/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# Key Vault Access Policies `[Microsoft.KeyVault/vaults/accessPolicies]`
-
-This module deploys a Key Vault Access Policy.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.KeyVault/vaults/accessPolicies` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults/accessPolicies) |
-
-## Parameters
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVaultName`](#parameter-keyvaultname) | string | The name of the parent key vault. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`accessPolicies`](#parameter-accesspolicies) | array | An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `keyVaultName`
-
-The name of the parent key vault. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `accessPolicies`
-
-An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the access policies assignment. |
-| `resourceGroupName` | string | The name of the resource group the access policies assignment was created in. |
-| `resourceId` | string | The resource ID of the access policies assignment. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/key-vault/vault/access-policy/main.bicep b/modules/key-vault/vault/access-policy/main.bicep
deleted file mode 100644
index 6eeec78ae5..0000000000
--- a/modules/key-vault/vault/access-policy/main.bicep
+++ /dev/null
@@ -1,52 +0,0 @@
-metadata name = 'Key Vault Access Policies'
-metadata description = 'This module deploys a Key Vault Access Policy.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment.')
-param keyVaultName string
-
-@description('Optional. An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault\'s tenant ID.')
-param accessPolicies array = []
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var formattedAccessPolicies = [for accessPolicy in accessPolicies: {
- applicationId: contains(accessPolicy, 'applicationId') ? accessPolicy.applicationId : ''
- objectId: contains(accessPolicy, 'objectId') ? accessPolicy.objectId : ''
- permissions: accessPolicy.permissions
- tenantId: contains(accessPolicy, 'tenantId') ? accessPolicy.tenantId : tenant().tenantId
-}]
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
- name: keyVaultName
-}
-
-resource policies 'Microsoft.KeyVault/vaults/accessPolicies@2022-07-01' = {
- name: 'add'
- parent: keyVault
- properties: {
- accessPolicies: formattedAccessPolicies
- }
-}
-
-@description('The name of the resource group the access policies assignment was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the access policies assignment.')
-output name string = policies.name
-
-@description('The resource ID of the access policies assignment.')
-output resourceId string = policies.id
diff --git a/modules/key-vault/vault/access-policy/main.json b/modules/key-vault/vault/access-policy/main.json
deleted file mode 100644
index ca9895ce0c..0000000000
--- a/modules/key-vault/vault/access-policy/main.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2131300650084383528"
- },
- "name": "Key Vault Access Policies",
- "description": "This module deploys a Key Vault Access Policy.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "keyVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment."
- }
- },
- "accessPolicies": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "formattedAccessPolicies",
- "count": "[length(parameters('accessPolicies'))]",
- "input": {
- "applicationId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'applicationId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].applicationId, '')]",
- "objectId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'objectId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].objectId, '')]",
- "permissions": "[parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].permissions]",
- "tenantId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'tenantId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].tenantId, tenant().tenantId)]"
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KeyVault/vaults/accessPolicies",
- "apiVersion": "2022-07-01",
- "name": "[format('{0}/{1}', parameters('keyVaultName'), 'add')]",
- "properties": {
- "accessPolicies": "[variables('formattedAccessPolicies')]"
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the access policies assignment was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the access policies assignment."
- },
- "value": "add"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the access policies assignment."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults/accessPolicies', parameters('keyVaultName'), 'add')]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/key-vault/vault/access-policy/version.json b/modules/key-vault/vault/access-policy/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/key-vault/vault/access-policy/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/key-vault/vault/key/README.md b/modules/key-vault/vault/key/README.md
deleted file mode 100644
index 56a60ada8c..0000000000
--- a/modules/key-vault/vault/key/README.md
+++ /dev/null
@@ -1,352 +0,0 @@
-# Key Vault Keys `[Microsoft.KeyVault/vaults/keys]`
-
-This module deploys a Key Vault Key.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.KeyVault/vaults/keys` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults/keys) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the key. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVaultName`](#parameter-keyvaultname) | string | The name of the parent key vault. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`attributesEnabled`](#parameter-attributesenabled) | bool | Determines whether the object is enabled. |
-| [`attributesExp`](#parameter-attributesexp) | int | Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible. |
-| [`attributesNbf`](#parameter-attributesnbf) | int | Not before date in seconds since 1970-01-01T00:00:00Z. |
-| [`curveName`](#parameter-curvename) | string | The elliptic curve name. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`keyOps`](#parameter-keyops) | array | Array of JsonWebKeyOperation. |
-| [`keySize`](#parameter-keysize) | int | The key size in bits. For example: 2048, 3072, or 4096 for RSA. |
-| [`kty`](#parameter-kty) | string | The type of the key. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`rotationPolicy`](#parameter-rotationpolicy) | object | Key rotation policy properties object. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `name`
-
-The name of the key.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `keyVaultName`
-
-The name of the parent key vault. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `attributesEnabled`
-
-Determines whether the object is enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `attributesExp`
-
-Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `attributesNbf`
-
-Not before date in seconds since 1970-01-01T00:00:00Z.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `curveName`
-
-The elliptic curve name.
-
-- Required: No
-- Type: string
-- Default: `'P-256'`
-- Allowed:
- ```Bicep
- [
- 'P-256'
- 'P-256K'
- 'P-384'
- 'P-521'
- ]
- ```
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `keyOps`
-
-Array of JsonWebKeyOperation.
-
-- Required: No
-- Type: array
-- Default: `[]`
-- Allowed:
- ```Bicep
- [
- 'decrypt'
- 'encrypt'
- 'import'
- 'sign'
- 'unwrapKey'
- 'verify'
- 'wrapKey'
- ]
- ```
-
-### Parameter: `keySize`
-
-The key size in bits. For example: 2048, 3072, or 4096 for RSA.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `kty`
-
-The type of the key.
-
-- Required: No
-- Type: string
-- Default: `'EC'`
-- Allowed:
- ```Bicep
- [
- 'EC'
- 'EC-HSM'
- 'RSA'
- 'RSA-HSM'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `rotationPolicy`
-
-Key rotation policy properties object.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the key. |
-| `resourceGroupName` | string | The name of the resource group the key was created in. |
-| `resourceId` | string | The resource ID of the key. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage: `rotationPolicy`
-
-Configures a [auto-rotation policy](https://learn.microsoft.com/en-us/azure/key-vault/keys/how-to-configure-key-rotation) for the key.
-Remarks:
-
-- The times should use the ISO 8601 duration format, e.g. `P1Y` (1 year), `P2M`, (2 months), `P90D` (90 days).
-- The `trigger` property of `lifetimeActions` can contain one of the following properties:
- - `timeAfterCreate` - The time duration after key creation to rotate the key. It only applies to rotate.
- - `timeBeforeExpiry` - The time duration before key expiring to rotate or notify. To use this, the key must have an expiration date configured.
-
-
diff --git a/modules/key-vault/vault/key/main.bicep b/modules/key-vault/vault/key/main.bicep
deleted file mode 100644
index 21a15d15f2..0000000000
--- a/modules/key-vault/vault/key/main.bicep
+++ /dev/null
@@ -1,163 +0,0 @@
-metadata name = 'Key Vault Keys'
-metadata description = 'This module deploys a Key Vault Key.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment.')
-param keyVaultName string
-
-@description('Required. The name of the key.')
-param name string
-
-@description('Optional. Resource tags.')
-param tags object?
-
-@description('Optional. Determines whether the object is enabled.')
-param attributesEnabled bool = true
-
-@description('Optional. Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible.')
-param attributesExp int = -1
-
-@description('Optional. Not before date in seconds since 1970-01-01T00:00:00Z.')
-param attributesNbf int = -1
-
-@description('Optional. The elliptic curve name.')
-@allowed([
- 'P-256'
- 'P-256K'
- 'P-384'
- 'P-521'
-])
-param curveName string = 'P-256'
-
-@description('Optional. Array of JsonWebKeyOperation.')
-@allowed([
- 'decrypt'
- 'encrypt'
- 'import'
- 'sign'
- 'unwrapKey'
- 'verify'
- 'wrapKey'
-])
-param keyOps array = []
-
-@description('Optional. The key size in bits. For example: 2048, 3072, or 4096 for RSA.')
-param keySize int = -1
-
-@description('Optional. The type of the key.')
-@allowed([
- 'EC'
- 'EC-HSM'
- 'RSA'
- 'RSA-HSM'
-])
-param kty string = 'EC'
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Key rotation policy properties object.')
-param rotationPolicy object = {}
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Key Vault Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')
- 'Key Vault Certificates Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')
- 'Key Vault Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')
- 'Key Vault Crypto Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')
- 'Key Vault Crypto Service Encryption User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')
- 'Key Vault Crypto User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- 'Key Vault Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')
- 'Key Vault Secrets Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')
- 'Key Vault Secrets User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
- name: keyVaultName
-}
-
-resource key 'Microsoft.KeyVault/vaults/keys@2022-07-01' = {
- name: name
- parent: keyVault
- tags: tags
- properties: {
- attributes: {
- enabled: attributesEnabled
- exp: attributesExp != -1 ? attributesExp : null
- nbf: attributesNbf != -1 ? attributesNbf : null
- }
- curveName: curveName
- keyOps: keyOps
- keySize: keySize != -1 ? keySize : null
- kty: kty
- rotationPolicy: !empty(rotationPolicy) ? rotationPolicy : null
- }
-}
-
-resource key_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(key.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: key
-}]
-
-@description('The name of the key.')
-output name string = key.name
-
-@description('The resource ID of the key.')
-output resourceId string = key.id
-
-@description('The name of the resource group the key was created in.')
-output resourceGroupName string = resourceGroup().name
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/key-vault/vault/key/main.json b/modules/key-vault/vault/key/main.json
deleted file mode 100644
index daadf7027b..0000000000
--- a/modules/key-vault/vault/key/main.json
+++ /dev/null
@@ -1,300 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "2953672245031093442"
- },
- "name": "Key Vault Keys",
- "description": "This module deploys a Key Vault Key.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "keyVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the key."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "attributesEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Determines whether the object is enabled."
- }
- },
- "attributesExp": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible."
- }
- },
- "attributesNbf": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Not before date in seconds since 1970-01-01T00:00:00Z."
- }
- },
- "curveName": {
- "type": "string",
- "defaultValue": "P-256",
- "allowedValues": [
- "P-256",
- "P-256K",
- "P-384",
- "P-521"
- ],
- "metadata": {
- "description": "Optional. The elliptic curve name."
- }
- },
- "keyOps": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "decrypt",
- "encrypt",
- "import",
- "sign",
- "unwrapKey",
- "verify",
- "wrapKey"
- ],
- "metadata": {
- "description": "Optional. Array of JsonWebKeyOperation."
- }
- },
- "keySize": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The key size in bits. For example: 2048, 3072, or 4096 for RSA."
- }
- },
- "kty": {
- "type": "string",
- "defaultValue": "EC",
- "allowedValues": [
- "EC",
- "EC-HSM",
- "RSA",
- "RSA-HSM"
- ],
- "metadata": {
- "description": "Optional. The type of the key."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "rotationPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key rotation policy properties object."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Key Vault Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')]",
- "Key Vault Certificates Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')]",
- "Key Vault Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')]",
- "Key Vault Crypto Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')]",
- "Key Vault Crypto Service Encryption User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')]",
- "Key Vault Crypto User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')]",
- "Key Vault Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')]",
- "Key Vault Secrets Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')]",
- "Key Vault Secrets User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "keyVault": {
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2022-07-01",
- "name": "[parameters('keyVaultName')]"
- },
- "key": {
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2022-07-01",
- "name": "[format('{0}/{1}', parameters('keyVaultName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "attributes": {
- "enabled": "[parameters('attributesEnabled')]",
- "exp": "[if(not(equals(parameters('attributesExp'), -1)), parameters('attributesExp'), null())]",
- "nbf": "[if(not(equals(parameters('attributesNbf'), -1)), parameters('attributesNbf'), null())]"
- },
- "curveName": "[parameters('curveName')]",
- "keyOps": "[parameters('keyOps')]",
- "keySize": "[if(not(equals(parameters('keySize'), -1)), parameters('keySize'), null())]",
- "kty": "[parameters('kty')]",
- "rotationPolicy": "[if(not(empty(parameters('rotationPolicy'))), parameters('rotationPolicy'), null())]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "key_roleAssignments": {
- "copy": {
- "name": "key_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}/keys/{1}', parameters('keyVaultName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.KeyVault/vaults/keys', parameters('keyVaultName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "key"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the key."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the key."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults/keys', parameters('keyVaultName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the key was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/key-vault/vault/key/version.json b/modules/key-vault/vault/key/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/key-vault/vault/key/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/key-vault/vault/main.bicep b/modules/key-vault/vault/main.bicep
deleted file mode 100644
index f26fb09a52..0000000000
--- a/modules/key-vault/vault/main.bicep
+++ /dev/null
@@ -1,435 +0,0 @@
-metadata name = 'Key Vaults'
-metadata description = 'This module deploys a Key Vault.'
-metadata owner = 'Azure/module-maintainers'
-
-// ================ //
-// Parameters //
-// ================ //
-@description('Required. Name of the Key Vault. Must be globally unique.')
-@maxLength(24)
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. All access policies to create.')
-param accessPolicies array = []
-
-@description('Optional. All secrets to create.')
-@secure()
-param secrets object = {}
-
-@description('Optional. All keys to create.')
-param keys array = []
-
-@description('Optional. Specifies if the vault is enabled for deployment by script or compute.')
-param enableVaultForDeployment bool = true
-
-@description('Optional. Specifies if the vault is enabled for a template deployment.')
-param enableVaultForTemplateDeployment bool = true
-
-@description('Optional. Specifies if the azure platform has access to the vault for enabling disk encryption scenarios.')
-param enableVaultForDiskEncryption bool = true
-
-@description('Optional. Switch to enable/disable Key Vault\'s soft delete feature.')
-param enableSoftDelete bool = true
-
-@description('Optional. softDelete data retention days. It accepts >=7 and <=90.')
-param softDeleteRetentionInDays int = 90
-
-@description('Optional. Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. Note that management actions are always authorized with RBAC.')
-param enableRbacAuthorization bool = true
-
-@description('Optional. The vault\'s create mode to indicate whether the vault need to be recovered or not. - recover or default.')
-param createMode string = 'default'
-
-@description('Optional. Provide \'true\' to enable Key Vault\'s purge protection feature.')
-param enablePurgeProtection bool = true
-
-@description('Optional. Specifies the SKU for the vault.')
-@allowed([
- 'premium'
- 'standard'
-])
-param vaultSku string = 'premium'
-
-@description('Optional. Service endpoint object information. For security reasons, it is recommended to set the DefaultAction Deny.')
-param networkAcls object = {}
-
-@description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@description('Optional. Resource tags.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-// =========== //
-// Variables //
-// =========== //
-
-var formattedAccessPolicies = [for accessPolicy in accessPolicies: {
- applicationId: contains(accessPolicy, 'applicationId') ? accessPolicy.applicationId : ''
- objectId: contains(accessPolicy, 'objectId') ? accessPolicy.objectId : ''
- permissions: accessPolicy.permissions
- tenantId: contains(accessPolicy, 'tenantId') ? accessPolicy.tenantId : tenant().tenantId
-}]
-
-var secretList = !empty(secrets) ? secrets.secureList : []
-
-var enableReferencedModulesTelemetry = false
-
-// ============ //
-// Dependencies //
-// ============ //
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Key Vault Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')
- 'Key Vault Certificates Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')
- 'Key Vault Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')
- 'Key Vault Crypto Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')
- 'Key Vault Crypto Service Encryption User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')
- 'Key Vault Crypto User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- 'Key Vault Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')
- 'Key Vault Secrets Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')
- 'Key Vault Secrets User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: name
- location: location
- tags: tags
- properties: {
- enabledForDeployment: enableVaultForDeployment
- enabledForTemplateDeployment: enableVaultForTemplateDeployment
- enabledForDiskEncryption: enableVaultForDiskEncryption
- enableSoftDelete: enableSoftDelete
- softDeleteRetentionInDays: softDeleteRetentionInDays
- enableRbacAuthorization: enableRbacAuthorization
- createMode: createMode
- enablePurgeProtection: enablePurgeProtection ? enablePurgeProtection : null
- tenantId: subscription().tenantId
- accessPolicies: formattedAccessPolicies
- sku: {
- name: vaultSku
- family: 'A'
- }
- networkAcls: !empty(networkAcls) ? {
- bypass: contains(networkAcls, 'bypass') ? networkAcls.bypass : null
- defaultAction: contains(networkAcls, 'defaultAction') ? networkAcls.defaultAction : null
- virtualNetworkRules: contains(networkAcls, 'virtualNetworkRules') ? networkAcls.virtualNetworkRules : []
- ipRules: contains(networkAcls, 'ipRules') ? networkAcls.ipRules : []
- } : null
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) && empty(networkAcls) ? 'Disabled' : null)
- }
-}
-
-resource keyVault_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: keyVault
-}
-
-resource keyVault_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: keyVault
-}]
-
-module keyVault_accessPolicies 'access-policy/main.bicep' = if (!empty(accessPolicies)) {
- name: '${uniqueString(deployment().name, location)}-KeyVault-AccessPolicies'
- params: {
- keyVaultName: keyVault.name
- accessPolicies: formattedAccessPolicies
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}
-
-module keyVault_secrets 'secret/main.bicep' = [for (secret, index) in secretList: {
- name: '${uniqueString(deployment().name, location)}-KeyVault-Secret-${index}'
- params: {
- name: secret.name
- value: secret.value
- keyVaultName: keyVault.name
- attributesEnabled: contains(secret, 'attributesEnabled') ? secret.attributesEnabled : true
- attributesExp: contains(secret, 'attributesExp') ? secret.attributesExp : -1
- attributesNbf: contains(secret, 'attributesNbf') ? secret.attributesNbf : -1
- contentType: contains(secret, 'contentType') ? secret.contentType : ''
- tags: secret.?tags ?? tags
- roleAssignments: contains(secret, 'roleAssignments') ? secret.roleAssignments : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-module keyVault_keys 'key/main.bicep' = [for (key, index) in keys: {
- name: '${uniqueString(deployment().name, location)}-KeyVault-Key-${index}'
- params: {
- name: key.name
- keyVaultName: keyVault.name
- attributesEnabled: contains(key, 'attributesEnabled') ? key.attributesEnabled : true
- attributesExp: contains(key, 'attributesExp') ? key.attributesExp : -1
- attributesNbf: contains(key, 'attributesNbf') ? key.attributesNbf : -1
- curveName: contains(key, 'curveName') ? key.curveName : 'P-256'
- keyOps: contains(key, 'keyOps') ? key.keyOps : []
- keySize: contains(key, 'keySize') ? key.keySize : -1
- kty: contains(key, 'kty') ? key.kty : 'EC'
- tags: key.?tags ?? tags
- roleAssignments: contains(key, 'roleAssignments') ? key.roleAssignments : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- rotationPolicy: contains(key, 'rotationPolicy') ? key.rotationPolicy : {}
- }
-}]
-
-module keyVault_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-keyVault-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'vault'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(keyVault.id, '/'))}-${privateEndpoint.?service ?? 'vault'}-${index}'
- serviceResourceId: keyVault.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource keyVault_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(keyVault.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: keyVault
-}]
-
-// =========== //
-// Outputs //
-// =========== //
-@description('The resource ID of the key vault.')
-output resourceId string = keyVault.id
-
-@description('The name of the resource group the key vault was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The name of the key vault.')
-output name string = keyVault.name
-
-@description('The URI of the key vault.')
-output uri string = keyVault.properties.vaultUri
-
-@description('The location the resource was deployed into.')
-output location string = keyVault.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @description('Optional. The name of the private endpoint.')
- name: string?
-
- @description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- @description('Required. Fqdn that resolves to private endpoint ip address.')
- fqdn: string?
-
- @description('Required. A list of private ip addresses of the private endpoint.')
- ipAddresses: string[]
- }[]?
-
- @description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- @description('Required. The name of the resource that is unique within a resource group.')
- name: string
-
- @description('Required. Properties of private endpoint IP configurations.')
- properties: {
- @description('Required. The ID of a group obtained from the remote resource that this private endpoint should connect to.')
- groupId: string
-
- @description('Required. The member name of a group obtained from the remote resource that this private endpoint should connect to.')
- memberName: string
-
- @description('Required. A private ip address obtained from the private endpoint\'s subnet.')
- privateIPAddress: string
- }
- }[]?
-
- @description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @description('Optional. Specify the type of lock.')
- lock: lockType
-
- @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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleAssignments: roleAssignmentType
-
- @description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/key-vault/vault/main.json b/modules/key-vault/vault/main.json
deleted file mode 100644
index 49af2cfca8..0000000000
--- a/modules/key-vault/vault/main.json
+++ /dev/null
@@ -1,2093 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "4234651984682220679"
- },
- "name": "Key Vaults",
- "description": "This module deploys a Key Vault.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "maxLength": 24,
- "metadata": {
- "description": "Required. Name of the Key Vault. Must be globally unique."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "accessPolicies": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. All access policies to create."
- }
- },
- "secrets": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. All secrets to create."
- }
- },
- "keys": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. All keys to create."
- }
- },
- "enableVaultForDeployment": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies if the vault is enabled for deployment by script or compute."
- }
- },
- "enableVaultForTemplateDeployment": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies if the vault is enabled for a template deployment."
- }
- },
- "enableVaultForDiskEncryption": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Specifies if the azure platform has access to the vault for enabling disk encryption scenarios."
- }
- },
- "enableSoftDelete": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Switch to enable/disable Key Vault's soft delete feature."
- }
- },
- "softDeleteRetentionInDays": {
- "type": "int",
- "defaultValue": 90,
- "metadata": {
- "description": "Optional. softDelete data retention days. It accepts >=7 and <=90."
- }
- },
- "enableRbacAuthorization": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. Note that management actions are always authorized with RBAC."
- }
- },
- "createMode": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The vault's create mode to indicate whether the vault need to be recovered or not. - recover or default."
- }
- },
- "enablePurgeProtection": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Provide 'true' to enable Key Vault's purge protection feature."
- }
- },
- "vaultSku": {
- "type": "string",
- "defaultValue": "premium",
- "allowedValues": [
- "premium",
- "standard"
- ],
- "metadata": {
- "description": "Optional. Specifies the SKU for the vault."
- }
- },
- "networkAcls": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Service endpoint object information. For security reasons, it is recommended to set the DefaultAction Deny."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkAcls are not set."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "formattedAccessPolicies",
- "count": "[length(parameters('accessPolicies'))]",
- "input": {
- "applicationId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'applicationId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].applicationId, '')]",
- "objectId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'objectId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].objectId, '')]",
- "permissions": "[parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].permissions]",
- "tenantId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'tenantId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].tenantId, tenant().tenantId)]"
- }
- }
- ],
- "secretList": "[if(not(empty(parameters('secrets'))), parameters('secrets').secureList, createArray())]",
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Key Vault Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')]",
- "Key Vault Certificates Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')]",
- "Key Vault Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')]",
- "Key Vault Crypto Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')]",
- "Key Vault Crypto Service Encryption User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')]",
- "Key Vault Crypto User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')]",
- "Key Vault Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')]",
- "Key Vault Secrets Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')]",
- "Key Vault Secrets User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "keyVault": {
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2022-07-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "enabledForDeployment": "[parameters('enableVaultForDeployment')]",
- "enabledForTemplateDeployment": "[parameters('enableVaultForTemplateDeployment')]",
- "enabledForDiskEncryption": "[parameters('enableVaultForDiskEncryption')]",
- "enableSoftDelete": "[parameters('enableSoftDelete')]",
- "softDeleteRetentionInDays": "[parameters('softDeleteRetentionInDays')]",
- "enableRbacAuthorization": "[parameters('enableRbacAuthorization')]",
- "createMode": "[parameters('createMode')]",
- "enablePurgeProtection": "[if(parameters('enablePurgeProtection'), parameters('enablePurgeProtection'), null())]",
- "tenantId": "[subscription().tenantId]",
- "accessPolicies": "[variables('formattedAccessPolicies')]",
- "sku": {
- "name": "[parameters('vaultSku')]",
- "family": "A"
- },
- "networkAcls": "[if(not(empty(parameters('networkAcls'))), createObject('bypass', if(contains(parameters('networkAcls'), 'bypass'), parameters('networkAcls').bypass, null()), 'defaultAction', if(contains(parameters('networkAcls'), 'defaultAction'), parameters('networkAcls').defaultAction, null()), 'virtualNetworkRules', if(contains(parameters('networkAcls'), 'virtualNetworkRules'), parameters('networkAcls').virtualNetworkRules, createArray()), 'ipRules', if(contains(parameters('networkAcls'), 'ipRules'), parameters('networkAcls').ipRules, createArray())), null())]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(and(not(empty(parameters('privateEndpoints'))), empty(parameters('networkAcls'))), 'Disabled', null()))]"
- }
- },
- "keyVault_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "keyVault_diagnosticSettings": {
- "copy": {
- "name": "keyVault_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "keyVault_roleAssignments": {
- "copy": {
- "name": "keyVault_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.KeyVault/vaults', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "keyVault_accessPolicies": {
- "condition": "[not(empty(parameters('accessPolicies')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-KeyVault-AccessPolicies', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "keyVaultName": {
- "value": "[parameters('name')]"
- },
- "accessPolicies": {
- "value": "[variables('formattedAccessPolicies')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "5636934877550105255"
- },
- "name": "Key Vault Access Policies",
- "description": "This module deploys a Key Vault Access Policy.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "keyVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment."
- }
- },
- "accessPolicies": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "formattedAccessPolicies",
- "count": "[length(parameters('accessPolicies'))]",
- "input": {
- "applicationId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'applicationId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].applicationId, '')]",
- "objectId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'objectId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].objectId, '')]",
- "permissions": "[parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].permissions]",
- "tenantId": "[if(contains(parameters('accessPolicies')[copyIndex('formattedAccessPolicies')], 'tenantId'), parameters('accessPolicies')[copyIndex('formattedAccessPolicies')].tenantId, tenant().tenantId)]"
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KeyVault/vaults/accessPolicies",
- "apiVersion": "2022-07-01",
- "name": "[format('{0}/{1}', parameters('keyVaultName'), 'add')]",
- "properties": {
- "accessPolicies": "[variables('formattedAccessPolicies')]"
- }
- }
- ],
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the access policies assignment was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the access policies assignment."
- },
- "value": "add"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the access policies assignment."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults/accessPolicies', parameters('keyVaultName'), 'add')]"
- }
- }
- }
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "keyVault_secrets": {
- "copy": {
- "name": "keyVault_secrets",
- "count": "[length(variables('secretList'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-KeyVault-Secret-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[variables('secretList')[copyIndex()].name]"
- },
- "value": {
- "value": "[variables('secretList')[copyIndex()].value]"
- },
- "keyVaultName": {
- "value": "[parameters('name')]"
- },
- "attributesEnabled": "[if(contains(variables('secretList')[copyIndex()], 'attributesEnabled'), createObject('value', variables('secretList')[copyIndex()].attributesEnabled), createObject('value', true()))]",
- "attributesExp": "[if(contains(variables('secretList')[copyIndex()], 'attributesExp'), createObject('value', variables('secretList')[copyIndex()].attributesExp), createObject('value', -1))]",
- "attributesNbf": "[if(contains(variables('secretList')[copyIndex()], 'attributesNbf'), createObject('value', variables('secretList')[copyIndex()].attributesNbf), createObject('value', -1))]",
- "contentType": "[if(contains(variables('secretList')[copyIndex()], 'contentType'), createObject('value', variables('secretList')[copyIndex()].contentType), createObject('value', ''))]",
- "tags": {
- "value": "[coalesce(tryGet(variables('secretList')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "roleAssignments": "[if(contains(variables('secretList')[copyIndex()], 'roleAssignments'), createObject('value', variables('secretList')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "14408031654729406286"
- },
- "name": "Key Vault Secrets",
- "description": "This module deploys a Key Vault Secret.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "keyVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the secret."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "attributesEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Determines whether the object is enabled."
- }
- },
- "attributesExp": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible."
- }
- },
- "attributesNbf": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Not before date in seconds since 1970-01-01T00:00:00Z."
- }
- },
- "contentType": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The content type of the secret."
- }
- },
- "value": {
- "type": "securestring",
- "metadata": {
- "description": "Required. The value of the secret. NOTE: \"value\" will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Key Vault Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')]",
- "Key Vault Certificates Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')]",
- "Key Vault Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')]",
- "Key Vault Crypto Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')]",
- "Key Vault Crypto Service Encryption User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')]",
- "Key Vault Crypto User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')]",
- "Key Vault Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')]",
- "Key Vault Secrets Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')]",
- "Key Vault Secrets User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "keyVault": {
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2022-07-01",
- "name": "[parameters('keyVaultName')]"
- },
- "secret": {
- "type": "Microsoft.KeyVault/vaults/secrets",
- "apiVersion": "2022-07-01",
- "name": "[format('{0}/{1}', parameters('keyVaultName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "contentType": "[parameters('contentType')]",
- "attributes": {
- "enabled": "[parameters('attributesEnabled')]",
- "exp": "[if(not(equals(parameters('attributesExp'), -1)), parameters('attributesExp'), null())]",
- "nbf": "[if(not(equals(parameters('attributesNbf'), -1)), parameters('attributesNbf'), null())]"
- },
- "value": "[parameters('value')]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "secret_roleAssignments": {
- "copy": {
- "name": "secret_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}/secrets/{1}', parameters('keyVaultName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.KeyVault/vaults/secrets', parameters('keyVaultName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "secret"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the secret."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the secret."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults/secrets', parameters('keyVaultName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the secret was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "keyVault_keys": {
- "copy": {
- "name": "keyVault_keys",
- "count": "[length(parameters('keys'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-KeyVault-Key-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('keys')[copyIndex()].name]"
- },
- "keyVaultName": {
- "value": "[parameters('name')]"
- },
- "attributesEnabled": "[if(contains(parameters('keys')[copyIndex()], 'attributesEnabled'), createObject('value', parameters('keys')[copyIndex()].attributesEnabled), createObject('value', true()))]",
- "attributesExp": "[if(contains(parameters('keys')[copyIndex()], 'attributesExp'), createObject('value', parameters('keys')[copyIndex()].attributesExp), createObject('value', -1))]",
- "attributesNbf": "[if(contains(parameters('keys')[copyIndex()], 'attributesNbf'), createObject('value', parameters('keys')[copyIndex()].attributesNbf), createObject('value', -1))]",
- "curveName": "[if(contains(parameters('keys')[copyIndex()], 'curveName'), createObject('value', parameters('keys')[copyIndex()].curveName), createObject('value', 'P-256'))]",
- "keyOps": "[if(contains(parameters('keys')[copyIndex()], 'keyOps'), createObject('value', parameters('keys')[copyIndex()].keyOps), createObject('value', createArray()))]",
- "keySize": "[if(contains(parameters('keys')[copyIndex()], 'keySize'), createObject('value', parameters('keys')[copyIndex()].keySize), createObject('value', -1))]",
- "kty": "[if(contains(parameters('keys')[copyIndex()], 'kty'), createObject('value', parameters('keys')[copyIndex()].kty), createObject('value', 'EC'))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('keys')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "roleAssignments": "[if(contains(parameters('keys')[copyIndex()], 'roleAssignments'), createObject('value', parameters('keys')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- },
- "rotationPolicy": "[if(contains(parameters('keys')[copyIndex()], 'rotationPolicy'), createObject('value', parameters('keys')[copyIndex()].rotationPolicy), createObject('value', createObject()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6556101606252284471"
- },
- "name": "Key Vault Keys",
- "description": "This module deploys a Key Vault Key.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "keyVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the key."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "attributesEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Determines whether the object is enabled."
- }
- },
- "attributesExp": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible."
- }
- },
- "attributesNbf": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Not before date in seconds since 1970-01-01T00:00:00Z."
- }
- },
- "curveName": {
- "type": "string",
- "defaultValue": "P-256",
- "allowedValues": [
- "P-256",
- "P-256K",
- "P-384",
- "P-521"
- ],
- "metadata": {
- "description": "Optional. The elliptic curve name."
- }
- },
- "keyOps": {
- "type": "array",
- "defaultValue": [],
- "allowedValues": [
- "decrypt",
- "encrypt",
- "import",
- "sign",
- "unwrapKey",
- "verify",
- "wrapKey"
- ],
- "metadata": {
- "description": "Optional. Array of JsonWebKeyOperation."
- }
- },
- "keySize": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. The key size in bits. For example: 2048, 3072, or 4096 for RSA."
- }
- },
- "kty": {
- "type": "string",
- "defaultValue": "EC",
- "allowedValues": [
- "EC",
- "EC-HSM",
- "RSA",
- "RSA-HSM"
- ],
- "metadata": {
- "description": "Optional. The type of the key."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "rotationPolicy": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key rotation policy properties object."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Key Vault Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')]",
- "Key Vault Certificates Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')]",
- "Key Vault Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')]",
- "Key Vault Crypto Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')]",
- "Key Vault Crypto Service Encryption User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')]",
- "Key Vault Crypto User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')]",
- "Key Vault Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')]",
- "Key Vault Secrets Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')]",
- "Key Vault Secrets User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "keyVault": {
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2022-07-01",
- "name": "[parameters('keyVaultName')]"
- },
- "key": {
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2022-07-01",
- "name": "[format('{0}/{1}', parameters('keyVaultName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "attributes": {
- "enabled": "[parameters('attributesEnabled')]",
- "exp": "[if(not(equals(parameters('attributesExp'), -1)), parameters('attributesExp'), null())]",
- "nbf": "[if(not(equals(parameters('attributesNbf'), -1)), parameters('attributesNbf'), null())]"
- },
- "curveName": "[parameters('curveName')]",
- "keyOps": "[parameters('keyOps')]",
- "keySize": "[if(not(equals(parameters('keySize'), -1)), parameters('keySize'), null())]",
- "kty": "[parameters('kty')]",
- "rotationPolicy": "[if(not(empty(parameters('rotationPolicy'))), parameters('rotationPolicy'), null())]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "key_roleAssignments": {
- "copy": {
- "name": "key_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}/keys/{1}', parameters('keyVaultName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.KeyVault/vaults/keys', parameters('keyVaultName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "key"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the key."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the key."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults/keys', parameters('keyVaultName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the key was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "keyVault_privateEndpoints": {
- "copy": {
- "name": "keyVault_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-keyVault-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'vault')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.KeyVault/vaults', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'vault'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.KeyVault/vaults', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "keyVault"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the key vault."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the key vault was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the key vault."
- },
- "value": "[parameters('name')]"
- },
- "uri": {
- "type": "string",
- "metadata": {
- "description": "The URI of the key vault."
- },
- "value": "[reference('keyVault').vaultUri]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('keyVault', '2022-07-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/key-vault/vault/secret/README.md b/modules/key-vault/vault/secret/README.md
deleted file mode 100644
index 781351c2d8..0000000000
--- a/modules/key-vault/vault/secret/README.md
+++ /dev/null
@@ -1,214 +0,0 @@
-# Key Vault Secrets `[Microsoft.KeyVault/vaults/secrets]`
-
-This module deploys a Key Vault Secret.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.KeyVault/vaults/secrets` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults/secrets) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the secret. |
-| [`value`](#parameter-value) | securestring | The value of the secret. NOTE: "value" will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVaultName`](#parameter-keyvaultname) | string | The name of the parent key vault. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`attributesEnabled`](#parameter-attributesenabled) | bool | Determines whether the object is enabled. |
-| [`attributesExp`](#parameter-attributesexp) | int | Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible. |
-| [`attributesNbf`](#parameter-attributesnbf) | int | Not before date in seconds since 1970-01-01T00:00:00Z. |
-| [`contentType`](#parameter-contenttype) | securestring | The content type of the secret. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `name`
-
-The name of the secret.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `value`
-
-The value of the secret. NOTE: "value" will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
-
-- Required: Yes
-- Type: securestring
-
-### Parameter: `keyVaultName`
-
-The name of the parent key vault. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `attributesEnabled`
-
-Determines whether the object is enabled.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `attributesExp`
-
-Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `attributesNbf`
-
-Not before date in seconds since 1970-01-01T00:00:00Z.
-
-- Required: No
-- Type: int
-- Default: `-1`
-
-### Parameter: `contentType`
-
-The content type of the secret.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the secret. |
-| `resourceGroupName` | string | The name of the resource group the secret was created in. |
-| `resourceId` | string | The resource ID of the secret. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/key-vault/vault/secret/main.bicep b/modules/key-vault/vault/secret/main.bicep
deleted file mode 100644
index c58f6f645b..0000000000
--- a/modules/key-vault/vault/secret/main.bicep
+++ /dev/null
@@ -1,133 +0,0 @@
-metadata name = 'Key Vault Secrets'
-metadata description = 'This module deploys a Key Vault Secret.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment.')
-param keyVaultName string
-
-@description('Required. The name of the secret.')
-param name string
-
-@description('Optional. Resource tags.')
-param tags object?
-
-@description('Optional. Determines whether the object is enabled.')
-param attributesEnabled bool = true
-
-@description('Optional. Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible.')
-param attributesExp int = -1
-
-@description('Optional. Not before date in seconds since 1970-01-01T00:00:00Z.')
-param attributesNbf int = -1
-
-@description('Optional. The content type of the secret.')
-@secure()
-param contentType string = ''
-
-@description('Required. The value of the secret. NOTE: "value" will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.')
-@secure()
-param value string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Key Vault Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')
- 'Key Vault Certificates Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')
- 'Key Vault Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')
- 'Key Vault Crypto Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')
- 'Key Vault Crypto Service Encryption User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')
- 'Key Vault Crypto User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')
- 'Key Vault Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')
- 'Key Vault Secrets Officer': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')
- 'Key Vault Secrets User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
- name: keyVaultName
-}
-
-resource secret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
- name: name
- parent: keyVault
- tags: tags
- properties: {
- contentType: contentType
- attributes: {
- enabled: attributesEnabled
- exp: attributesExp != -1 ? attributesExp : null
- nbf: attributesNbf != -1 ? attributesNbf : null
- }
- value: value
- }
-}
-
-resource secret_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(secret.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: secret
-}]
-
-@description('The name of the secret.')
-output name string = secret.name
-
-@description('The resource ID of the secret.')
-output resourceId string = secret.id
-
-@description('The name of the resource group the secret was created in.')
-output resourceGroupName string = resourceGroup().name
-
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/key-vault/vault/secret/main.json b/modules/key-vault/vault/secret/main.json
deleted file mode 100644
index 58bf08f760..0000000000
--- a/modules/key-vault/vault/secret/main.json
+++ /dev/null
@@ -1,254 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "3223693327720603920"
- },
- "name": "Key Vault Secrets",
- "description": "This module deploys a Key Vault Secret.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "keyVaultName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent key vault. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the secret."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "attributesEnabled": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Determines whether the object is enabled."
- }
- },
- "attributesExp": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Expiry date in seconds since 1970-01-01T00:00:00Z. For security reasons, it is recommended to set an expiration date whenever possible."
- }
- },
- "attributesNbf": {
- "type": "int",
- "defaultValue": -1,
- "metadata": {
- "description": "Optional. Not before date in seconds since 1970-01-01T00:00:00Z."
- }
- },
- "contentType": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The content type of the secret."
- }
- },
- "value": {
- "type": "securestring",
- "metadata": {
- "description": "Required. The value of the secret. NOTE: \"value\" will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Key Vault Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483')]",
- "Key Vault Certificates Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a4417e6f-fecd-4de8-b567-7b0420556985')]",
- "Key Vault Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f25e0fa2-a7c8-4377-a976-54943a77a395')]",
- "Key Vault Crypto Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')]",
- "Key Vault Crypto Service Encryption User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6')]",
- "Key Vault Crypto User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424')]",
- "Key Vault Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '21090545-7ca7-4776-b22c-e363652d74d2')]",
- "Key Vault Secrets Officer": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b86a8fe4-44ce-4948-aee5-eccb2c155cd7')]",
- "Key Vault Secrets User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4633458b-17de-408a-b874-0445c86b69e6')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "keyVault": {
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2022-07-01",
- "name": "[parameters('keyVaultName')]"
- },
- "secret": {
- "type": "Microsoft.KeyVault/vaults/secrets",
- "apiVersion": "2022-07-01",
- "name": "[format('{0}/{1}', parameters('keyVaultName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "contentType": "[parameters('contentType')]",
- "attributes": {
- "enabled": "[parameters('attributesEnabled')]",
- "exp": "[if(not(equals(parameters('attributesExp'), -1)), parameters('attributesExp'), null())]",
- "nbf": "[if(not(equals(parameters('attributesNbf'), -1)), parameters('attributesNbf'), null())]"
- },
- "value": "[parameters('value')]"
- },
- "dependsOn": [
- "keyVault"
- ]
- },
- "secret_roleAssignments": {
- "copy": {
- "name": "secret_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.KeyVault/vaults/{0}/secrets/{1}', parameters('keyVaultName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.KeyVault/vaults/secrets', parameters('keyVaultName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "secret"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the secret."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the secret."
- },
- "value": "[resourceId('Microsoft.KeyVault/vaults/secrets', parameters('keyVaultName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the secret was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/key-vault/vault/secret/version.json b/modules/key-vault/vault/secret/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/key-vault/vault/secret/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/key-vault/vault/tests/e2e/accesspolicies/dependencies.bicep b/modules/key-vault/vault/tests/e2e/accesspolicies/dependencies.bicep
deleted file mode 100644
index 152b6bd1bb..0000000000
--- a/modules/key-vault/vault/tests/e2e/accesspolicies/dependencies.bicep
+++ /dev/null
@@ -1,46 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.KeyVault'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/key-vault/vault/tests/e2e/accesspolicies/main.test.bicep b/modules/key-vault/vault/tests/e2e/accesspolicies/main.test.bicep
deleted file mode 100644
index 78e0646b07..0000000000
--- a/modules/key-vault/vault/tests/e2e/accesspolicies/main.test.bicep
+++ /dev/null
@@ -1,135 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${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 = 'kvvap'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}03'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}01'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}01'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}002'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- enablePurgeProtection: false
- accessPolicies: [
- {
- objectId: nestedDependencies.outputs.managedIdentityPrincipalId
- permissions: {
- keys: [
- 'get'
- 'list'
- 'update'
- ]
- secrets: [
- 'get'
- 'list'
- ]
- }
- tenantId: tenant().tenantId
- }
- {
- objectId: nestedDependencies.outputs.managedIdentityPrincipalId
- permissions: {
- certificates: [
- 'backup'
- 'create'
- 'delete'
- ]
- secrets: [
- 'get'
- 'list'
- ]
- }
- }
- ]
- networkAcls: {
- bypass: 'AzureServices'
- defaultAction: 'Deny'
- ipRules: [
- {
- value: '40.74.28.0/23'
- }
- ]
- virtualNetworkRules: [
- {
- id: nestedDependencies.outputs.subnetResourceId
- ignoreMissingVnetServiceEndpoint: false
- }
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/key-vault/vault/tests/e2e/defaults/main.test.bicep b/modules/key-vault/vault/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 05bd9adc84..0000000000
--- a/modules/key-vault/vault/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,51 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${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 = 'kvvmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}002'
- // Only for testing purposes
- enablePurgeProtection: false
- }
-}]
diff --git a/modules/key-vault/vault/tests/e2e/max/dependencies.bicep b/modules/key-vault/vault/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 6c3754d07f..0000000000
--- a/modules/key-vault/vault/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,65 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.KeyVault'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.vaultcore.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/key-vault/vault/tests/e2e/max/main.test.bicep b/modules/key-vault/vault/tests/e2e/max/main.test.bicep
deleted file mode 100644
index e2df0ea2cd..0000000000
--- a/modules/key-vault/vault/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,190 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${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 = 'kvvmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}03'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}01'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}01'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}002'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- // Only for testing purposes
- enablePurgeProtection: false
- enableRbacAuthorization: true
- keys: [
- {
- attributesExp: 1725109032
- attributesNbf: 10000
- name: 'keyName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- rotationPolicy: {
- attributes: {
- expiryTime: 'P2Y'
- }
- lifetimeActions: [
- {
- trigger: {
- timeBeforeExpiry: 'P2M'
- }
- action: {
- type: 'Rotate'
- }
- }
- {
- trigger: {
- timeBeforeExpiry: 'P30D'
- }
- action: {
- type: 'Notify'
- }
- }
- ]
- }
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- networkAcls: {
- bypass: 'AzureServices'
- defaultAction: 'Deny'
- ipRules: [
- {
- value: '40.74.28.0/23'
- }
- ]
- virtualNetworkRules: [
- {
- id: nestedDependencies.outputs.subnetResourceId
- ignoreMissingVnetServiceEndpoint: false
- }
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'vault'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- secrets: {
- secureList: [
- {
- attributesExp: 1702648632
- attributesNbf: 10000
- contentType: 'Something'
- name: 'secretName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- value: 'secretValue'
- }
- ]
- }
- softDeleteRetentionInDays: 7
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/key-vault/vault/tests/e2e/pe/dependencies.bicep b/modules/key-vault/vault/tests/e2e/pe/dependencies.bicep
deleted file mode 100644
index b796986047..0000000000
--- a/modules/key-vault/vault/tests/e2e/pe/dependencies.bicep
+++ /dev/null
@@ -1,54 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.KeyVault'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.vaultcore.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/key-vault/vault/tests/e2e/pe/main.test.bicep b/modules/key-vault/vault/tests/e2e/pe/main.test.bicep
deleted file mode 100644
index ec942371bb..0000000000
--- a/modules/key-vault/vault/tests/e2e/pe/main.test.bicep
+++ /dev/null
@@ -1,138 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${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 = 'kvvpe'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}03'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}01'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}01'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- // Only for testing purposes
- enablePurgeProtection: false
- enableRbacAuthorization: true
- networkAcls: {
- bypass: 'AzureServices'
- defaultAction: 'Deny'
- ipRules: [
- {
- value: '40.74.28.0/23'
- }
- ]
- virtualNetworkRules: [
- {
- id: nestedDependencies.outputs.subnetResourceId
- ignoreMissingVnetServiceEndpoint: false
- }
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- name: 'dep-${namePrefix}-pe-${serviceShort}'
- service: 'vault'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- ipConfigurations: [
- {
- name: 'myIPconfig'
- properties: {
- groupId: 'vault'
- memberName: 'default'
- privateIPAddress: '10.0.0.10'
- }
- }
- ]
- customDnsConfigs: [
- {
- fqdn: 'abc.keyvault.com'
- ipAddresses: [
- '10.0.0.10'
- ]
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/key-vault/vault/tests/e2e/waf-aligned/dependencies.bicep b/modules/key-vault/vault/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 6c3754d07f..0000000000
--- a/modules/key-vault/vault/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,65 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- serviceEndpoints: [
- {
- service: 'Microsoft.KeyVault'
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.vaultcore.azure.net'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep b/modules/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 6e41928c3f..0000000000
--- a/modules/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,190 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${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 = 'kvvwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}03'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}01'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}01'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}002'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- // Only for testing purposes
- enablePurgeProtection: false
- enableRbacAuthorization: true
- keys: [
- {
- attributesExp: 1725109032
- attributesNbf: 10000
- name: 'keyName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- rotationPolicy: {
- attributes: {
- expiryTime: 'P2Y'
- }
- lifetimeActions: [
- {
- trigger: {
- timeBeforeExpiry: 'P2M'
- }
- action: {
- type: 'Rotate'
- }
- }
- {
- trigger: {
- timeBeforeExpiry: 'P30D'
- }
- action: {
- type: 'Notify'
- }
- }
- ]
- }
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- networkAcls: {
- bypass: 'AzureServices'
- defaultAction: 'Deny'
- ipRules: [
- {
- value: '40.74.28.0/23'
- }
- ]
- virtualNetworkRules: [
- {
- id: nestedDependencies.outputs.subnetResourceId
- ignoreMissingVnetServiceEndpoint: false
- }
- ]
- }
- privateEndpoints: [
- {
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- service: 'vault'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- secrets: {
- secureList: [
- {
- attributesExp: 1702648632
- attributesNbf: 10000
- contentType: 'Something'
- name: 'secretName'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- value: 'secretValue'
- }
- ]
- }
- softDeleteRetentionInDays: 7
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/key-vault/vault/version.json b/modules/key-vault/vault/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/key-vault/vault/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/kubernetes-configuration/extension/MOVED-TO-AVM.md b/modules/kubernetes-configuration/extension/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/kubernetes-configuration/extension/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/kubernetes-configuration/extension/README.md b/modules/kubernetes-configuration/extension/README.md
index 638d8bb08c..f9afac145d 100644
--- a/modules/kubernetes-configuration/extension/README.md
+++ b/modules/kubernetes-configuration/extension/README.md
@@ -1,499 +1,7 @@
-# Kubernetes Configuration Extensions `[Microsoft.KubernetesConfiguration/extensions]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`clusterName`](#parameter-clustername) | string | The name of the AKS cluster that should be configured. |
-| [`extensionType`](#parameter-extensiontype) | string | Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. |
-| [`name`](#parameter-name) | string | The name of the Flux Configuration. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`configurationProtectedSettings`](#parameter-configurationprotectedsettings) | secureObject | Configuration settings that are sensitive, as name-value pairs for configuring this extension. |
-| [`configurationSettings`](#parameter-configurationsettings) | object | Configuration settings, as name-value pairs for configuring this extension. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`fluxConfigurations`](#parameter-fluxconfigurations) | array | A list of flux configuraitons. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`releaseNamespace`](#parameter-releasenamespace) | string | Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created. |
-| [`releaseTrain`](#parameter-releasetrain) | string | ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is "true". |
-| [`targetNamespace`](#parameter-targetnamespace) | string | Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created. |
-| [`version`](#parameter-version) | string | Version of the extension for this extension, if it is "pinned" to a specific version. |
-
-### Parameter: `clusterName`
-
-The name of the AKS cluster that should be configured.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `extensionType`
-
-Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the Flux Configuration.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `configurationProtectedSettings`
-
-Configuration settings that are sensitive, as name-value pairs for configuring this extension.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `configurationSettings`
-
-Configuration settings, as name-value pairs for configuring this extension.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `fluxConfigurations`
-
-A list of flux configuraitons.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `releaseNamespace`
-
-Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `releaseTrain`
-
-ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is "true".
-
-- Required: No
-- Type: string
-- Default: `'Stable'`
-
-### Parameter: `targetNamespace`
-
-Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `version`
-
-Version of the extension for this extension, if it is "pinned" to a specific version.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the extension. |
-| `resourceGroupName` | string | The name of the resource group the extension was deployed into. |
-| `resourceId` | string | The resource ID of the extension. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/kubernetes-configuration/flux-configuration` | Local reference |
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/kubernetes-configuration/extension/main.bicep b/modules/kubernetes-configuration/extension/main.bicep
deleted file mode 100644
index 6ea377171d..0000000000
--- a/modules/kubernetes-configuration/extension/main.bicep
+++ /dev/null
@@ -1,106 +0,0 @@
-metadata name = 'Kubernetes Configuration Extensions'
-metadata description = 'This module deploys a Kubernetes Configuration Extension.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Flux Configuration.')
-param name string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. The name of the AKS cluster that should be configured.')
-param clusterName string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Configuration settings that are sensitive, as name-value pairs for configuring this extension.')
-@secure()
-param configurationProtectedSettings object = {}
-
-@description('Optional. Configuration settings, as name-value pairs for configuring this extension.')
-param configurationSettings object = {}
-
-@description('Required. Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.')
-param extensionType string
-
-@description('Optional. ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is "true".')
-param releaseTrain string = 'Stable'
-
-@description('Optional. Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created.')
-param releaseNamespace string = ''
-
-@description('Optional. Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created.')
-param targetNamespace string = ''
-
-@description('Optional. Version of the extension for this extension, if it is "pinned" to a specific version.')
-param version string = ''
-
-@description('Optional. A list of flux configuraitons.')
-param fluxConfigurations array = []
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-07-01' existing = {
- name: clusterName
-}
-
-resource extension 'Microsoft.KubernetesConfiguration/extensions@2022-03-01' = {
- name: name
- scope: managedCluster
- properties: {
- autoUpgradeMinorVersion: !empty(version) ? false : true
- configurationProtectedSettings: !empty(configurationProtectedSettings) ? configurationProtectedSettings : {}
- configurationSettings: !empty(configurationSettings) ? configurationSettings : {}
- extensionType: extensionType
- releaseTrain: !empty(releaseTrain) ? releaseTrain : null
- scope: {
- cluster: !empty(releaseNamespace) ? {
- releaseNamespace: releaseNamespace
- } : null
- namespace: !empty(targetNamespace) ? {
- targetNamespace: targetNamespace
- } : null
- }
- version: !empty(version) ? version : null
- }
-}
-
-module fluxConfiguration '../../kubernetes-configuration/flux-configuration/main.bicep' = [for (fluxConfiguration, index) in fluxConfigurations: {
- name: '${uniqueString(deployment().name, location)}-ManagedCluster-FluxConfiguration${index}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- clusterName: managedCluster.name
- scope: fluxConfiguration.scope
- namespace: fluxConfiguration.namespace
- sourceKind: contains(fluxConfiguration, 'gitRepository') ? 'GitRepository' : 'Bucket'
- name: contains(fluxConfiguration, 'name') ? fluxConfiguration.name : toLower('${managedCluster.name}-fluxconfiguration${index}')
- bucket: contains(fluxConfiguration, 'bucket') ? fluxConfiguration.bucket : {}
- configurationProtectedSettings: contains(fluxConfiguration, 'configurationProtectedSettings') ? fluxConfiguration.configurationProtectedSettings : {}
- gitRepository: contains(fluxConfiguration, 'gitRepository') ? fluxConfiguration.gitRepository : {}
- kustomizations: contains(fluxConfiguration, 'kustomizations') ? fluxConfiguration.kustomizations : {}
- suspend: contains(fluxConfiguration, 'suspend') ? fluxConfiguration.suspend : false
- }
- dependsOn: [
- extension
- ]
-}]
-
-@description('The name of the extension.')
-output name string = extension.name
-
-@description('The resource ID of the extension.')
-output resourceId string = extension.id
-
-@description('The name of the resource group the extension was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/kubernetes-configuration/extension/main.json b/modules/kubernetes-configuration/extension/main.json
deleted file mode 100644
index adb39135d7..0000000000
--- a/modules/kubernetes-configuration/extension/main.json
+++ /dev/null
@@ -1,351 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "18265527122738367400"
- },
- "name": "Kubernetes Configuration Extensions",
- "description": "This module deploys a Kubernetes Configuration Extension.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Flux Configuration."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "clusterName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AKS cluster that should be configured."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "configurationProtectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configuration settings that are sensitive, as name-value pairs for configuring this extension."
- }
- },
- "configurationSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configuration settings, as name-value pairs for configuring this extension."
- }
- },
- "extensionType": {
- "type": "string",
- "metadata": {
- "description": "Required. Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher."
- }
- },
- "releaseTrain": {
- "type": "string",
- "defaultValue": "Stable",
- "metadata": {
- "description": "Optional. ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is \"true\"."
- }
- },
- "releaseNamespace": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created."
- }
- },
- "targetNamespace": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created."
- }
- },
- "version": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Version of the extension for this extension, if it is \"pinned\" to a specific version."
- }
- },
- "fluxConfigurations": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. A list of flux configuraitons."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KubernetesConfiguration/extensions",
- "apiVersion": "2022-03-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('clusterName'))]",
- "name": "[parameters('name')]",
- "properties": {
- "autoUpgradeMinorVersion": "[if(not(empty(parameters('version'))), false(), true())]",
- "configurationProtectedSettings": "[if(not(empty(parameters('configurationProtectedSettings'))), parameters('configurationProtectedSettings'), createObject())]",
- "configurationSettings": "[if(not(empty(parameters('configurationSettings'))), parameters('configurationSettings'), createObject())]",
- "extensionType": "[parameters('extensionType')]",
- "releaseTrain": "[if(not(empty(parameters('releaseTrain'))), parameters('releaseTrain'), null())]",
- "scope": {
- "cluster": "[if(not(empty(parameters('releaseNamespace'))), createObject('releaseNamespace', parameters('releaseNamespace')), null())]",
- "namespace": "[if(not(empty(parameters('targetNamespace'))), createObject('targetNamespace', parameters('targetNamespace')), null())]"
- },
- "version": "[if(not(empty(parameters('version'))), parameters('version'), null())]"
- }
- },
- {
- "copy": {
- "name": "fluxConfiguration",
- "count": "[length(parameters('fluxConfigurations'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ManagedCluster-FluxConfiguration{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "[parameters('enableDefaultTelemetry')]"
- },
- "clusterName": {
- "value": "[parameters('clusterName')]"
- },
- "scope": {
- "value": "[parameters('fluxConfigurations')[copyIndex()].scope]"
- },
- "namespace": {
- "value": "[parameters('fluxConfigurations')[copyIndex()].namespace]"
- },
- "sourceKind": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'gitRepository'), createObject('value', 'GitRepository'), createObject('value', 'Bucket'))]",
- "name": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'name'), createObject('value', parameters('fluxConfigurations')[copyIndex()].name), createObject('value', toLower(format('{0}-fluxconfiguration{1}', parameters('clusterName'), copyIndex()))))]",
- "bucket": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'bucket'), createObject('value', parameters('fluxConfigurations')[copyIndex()].bucket), createObject('value', createObject()))]",
- "configurationProtectedSettings": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'configurationProtectedSettings'), createObject('value', parameters('fluxConfigurations')[copyIndex()].configurationProtectedSettings), createObject('value', createObject()))]",
- "gitRepository": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'gitRepository'), createObject('value', parameters('fluxConfigurations')[copyIndex()].gitRepository), createObject('value', createObject()))]",
- "kustomizations": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'kustomizations'), createObject('value', parameters('fluxConfigurations')[copyIndex()].kustomizations), createObject('value', createObject()))]",
- "suspend": "[if(contains(parameters('fluxConfigurations')[copyIndex()], 'suspend'), createObject('value', parameters('fluxConfigurations')[copyIndex()].suspend), createObject('value', false()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8985718648814286209"
- },
- "name": "Kubernetes Configuration Flux Configurations",
- "description": "This module deploys a Kubernetes Configuration Flux Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Flux Configuration."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "clusterName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AKS cluster that should be configured."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "bucket": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters to reconcile to the GitRepository source kind type."
- }
- },
- "configurationProtectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key-value pairs of protected configuration settings for the configuration."
- }
- },
- "gitRepository": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters to reconcile to the GitRepository source kind type."
- }
- },
- "kustomizations": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster."
- }
- },
- "namespace": {
- "type": "string",
- "metadata": {
- "description": "Required. The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only."
- }
- },
- "scope": {
- "type": "string",
- "allowedValues": [
- "cluster",
- "namespace"
- ],
- "metadata": {
- "description": "Required. Scope at which the configuration will be installed."
- }
- },
- "sourceKind": {
- "type": "string",
- "allowedValues": [
- "Bucket",
- "GitRepository"
- ],
- "metadata": {
- "description": "Required. Source Kind to pull the configuration data from."
- }
- },
- "suspend": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether this configuration should suspend its reconciliation of its kustomizations and sources."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KubernetesConfiguration/fluxConfigurations",
- "apiVersion": "2022-03-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('clusterName'))]",
- "name": "[parameters('name')]",
- "properties": {
- "bucket": "[if(not(empty(parameters('bucket'))), parameters('bucket'), null())]",
- "configurationProtectedSettings": "[if(not(empty(parameters('configurationProtectedSettings'))), parameters('configurationProtectedSettings'), createObject())]",
- "gitRepository": "[if(not(empty(parameters('gitRepository'))), parameters('gitRepository'), null())]",
- "kustomizations": "[if(not(empty(parameters('kustomizations'))), parameters('kustomizations'), createObject())]",
- "namespace": "[parameters('namespace')]",
- "scope": "[parameters('scope')]",
- "sourceKind": "[parameters('sourceKind')]",
- "suspend": "[parameters('suspend')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the flux configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the flux configuration."
- },
- "value": "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/fluxConfigurations', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the flux configuration was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/extensions', parameters('name'))]"
- ]
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the extension."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the extension."
- },
- "value": "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/extensions', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the extension was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/kubernetes-configuration/extension/tests/e2e/defaults/dependencies.bicep b/modules/kubernetes-configuration/extension/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index 0169763539..0000000000
--- a/modules/kubernetes-configuration/extension/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,32 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the AKS cluster to create.')
-param clusterName string
-
-@description('Required. The name of the AKS cluster nodes resource group to create.')
-param clusterNodeResourceGroupName string
-
-resource cluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
- name: clusterName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- dnsPrefix: clusterName
- nodeResourceGroup: clusterNodeResourceGroupName
- agentPoolProfiles: [
- {
- name: 'agentpool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- osType: 'Linux'
- mode: 'System'
- }
- ]
- }
-}
-
-@description('The name of the created AKS cluster.')
-output clusterName string = cluster.name
diff --git a/modules/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep b/modules/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 87d6cd850b..0000000000
--- a/modules/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,62 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.extensions-${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 = 'kcemin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- clusterName: 'dep-${namePrefix}-aks-${serviceShort}'
- clusterNodeResourceGroupName: 'nodes-${resourceGroupName}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- clusterName: nestedDependencies.outputs.clusterName
- extensionType: 'microsoft.flux'
- releaseNamespace: 'flux-system'
- releaseTrain: 'Stable'
- }
-}]
diff --git a/modules/kubernetes-configuration/extension/tests/e2e/max/dependencies.bicep b/modules/kubernetes-configuration/extension/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 0169763539..0000000000
--- a/modules/kubernetes-configuration/extension/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,32 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the AKS cluster to create.')
-param clusterName string
-
-@description('Required. The name of the AKS cluster nodes resource group to create.')
-param clusterNodeResourceGroupName string
-
-resource cluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
- name: clusterName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- dnsPrefix: clusterName
- nodeResourceGroup: clusterNodeResourceGroupName
- agentPoolProfiles: [
- {
- name: 'agentpool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- osType: 'Linux'
- mode: 'System'
- }
- ]
- }
-}
-
-@description('The name of the created AKS cluster.')
-output clusterName string = cluster.name
diff --git a/modules/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep b/modules/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep
deleted file mode 100644
index bed927f07f..0000000000
--- a/modules/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,95 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.extensions-${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 = 'kcemax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- clusterName: 'dep-${namePrefix}-aks-${serviceShort}'
- clusterNodeResourceGroupName: 'nodes-${resourceGroupName}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- clusterName: nestedDependencies.outputs.clusterName
- extensionType: 'microsoft.flux'
- configurationSettings: {
- 'image-automation-controller.enabled': 'false'
- 'image-reflector-controller.enabled': 'false'
- 'kustomize-controller.enabled': 'true'
- 'notification-controller.enabled': 'false'
- 'source-controller.enabled': 'true'
- }
- releaseNamespace: 'flux-system'
- releaseTrain: 'Stable'
- version: '0.5.2'
- fluxConfigurations: [
- {
- namespace: 'flux-system'
- scope: 'cluster'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/mspnp/aks-baseline'
- }
- kustomizations: {
- unified: {
- dependsOn: []
- force: false
- path: './cluster-manifests'
- prune: true
- syncIntervalInSeconds: 300
- timeoutInSeconds: 300
- }
- }
- }
- ]
- }
-}]
diff --git a/modules/kubernetes-configuration/extension/tests/e2e/waf-aligned/dependencies.bicep b/modules/kubernetes-configuration/extension/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 0169763539..0000000000
--- a/modules/kubernetes-configuration/extension/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,32 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the AKS cluster to create.')
-param clusterName string
-
-@description('Required. The name of the AKS cluster nodes resource group to create.')
-param clusterNodeResourceGroupName string
-
-resource cluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
- name: clusterName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- dnsPrefix: clusterName
- nodeResourceGroup: clusterNodeResourceGroupName
- agentPoolProfiles: [
- {
- name: 'agentpool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- osType: 'Linux'
- mode: 'System'
- }
- ]
- }
-}
-
-@description('The name of the created AKS cluster.')
-output clusterName string = cluster.name
diff --git a/modules/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep b/modules/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 79318166b8..0000000000
--- a/modules/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,95 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.extensions-${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 = 'kcewaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- clusterName: 'dep-${namePrefix}-aks-${serviceShort}'
- clusterNodeResourceGroupName: 'nodes-${resourceGroupName}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- clusterName: nestedDependencies.outputs.clusterName
- extensionType: 'microsoft.flux'
- configurationSettings: {
- 'image-automation-controller.enabled': 'false'
- 'image-reflector-controller.enabled': 'false'
- 'kustomize-controller.enabled': 'true'
- 'notification-controller.enabled': 'false'
- 'source-controller.enabled': 'true'
- }
- releaseNamespace: 'flux-system'
- releaseTrain: 'Stable'
- version: '0.5.2'
- fluxConfigurations: [
- {
- namespace: 'flux-system'
- scope: 'cluster'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/mspnp/aks-baseline'
- }
- kustomizations: {
- unified: {
- dependsOn: []
- force: false
- path: './cluster-manifests'
- prune: true
- syncIntervalInSeconds: 300
- timeoutInSeconds: 300
- }
- }
- }
- ]
- }
-}]
diff --git a/modules/kubernetes-configuration/extension/version.json b/modules/kubernetes-configuration/extension/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/kubernetes-configuration/extension/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/kubernetes-configuration/flux-configuration/MOVED-TO-AVM.md b/modules/kubernetes-configuration/flux-configuration/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/kubernetes-configuration/flux-configuration/README.md b/modules/kubernetes-configuration/flux-configuration/README.md
index 8f11c31731..efac5065e6 100644
--- a/modules/kubernetes-configuration/flux-configuration/README.md
+++ b/modules/kubernetes-configuration/flux-configuration/README.md
@@ -1,512 +1,7 @@
-# Kubernetes Configuration Flux Configurations `[Microsoft.KubernetesConfiguration/fluxConfigurations]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`clusterName`](#parameter-clustername) | string | The name of the AKS cluster that should be configured. |
-| [`kustomizations`](#parameter-kustomizations) | object | Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. |
-| [`name`](#parameter-name) | string | The name of the Flux Configuration. |
-| [`namespace`](#parameter-namespace) | string | The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only. |
-| [`scope`](#parameter-scope) | string | Scope at which the configuration will be installed. |
-| [`sourceKind`](#parameter-sourcekind) | string | Source Kind to pull the configuration data from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`bucket`](#parameter-bucket) | object | Parameters to reconcile to the GitRepository source kind type. |
-| [`configurationProtectedSettings`](#parameter-configurationprotectedsettings) | secureObject | Key-value pairs of protected configuration settings for the configuration. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`gitRepository`](#parameter-gitrepository) | object | Parameters to reconcile to the GitRepository source kind type. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`suspend`](#parameter-suspend) | bool | Whether this configuration should suspend its reconciliation of its kustomizations and sources. |
-
-### Parameter: `clusterName`
-
-The name of the AKS cluster that should be configured.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `kustomizations`
-
-Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.
-
-- Required: Yes
-- Type: object
-
-### Parameter: `name`
-
-The name of the Flux Configuration.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `namespace`
-
-The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `scope`
-
-Scope at which the configuration will be installed.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'cluster'
- 'namespace'
- ]
- ```
-
-### Parameter: `sourceKind`
-
-Source Kind to pull the configuration data from.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Bucket'
- 'GitRepository'
- ]
- ```
-
-### Parameter: `bucket`
-
-Parameters to reconcile to the GitRepository source kind type.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `configurationProtectedSettings`
-
-Key-value pairs of protected configuration settings for the configuration.
-
-- Required: No
-- Type: secureObject
-- Default: `{}`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `gitRepository`
-
-Parameters to reconcile to the GitRepository source kind type.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `suspend`
-
-Whether this configuration should suspend its reconciliation of its kustomizations and sources.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the flux configuration. |
-| `resourceGroupName` | string | The name of the resource group the flux configuration was deployed into. |
-| `resourceId` | string | The resource ID of the flux configuration. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Prerequisites
-
-Registration of your subscription with the AKS-ExtensionManager feature flag. Use the following command:
-
-```powershell
-az feature register --namespace Microsoft.ContainerService --name AKS-ExtensionManager
-```
-
-Registration of the following Azure service providers. (It's OK to re-register an existing provider.)
-
-```powershell
-az provider register --namespace Microsoft.Kubernetes
-az provider register --namespace Microsoft.ContainerService
-az provider register --namespace Microsoft.KubernetesConfiguration
-```
-
-For Details see [Prerequisites](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/tutorial-use-gitops-flux2)
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/kubernetes-configuration/flux-configuration/main.bicep b/modules/kubernetes-configuration/flux-configuration/main.bicep
deleted file mode 100644
index cc2a29c4d0..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/main.bicep
+++ /dev/null
@@ -1,88 +0,0 @@
-metadata name = 'Kubernetes Configuration Flux Configurations'
-metadata description = 'This module deploys a Kubernetes Configuration Flux Configuration.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the Flux Configuration.')
-param name string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Required. The name of the AKS cluster that should be configured.')
-param clusterName string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Parameters to reconcile to the GitRepository source kind type.')
-param bucket object = {}
-
-@description('Optional. Key-value pairs of protected configuration settings for the configuration.')
-@secure()
-param configurationProtectedSettings object = {}
-
-@description('Optional. Parameters to reconcile to the GitRepository source kind type.')
-param gitRepository object = {}
-
-@description('Required. Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.')
-param kustomizations object
-
-@description('Required. The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.')
-param namespace string
-
-@allowed([
- 'cluster'
- 'namespace'
-])
-@description('Required. Scope at which the configuration will be installed.')
-param scope string
-
-@allowed([
- 'Bucket'
- 'GitRepository'
-])
-@description('Required. Source Kind to pull the configuration data from.')
-param sourceKind string
-
-@description('Optional. Whether this configuration should suspend its reconciliation of its kustomizations and sources.')
-param suspend bool = false
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-07-01' existing = {
- name: clusterName
-}
-
-resource fluxConfiguration 'Microsoft.KubernetesConfiguration/fluxConfigurations@2023-05-01' = {
- name: name
- scope: managedCluster
- properties: {
- bucket: !empty(bucket) ? bucket : null
- configurationProtectedSettings: !empty(configurationProtectedSettings) ? configurationProtectedSettings : {}
- gitRepository: !empty(gitRepository) ? gitRepository : null
- kustomizations: kustomizations
- namespace: namespace
- scope: scope
- sourceKind: sourceKind
- suspend: suspend
- }
-}
-
-@description('The name of the flux configuration.')
-output name string = fluxConfiguration.name
-
-@description('The resource ID of the flux configuration.')
-output resourceId string = fluxConfiguration.id
-
-@description('The name of the resource group the flux configuration was deployed into.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/kubernetes-configuration/flux-configuration/main.json b/modules/kubernetes-configuration/flux-configuration/main.json
deleted file mode 100644
index e8e9b2bf1d..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/main.json
+++ /dev/null
@@ -1,157 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10031296768791737313"
- },
- "name": "Kubernetes Configuration Flux Configurations",
- "description": "This module deploys a Kubernetes Configuration Flux Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the Flux Configuration."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "clusterName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the AKS cluster that should be configured."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "bucket": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters to reconcile to the GitRepository source kind type."
- }
- },
- "configurationProtectedSettings": {
- "type": "secureObject",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Key-value pairs of protected configuration settings for the configuration."
- }
- },
- "gitRepository": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters to reconcile to the GitRepository source kind type."
- }
- },
- "kustomizations": {
- "type": "object",
- "metadata": {
- "description": "Required. Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster."
- }
- },
- "namespace": {
- "type": "string",
- "metadata": {
- "description": "Required. The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only."
- }
- },
- "scope": {
- "type": "string",
- "allowedValues": [
- "cluster",
- "namespace"
- ],
- "metadata": {
- "description": "Required. Scope at which the configuration will be installed."
- }
- },
- "sourceKind": {
- "type": "string",
- "allowedValues": [
- "Bucket",
- "GitRepository"
- ],
- "metadata": {
- "description": "Required. Source Kind to pull the configuration data from."
- }
- },
- "suspend": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Whether this configuration should suspend its reconciliation of its kustomizations and sources."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.KubernetesConfiguration/fluxConfigurations",
- "apiVersion": "2023-05-01",
- "scope": "[format('Microsoft.ContainerService/managedClusters/{0}', parameters('clusterName'))]",
- "name": "[parameters('name')]",
- "properties": {
- "bucket": "[if(not(empty(parameters('bucket'))), parameters('bucket'), null())]",
- "configurationProtectedSettings": "[if(not(empty(parameters('configurationProtectedSettings'))), parameters('configurationProtectedSettings'), createObject())]",
- "gitRepository": "[if(not(empty(parameters('gitRepository'))), parameters('gitRepository'), null())]",
- "kustomizations": "[parameters('kustomizations')]",
- "namespace": "[parameters('namespace')]",
- "scope": "[parameters('scope')]",
- "sourceKind": "[parameters('sourceKind')]",
- "suspend": "[parameters('suspend')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the flux configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the flux configuration."
- },
- "value": "[extensionResourceId(resourceId('Microsoft.ContainerService/managedClusters', parameters('clusterName')), 'Microsoft.KubernetesConfiguration/fluxConfigurations', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the flux configuration was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/kubernetes-configuration/flux-configuration/tests/e2e/defaults/dependencies.bicep b/modules/kubernetes-configuration/flux-configuration/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index 0bf942bbd1..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the AKS cluster to create.')
-param clusterName string
-
-@description('Required. The name of the AKS cluster extension to create.')
-param clusterExtensionName string
-
-@description('Required. The name of the AKS cluster nodes resource group to create.')
-param clusterNodeResourceGroupName string
-
-resource cluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
- name: clusterName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- dnsPrefix: clusterName
- nodeResourceGroup: clusterNodeResourceGroupName
- agentPoolProfiles: [
- {
- name: 'agentpool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- osType: 'Linux'
- mode: 'System'
- }
- ]
- }
-}
-
-resource extension 'Microsoft.KubernetesConfiguration/extensions@2022-03-01' = {
- scope: cluster
- name: clusterExtensionName
- properties: {
- extensionType: 'microsoft.flux'
- releaseTrain: 'Stable'
- scope: {
- cluster: {
- releaseNamespace: 'flux-system'
- }
- }
- }
-}
-
-@description('The name of the created AKS cluster.')
-output clusterName string = cluster.name
diff --git a/modules/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep b/modules/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 55fa46533f..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,88 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.fluxconfigurations-${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 = 'kcfcmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- clusterName: 'dep-${namePrefix}-aks-${serviceShort}'
- clusterExtensionName: '${namePrefix}${serviceShort}001'
- clusterNodeResourceGroupName: 'nodes-${resourceGroupName}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- clusterName: nestedDependencies.outputs.clusterName
- namespace: 'flux-system'
- scope: 'cluster'
- sourceKind: 'GitRepository'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/mspnp/aks-baseline'
- }
- kustomizations: {
- unified: {
- dependsOn: []
- force: false
- path: './cluster-manifests'
- prune: true
- syncIntervalInSeconds: 300
- timeoutInSeconds: 300
- postBuild: {
- substitute: {
- TEST_VAR1: 'foo'
- TEST_VAR2: 'bar'
- }
- }
- }
- }
- }
-}]
diff --git a/modules/kubernetes-configuration/flux-configuration/tests/e2e/max/dependencies.bicep b/modules/kubernetes-configuration/flux-configuration/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 0bf942bbd1..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the AKS cluster to create.')
-param clusterName string
-
-@description('Required. The name of the AKS cluster extension to create.')
-param clusterExtensionName string
-
-@description('Required. The name of the AKS cluster nodes resource group to create.')
-param clusterNodeResourceGroupName string
-
-resource cluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
- name: clusterName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- dnsPrefix: clusterName
- nodeResourceGroup: clusterNodeResourceGroupName
- agentPoolProfiles: [
- {
- name: 'agentpool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- osType: 'Linux'
- mode: 'System'
- }
- ]
- }
-}
-
-resource extension 'Microsoft.KubernetesConfiguration/extensions@2022-03-01' = {
- scope: cluster
- name: clusterExtensionName
- properties: {
- extensionType: 'microsoft.flux'
- releaseTrain: 'Stable'
- scope: {
- cluster: {
- releaseNamespace: 'flux-system'
- }
- }
- }
-}
-
-@description('The name of the created AKS cluster.')
-output clusterName string = cluster.name
diff --git a/modules/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep b/modules/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep
deleted file mode 100644
index fbc4aa7069..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,82 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.fluxconfigurations-${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 = 'kcfcmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- clusterName: 'dep-${namePrefix}-aks-${serviceShort}'
- clusterExtensionName: '${namePrefix}${serviceShort}001'
- clusterNodeResourceGroupName: 'nodes-${resourceGroupName}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- clusterName: nestedDependencies.outputs.clusterName
- namespace: 'flux-system'
- scope: 'cluster'
- sourceKind: 'GitRepository'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/mspnp/aks-baseline'
- }
- kustomizations: {
- unified: {
- dependsOn: []
- force: false
- path: './cluster-manifests'
- prune: true
- syncIntervalInSeconds: 300
- timeoutInSeconds: 300
- }
- }
- }
-}]
diff --git a/modules/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/dependencies.bicep b/modules/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 0bf942bbd1..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the AKS cluster to create.')
-param clusterName string
-
-@description('Required. The name of the AKS cluster extension to create.')
-param clusterExtensionName string
-
-@description('Required. The name of the AKS cluster nodes resource group to create.')
-param clusterNodeResourceGroupName string
-
-resource cluster 'Microsoft.ContainerService/managedClusters@2022-07-01' = {
- name: clusterName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- dnsPrefix: clusterName
- nodeResourceGroup: clusterNodeResourceGroupName
- agentPoolProfiles: [
- {
- name: 'agentpool'
- count: 1
- vmSize: 'Standard_DS2_v2'
- osType: 'Linux'
- mode: 'System'
- }
- ]
- }
-}
-
-resource extension 'Microsoft.KubernetesConfiguration/extensions@2022-03-01' = {
- scope: cluster
- name: clusterExtensionName
- properties: {
- extensionType: 'microsoft.flux'
- releaseTrain: 'Stable'
- scope: {
- cluster: {
- releaseNamespace: 'flux-system'
- }
- }
- }
-}
-
-@description('The name of the created AKS cluster.')
-output clusterName string = cluster.name
diff --git a/modules/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep b/modules/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 858b74642f..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,82 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.fluxconfigurations-${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 = 'kcfcwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- clusterName: 'dep-${namePrefix}-aks-${serviceShort}'
- clusterExtensionName: '${namePrefix}${serviceShort}001'
- clusterNodeResourceGroupName: 'nodes-${resourceGroupName}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- clusterName: nestedDependencies.outputs.clusterName
- namespace: 'flux-system'
- scope: 'cluster'
- sourceKind: 'GitRepository'
- gitRepository: {
- repositoryRef: {
- branch: 'main'
- }
- sshKnownHosts: ''
- syncIntervalInSeconds: 300
- timeoutInSeconds: 180
- url: 'https://github.com/mspnp/aks-baseline'
- }
- kustomizations: {
- unified: {
- dependsOn: []
- force: false
- path: './cluster-manifests'
- prune: true
- syncIntervalInSeconds: 300
- timeoutInSeconds: 300
- }
- }
- }
-}]
diff --git a/modules/kubernetes-configuration/flux-configuration/version.json b/modules/kubernetes-configuration/flux-configuration/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/kubernetes-configuration/flux-configuration/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/logic/workflow/MOVED-TO-AVM.md b/modules/logic/workflow/MOVED-TO-AVM.md
deleted file mode 100644
index cec0941d12..0000000000
--- a/modules/logic/workflow/MOVED-TO-AVM.md
+++ /dev/null
@@ -1 +0,0 @@
-This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
diff --git a/modules/logic/workflow/README.md b/modules/logic/workflow/README.md
index a078f14601..774062f923 100644
--- a/modules/logic/workflow/README.md
+++ b/modules/logic/workflow/README.md
@@ -1,978 +1,7 @@
-# Logic Apps (Workflows) `[Microsoft.Logic/workflows]`
+
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The logic app workflow name. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`actionsAccessControlConfiguration`](#parameter-actionsaccesscontrolconfiguration) | object | The access control configuration for workflow actions. |
-| [`connectorEndpointsConfiguration`](#parameter-connectorendpointsconfiguration) | object | The endpoints configuration: Access endpoint and outgoing IP addresses for the connector. |
-| [`contentsAccessControlConfiguration`](#parameter-contentsaccesscontrolconfiguration) | object | The access control configuration for accessing workflow run contents. |
-| [`definitionParameters`](#parameter-definitionparameters) | object | Parameters for the definition template. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`integrationAccount`](#parameter-integrationaccount) | object | The integration account. |
-| [`integrationServiceEnvironmentResourceId`](#parameter-integrationserviceenvironmentresourceid) | string | The integration service environment Id. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`state`](#parameter-state) | string | The state. - NotSpecified, Completed, Enabled, Disabled, Deleted, Suspended. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-| [`triggersAccessControlConfiguration`](#parameter-triggersaccesscontrolconfiguration) | object | The access control configuration for invoking workflow triggers. |
-| [`workflowActions`](#parameter-workflowactions) | object | The definitions for one or more actions to execute at workflow runtime. |
-| [`workflowEndpointsConfiguration`](#parameter-workflowendpointsconfiguration) | object | The endpoints configuration: Access endpoint and outgoing IP addresses for the workflow. |
-| [`workflowManagementAccessControlConfiguration`](#parameter-workflowmanagementaccesscontrolconfiguration) | object | The access control configuration for workflow management. |
-| [`workflowOutputs`](#parameter-workflowoutputs) | object | The definitions for the outputs to return from a workflow run. |
-| [`workflowParameters`](#parameter-workflowparameters) | object | The definitions for one or more parameters that pass the values to use at your logic app's runtime. |
-| [`workflowStaticResults`](#parameter-workflowstaticresults) | object | The definitions for one or more static results returned by actions as mock outputs when static results are enabled on those actions. In each action definition, the runtimeConfiguration.staticResult.name attribute references the corresponding definition inside staticResults. |
-| [`workflowTriggers`](#parameter-workflowtriggers) | object | The definitions for one or more triggers that instantiate your workflow. You can define more than one trigger, but only with the Workflow Definition Language, not visually through the Logic Apps Designer. |
-
-### Parameter: `name`
-
-The logic app workflow name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `actionsAccessControlConfiguration`
-
-The access control configuration for workflow actions.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `connectorEndpointsConfiguration`
-
-The endpoints configuration: Access endpoint and outgoing IP addresses for the connector.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `contentsAccessControlConfiguration`
-
-The access control configuration for accessing workflow run contents.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `definitionParameters`
-
-Parameters for the definition template.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `integrationAccount`
-
-The integration account.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `integrationServiceEnvironmentResourceId`
-
-The integration service environment Id.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `state`
-
-The state. - NotSpecified, Completed, Enabled, Disabled, Deleted, Suspended.
-
-- Required: No
-- Type: string
-- Default: `'Enabled'`
-- Allowed:
- ```Bicep
- [
- 'Completed'
- 'Deleted'
- 'Disabled'
- 'Enabled'
- 'NotSpecified'
- 'Suspended'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `triggersAccessControlConfiguration`
-
-The access control configuration for invoking workflow triggers.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowActions`
-
-The definitions for one or more actions to execute at workflow runtime.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowEndpointsConfiguration`
-
-The endpoints configuration: Access endpoint and outgoing IP addresses for the workflow.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowManagementAccessControlConfiguration`
-
-The access control configuration for workflow management.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowOutputs`
-
-The definitions for the outputs to return from a workflow run.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowParameters`
-
-The definitions for one or more parameters that pass the values to use at your logic app's runtime.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowStaticResults`
-
-The definitions for one or more static results returned by actions as mock outputs when static results are enabled on those actions. In each action definition, the runtimeConfiguration.staticResult.name attribute references the corresponding definition inside staticResults.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `workflowTriggers`
-
-The definitions for one or more triggers that instantiate your workflow. You can define more than one trigger, but only with the Workflow Definition Language, not visually through the Logic Apps Designer.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the logic app. |
-| `resourceGroupName` | string | The resource group the logic app was deployed into. |
-| `resourceId` | string | The resource ID of the logic app. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Parameter Usage `
-
-### Parameter Usage `
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/logic/workflow/main.bicep b/modules/logic/workflow/main.bicep
deleted file mode 100644
index 3dca15ac0c..0000000000
--- a/modules/logic/workflow/main.bicep
+++ /dev/null
@@ -1,289 +0,0 @@
-metadata name = 'Logic Apps (Workflows)'
-metadata description = 'This module deploys a Logic App (Workflow).'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The logic app workflow name.')
-param name string
-
-@description('Optional. The access control configuration for workflow actions.')
-param actionsAccessControlConfiguration object = {}
-
-@description('Optional. The endpoints configuration: Access endpoint and outgoing IP addresses for the connector.')
-param connectorEndpointsConfiguration object = {}
-
-@description('Optional. The access control configuration for accessing workflow run contents.')
-param contentsAccessControlConfiguration object = {}
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Parameters for the definition template.')
-param definitionParameters object = {}
-
-@description('Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. The integration account.')
-param integrationAccount object = {}
-
-@description('Optional. The integration service environment Id.')
-param integrationServiceEnvironmentResourceId string = ''
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. The state. - NotSpecified, Completed, Enabled, Disabled, Deleted, Suspended.')
-@allowed([
- 'NotSpecified'
- 'Completed'
- 'Enabled'
- 'Disabled'
- 'Deleted'
- 'Suspended'
-])
-param state string = 'Enabled'
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. The access control configuration for invoking workflow triggers.')
-param triggersAccessControlConfiguration object = {}
-
-@description('Optional. The definitions for one or more actions to execute at workflow runtime.')
-param workflowActions object = {}
-
-@description('Optional. The endpoints configuration: Access endpoint and outgoing IP addresses for the workflow.')
-param workflowEndpointsConfiguration object = {}
-
-@description('Optional. The access control configuration for workflow management.')
-param workflowManagementAccessControlConfiguration object = {}
-
-@description('Optional. The definitions for the outputs to return from a workflow run.')
-param workflowOutputs object = {}
-
-@description('Optional. The definitions for one or more parameters that pass the values to use at your logic app\'s runtime.')
-param workflowParameters object = {}
-
-@description('Optional. The definitions for one or more static results returned by actions as mock outputs when static results are enabled on those actions. In each action definition, the runtimeConfiguration.staticResult.name attribute references the corresponding definition inside staticResults.')
-param workflowStaticResults object = {}
-
-@description('Optional. The definitions for one or more triggers that instantiate your workflow. You can define more than one trigger, but only with the Workflow Definition Language, not visually through the Logic Apps Designer.')
-param workflowTriggers object = {}
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? 'SystemAssigned' : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Logic App Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '87a39d53-fc1b-424a-814c-f7e04687dc9e')
- 'Logic App Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '515c2055-d9d4-4321-b1b9-bd0c9a0f79fe')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource logicApp 'Microsoft.Logic/workflows@2019-05-01' = {
- name: name
- location: location
- tags: !empty(tags) ? tags : null
- identity: identity
- properties: {
- state: state
- endpointsConfiguration: {
- workflow: workflowEndpointsConfiguration
- connector: connectorEndpointsConfiguration
- }
- accessControl: {
- triggers: !empty(triggersAccessControlConfiguration) ? triggersAccessControlConfiguration : null
- contents: !empty(contentsAccessControlConfiguration) ? contentsAccessControlConfiguration : null
- actions: !empty(actionsAccessControlConfiguration) ? actionsAccessControlConfiguration : null
- workflowManagement: !empty(workflowManagementAccessControlConfiguration) ? workflowManagementAccessControlConfiguration : null
- }
- integrationAccount: !empty(integrationAccount) ? integrationAccount : null
- integrationServiceEnvironment: !empty(integrationServiceEnvironmentResourceId) ? {
- id: integrationServiceEnvironmentResourceId
- } : null
-
- definition: {
- '$schema': 'https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#'
- actions: workflowActions
- contentVersion: '1.0.0.0'
- outputs: workflowOutputs
- parameters: workflowParameters
- staticResults: workflowStaticResults
- triggers: workflowTriggers
- }
- parameters: definitionParameters
- }
-}
-
-resource logicApp_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: logicApp
-}
-
-resource logicApp_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: logicApp
-}]
-
-resource logicApp_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(logicApp.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : roleAssignment.roleDefinitionIdOrName
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: logicApp
-}]
-
-@description('The name of the logic app.')
-output name string = logicApp.name
-
-@description('The resource group the logic app was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The resource ID of the logic app.')
-output resourceId string = logicApp.id
-
-@description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(logicApp.identity, 'principalId') ? logicApp.identity.principalId : ''
-
-@description('The location the resource was deployed into.')
-output location string = logicApp.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type diagnosticSettingType = {
- @description('Optional. The name of diagnostic setting.')
- name: string?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
diff --git a/modules/logic/workflow/main.json b/modules/logic/workflow/main.json
deleted file mode 100644
index 6f34991d72..0000000000
--- a/modules/logic/workflow/main.json
+++ /dev/null
@@ -1,561 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8579742468489559790"
- },
- "name": "Logic Apps (Workflows)",
- "description": "This module deploys a Logic App (Workflow).",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The logic app workflow name."
- }
- },
- "actionsAccessControlConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The access control configuration for workflow actions."
- }
- },
- "connectorEndpointsConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The endpoints configuration: Access endpoint and outgoing IP addresses for the connector."
- }
- },
- "contentsAccessControlConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The access control configuration for accessing workflow run contents."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "definitionParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Parameters for the definition template."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource. Only one type of identity is supported: system-assigned or user-assigned, but not both."
- }
- },
- "integrationAccount": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The integration account."
- }
- },
- "integrationServiceEnvironmentResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The integration service environment Id."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "state": {
- "type": "string",
- "defaultValue": "Enabled",
- "allowedValues": [
- "NotSpecified",
- "Completed",
- "Enabled",
- "Disabled",
- "Deleted",
- "Suspended"
- ],
- "metadata": {
- "description": "Optional. The state. - NotSpecified, Completed, Enabled, Disabled, Deleted, Suspended."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "triggersAccessControlConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The access control configuration for invoking workflow triggers."
- }
- },
- "workflowActions": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The definitions for one or more actions to execute at workflow runtime."
- }
- },
- "workflowEndpointsConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The endpoints configuration: Access endpoint and outgoing IP addresses for the workflow."
- }
- },
- "workflowManagementAccessControlConfiguration": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The access control configuration for workflow management."
- }
- },
- "workflowOutputs": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The definitions for the outputs to return from a workflow run."
- }
- },
- "workflowParameters": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The definitions for one or more parameters that pass the values to use at your logic app's runtime."
- }
- },
- "workflowStaticResults": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The definitions for one or more static results returned by actions as mock outputs when static results are enabled on those actions. In each action definition, the runtimeConfiguration.staticResult.name attribute references the corresponding definition inside staticResults."
- }
- },
- "workflowTriggers": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The definitions for one or more triggers that instantiate your workflow. You can define more than one trigger, but only with the Workflow Definition Language, not visually through the Logic Apps Designer."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), 'SystemAssigned', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Logic App Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '87a39d53-fc1b-424a-814c-f7e04687dc9e')]",
- "Logic App Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '515c2055-d9d4-4321-b1b9-bd0c9a0f79fe')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "logicApp": {
- "type": "Microsoft.Logic/workflows",
- "apiVersion": "2019-05-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[if(not(empty(parameters('tags'))), parameters('tags'), null())]",
- "identity": "[variables('identity')]",
- "properties": {
- "state": "[parameters('state')]",
- "endpointsConfiguration": {
- "workflow": "[parameters('workflowEndpointsConfiguration')]",
- "connector": "[parameters('connectorEndpointsConfiguration')]"
- },
- "accessControl": {
- "triggers": "[if(not(empty(parameters('triggersAccessControlConfiguration'))), parameters('triggersAccessControlConfiguration'), null())]",
- "contents": "[if(not(empty(parameters('contentsAccessControlConfiguration'))), parameters('contentsAccessControlConfiguration'), null())]",
- "actions": "[if(not(empty(parameters('actionsAccessControlConfiguration'))), parameters('actionsAccessControlConfiguration'), null())]",
- "workflowManagement": "[if(not(empty(parameters('workflowManagementAccessControlConfiguration'))), parameters('workflowManagementAccessControlConfiguration'), null())]"
- },
- "integrationAccount": "[if(not(empty(parameters('integrationAccount'))), parameters('integrationAccount'), null())]",
- "integrationServiceEnvironment": "[if(not(empty(parameters('integrationServiceEnvironmentResourceId'))), createObject('id', parameters('integrationServiceEnvironmentResourceId')), null())]",
- "definition": {
- "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
- "actions": "[parameters('workflowActions')]",
- "contentVersion": "1.0.0.0",
- "outputs": "[parameters('workflowOutputs')]",
- "parameters": "[parameters('workflowParameters')]",
- "staticResults": "[parameters('workflowStaticResults')]",
- "triggers": "[parameters('workflowTriggers')]"
- },
- "parameters": "[parameters('definitionParameters')]"
- }
- },
- "logicApp_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Logic/workflows/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "logicApp"
- ]
- },
- "logicApp_diagnosticSettings": {
- "copy": {
- "name": "logicApp_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.Logic/workflows/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "logicApp"
- ]
- },
- "logicApp_roleAssignments": {
- "copy": {
- "name": "logicApp_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Logic/workflows/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Logic/workflows', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "logicApp"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the logic app."
- },
- "value": "[parameters('name')]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the logic app was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the logic app."
- },
- "value": "[resourceId('Microsoft.Logic/workflows', parameters('name'))]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('logicApp', '2019-05-01', 'full').identity, 'principalId')), reference('logicApp', '2019-05-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('logicApp', '2019-05-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/logic/workflow/tests/e2e/max/dependencies.bicep b/modules/logic/workflow/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 0f0755a6f4..0000000000
--- a/modules/logic/workflow/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,16 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/logic/workflow/tests/e2e/max/main.test.bicep b/modules/logic/workflow/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 108fd11c93..0000000000
--- a/modules/logic/workflow/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,137 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-logic.workflows-${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 = 'lwmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- workflowActions: {
- HTTP: {
- inputs: {
- body: {
- BeginPeakTime: '
-
-
-
-### Example 2: _Encr_
-
-
-
-
-
-### Example 3: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 4: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`associatedApplicationInsightsResourceId`](#parameter-associatedapplicationinsightsresourceid) | string | The resource ID of the associated Application Insights. |
-| [`associatedKeyVaultResourceId`](#parameter-associatedkeyvaultresourceid) | string | The resource ID of the associated Key Vault. |
-| [`associatedStorageAccountResourceId`](#parameter-associatedstorageaccountresourceid) | string | The resource ID of the associated Storage Account. |
-| [`name`](#parameter-name) | string | The name of the machine learning workspace. |
-| [`sku`](#parameter-sku) | string | Specifies the SKU, also referred as 'edition' of the Azure Machine Learning workspace. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`primaryUserAssignedIdentity`](#parameter-primaryuserassignedidentity) | string | The user assigned identity resource ID that represents the workspace identity. Required if 'userAssignedIdentities' is not empty and may not be used if 'systemAssignedIdentity' is enabled. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`allowPublicAccessWhenBehindVnet`](#parameter-allowpublicaccesswhenbehindvnet) | bool | The flag to indicate whether to allow public access when behind VNet. |
-| [`associatedContainerRegistryResourceId`](#parameter-associatedcontainerregistryresourceid) | string | The resource ID of the associated Container Registry. |
-| [`computes`](#parameter-computes) | array | Computes to create respectively attach to the workspace. |
-| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition. |
-| [`description`](#parameter-description) | string | The description of this workspace. |
-| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
-| [`discoveryUrl`](#parameter-discoveryurl) | string | URL for the discovery service to identify regional endpoints for machine learning experimentation services. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`hbiWorkspace`](#parameter-hbiworkspace) | bool | The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. |
-| [`imageBuildCompute`](#parameter-imagebuildcompute) | string | The compute name for image build. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. At least one identity type is required. |
-| [`privateEndpoints`](#parameter-privateendpoints) | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. |
-| [`publicNetworkAccess`](#parameter-publicnetworkaccess) | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set. |
-| [`roleAssignments`](#parameter-roleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`serviceManagedResourcesSettings`](#parameter-servicemanagedresourcessettings) | object | The service managed resource settings. |
-| [`sharedPrivateLinkResources`](#parameter-sharedprivatelinkresources) | array | The list of shared private link resources in this workspace. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `associatedApplicationInsightsResourceId`
-
-The resource ID of the associated Application Insights.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `associatedKeyVaultResourceId`
-
-The resource ID of the associated Key Vault.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `associatedStorageAccountResourceId`
-
-The resource ID of the associated Storage Account.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the machine learning workspace.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `sku`
-
-Specifies the SKU, also referred as 'edition' of the Azure Machine Learning workspace.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Basic'
- 'Free'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `primaryUserAssignedIdentity`
-
-The user assigned identity resource ID that represents the workspace identity. Required if 'userAssignedIdentities' is not empty and may not be used if 'systemAssignedIdentity' is enabled.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `allowPublicAccessWhenBehindVnet`
-
-The flag to indicate whether to allow public access when behind VNet.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `associatedContainerRegistryResourceId`
-
-The resource ID of the associated Container Registry.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `computes`
-
-Computes to create respectively attach to the workspace.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `customerManagedKey`
-
-The customer managed key definition.
-
-- Required: No
-- Type: object
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyName`](#parameter-customermanagedkeykeyname) | string | The name of the customer managed key to use for encryption. |
-| [`keyVaultResourceId`](#parameter-customermanagedkeykeyvaultresourceid) | string | The resource ID of a key vault to reference a customer managed key for encryption from. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
-| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |
-
-### Parameter: `customerManagedKey.keyName`
-
-The name of the customer managed key to use for encryption.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVaultResourceId`
-
-The resource ID of a key vault to reference a customer managed key for encryption from.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customerManagedKey.keyVersion`
-
-The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
-
-- Required: No
-- Type: string
-
-### Parameter: `customerManagedKey.userAssignedIdentityResourceId`
-
-User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.
-
-- Required: No
-- Type: string
-
-### Parameter: `description`
-
-The description of this workspace.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `diagnosticSettings`
-
-The diagnostic settings of the service.
-
-- Required: No
-- Type: array
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`eventHubAuthorizationRuleResourceId`](#parameter-diagnosticsettingseventhubauthorizationruleresourceid) | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
-| [`eventHubName`](#parameter-diagnosticsettingseventhubname) | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
-| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
-| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
-| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
-| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
-
-### Parameter: `diagnosticSettings.eventHubAuthorizationRuleResourceId`
-
-Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.eventHubName`
-
-Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.logAnalyticsDestinationType`
-
-A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AzureDiagnostics'
- 'Dedicated'
- ]
- ```
-
-### Parameter: `diagnosticSettings.logCategoriesAndGroups`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.marketplacePartnerResourceId`
-
-The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.metricCategories`
-
-The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
-
-- Required: No
-- Type: array
-
-### Parameter: `diagnosticSettings.name`
-
-The name of diagnostic setting.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.storageAccountResourceId`
-
-Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `diagnosticSettings.workspaceResourceId`
-
-Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
-
-- Required: No
-- Type: string
-
-### Parameter: `discoveryUrl`
-
-URL for the discovery service to identify regional endpoints for machine learning experimentation services.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `hbiWorkspace`
-
-The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `imageBuildCompute`
-
-The compute name for image build.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource. At least one identity type is required.
-
-- Required: No
-- Type: object
-- Default:
- ```Bicep
- {
- systemAssigned: true
- }
- ```
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints`
-
-Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`subnetResourceId`](#parameter-privateendpointssubnetresourceid) | string | Resource ID of the subnet where the endpoint needs to be created. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`applicationSecurityGroupResourceIds`](#parameter-privateendpointsapplicationsecuritygroupresourceids) | array | Application security groups in which the private endpoint IP configuration is included. |
-| [`customDnsConfigs`](#parameter-privateendpointscustomdnsconfigs) | array | Custom DNS configurations. |
-| [`customNetworkInterfaceName`](#parameter-privateendpointscustomnetworkinterfacename) | string | The custom name of the network interface attached to the private endpoint. |
-| [`enableTelemetry`](#parameter-privateendpointsenabletelemetry) | bool | Enable/Disable usage telemetry for module. |
-| [`ipConfigurations`](#parameter-privateendpointsipconfigurations) | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
-| [`location`](#parameter-privateendpointslocation) | string | The location to deploy the private endpoint to. |
-| [`lock`](#parameter-privateendpointslock) | object | Specify the type of lock. |
-| [`manualPrivateLinkServiceConnections`](#parameter-privateendpointsmanualprivatelinkserviceconnections) | array | Manual PrivateLink Service Connections. |
-| [`name`](#parameter-privateendpointsname) | string | The name of the private endpoint. |
-| [`privateDnsZoneGroupName`](#parameter-privateendpointsprivatednszonegroupname) | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
-| [`privateDnsZoneResourceIds`](#parameter-privateendpointsprivatednszoneresourceids) | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
-| [`roleAssignments`](#parameter-privateendpointsroleassignments) | array | 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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-| [`service`](#parameter-privateendpointsservice) | string | The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob". |
-| [`tags`](#parameter-privateendpointstags) | object | Tags to be applied on all resources/resource groups in this deployment. |
-
-### Parameter: `privateEndpoints.subnetResourceId`
-
-Resource ID of the subnet where the endpoint needs to be created.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.applicationSecurityGroupResourceIds`
-
-Application security groups in which the private endpoint IP configuration is included.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customDnsConfigs`
-
-Custom DNS configurations.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.customNetworkInterfaceName`
-
-The custom name of the network interface attached to the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.enableTelemetry`
-
-Enable/Disable usage telemetry for module.
-
-- Required: No
-- Type: bool
-
-### Parameter: `privateEndpoints.ipConfigurations`
-
-A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.location`
-
-The location to deploy the private endpoint to.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.lock`
-
-Specify the type of lock.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-privateendpointslockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-privateendpointslockname) | string | Specify the name of lock. |
-
-### Parameter: `privateEndpoints.lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `privateEndpoints.lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.manualPrivateLinkServiceConnections`
-
-Manual PrivateLink Service Connections.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.name`
-
-The name of the private endpoint.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneGroupName`
-
-The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.privateDnsZoneResourceIds`
-
-The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
-
-- Required: No
-- Type: array
-
-### Parameter: `privateEndpoints.roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-privateendpointsroleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-privateendpointsroleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-privateendpointsroleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-privateendpointsroleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-privateendpointsroleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-privateendpointsroleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-privateendpointsroleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `privateEndpoints.roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `privateEndpoints.service`
-
-The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".
-
-- Required: No
-- Type: string
-
-### Parameter: `privateEndpoints.tags`
-
-Tags to be applied on all resources/resource groups in this deployment.
-
-- Required: No
-- Type: object
-
-### Parameter: `publicNetworkAccess`
-
-Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Disabled'
- 'Enabled'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The name of the role to assign. If it cannot be found you can specify the role definition ID instead. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The name of the role to assign. If it cannot be found you can specify the role definition ID instead.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `serviceManagedResourcesSettings`
-
-The service managed resource settings.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `sharedPrivateLinkResources`
-
-The list of shared private link resources in this workspace.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the machine learning service. |
-| `resourceGroupName` | string | The resource group the machine learning service was deployed into. |
-| `resourceId` | string | The resource ID of the machine learning service. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-This section gives you an overview of all local-referenced module files (i.e., other CARML modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
-
-| Reference | Type |
-| :-- | :-- |
-| `modules/network/private-endpoint` | Local reference |
-
-## Notes
-
-### Parameter Usage: `computes`
-
-Array to specify the compute resources to create respectively attach.
-In case you provide a resource ID, it will attach the resource and ignore "properties". In this case "computeLocation", "sku", "systemAssignedIdentity", "userAssignedIdentities" as well as "tags" don't need to be provided respectively are being ignored.
-Attaching a compute is not idempotent and will fail in case you try to redeploy over an existing compute in AML. I.e. for the first run set "deploy" to true, and after successful deployment to false.
-For more information see https://learn.microsoft.com/en-us/azure/templates/microsoft.machinelearningservices/workspaces/computes?tabs=bicep
-
-
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/machine-learning-services/workspace/compute/README.md b/modules/machine-learning-services/workspace/compute/README.md
deleted file mode 100644
index 1eb2928cd4..0000000000
--- a/modules/machine-learning-services/workspace/compute/README.md
+++ /dev/null
@@ -1,217 +0,0 @@
-# Machine Learning Services Workspaces Computes `[Microsoft.MachineLearningServices/workspaces/computes]`
-
-This module deploys a Machine Learning Services Workspaces Compute.
-
-Attaching a compute is not idempotent and will fail in case you try to redeploy over an existing compute in AML (see parameter `deployCompute`).
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.MachineLearningServices/workspaces/computes` | [2022-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-10-01/workspaces/computes) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`computeType`](#parameter-computetype) | string | Set the object type. |
-| [`name`](#parameter-name) | string | Name of the compute. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`machineLearningWorkspaceName`](#parameter-machinelearningworkspacename) | string | The name of the parent Machine Learning Workspace. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`computeLocation`](#parameter-computelocation) | string | Location for the underlying compute. Ignored when attaching a compute resource, i.e. when you provide a resource ID. |
-| [`deployCompute`](#parameter-deploycompute) | bool | Flag to specify whether to deploy the compute. Required only for attach (i.e. providing a resource ID), as in this case the operation is not idempotent, i.e. a second deployment will fail. Therefore, this flag needs to be set to "false" as long as the compute resource exists. |
-| [`description`](#parameter-description) | string | The description of the Machine Learning compute. |
-| [`disableLocalAuth`](#parameter-disablelocalauth) | bool | Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Specifies the location of the resource. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`properties`](#parameter-properties) | object | The properties of the compute. Will be ignored in case "resourceId" is set. |
-| [`resourceId`](#parameter-resourceid) | string | ARM resource ID of the underlying compute. |
-| [`sku`](#parameter-sku) | string | Specifies the sku, also referred as "edition". Required for creating a compute resource. |
-| [`tags`](#parameter-tags) | object | Contains resource tags defined as key-value pairs. Ignored when attaching a compute resource, i.e. when you provide a resource ID. |
-
-### Parameter: `computeType`
-
-Set the object type.
-
-- Required: Yes
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'AKS'
- 'AmlCompute'
- 'ComputeInstance'
- 'Databricks'
- 'DataFactory'
- 'DataLakeAnalytics'
- 'HDInsight'
- 'Kubernetes'
- 'SynapseSpark'
- 'VirtualMachine'
- ]
- ```
-
-### Parameter: `name`
-
-Name of the compute.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `machineLearningWorkspaceName`
-
-The name of the parent Machine Learning Workspace. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `computeLocation`
-
-Location for the underlying compute. Ignored when attaching a compute resource, i.e. when you provide a resource ID.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `deployCompute`
-
-Flag to specify whether to deploy the compute. Required only for attach (i.e. providing a resource ID), as in this case the operation is not idempotent, i.e. a second deployment will fail. Therefore, this flag needs to be set to "false" as long as the compute resource exists.
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `description`
-
-The description of the Machine Learning compute.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `disableLocalAuth`
-
-Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Specifies the location of the resource.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`systemAssigned`](#parameter-managedidentitiessystemassigned) | bool | Enables system assigned managed identity on the resource. |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.systemAssigned`
-
-Enables system assigned managed identity on the resource.
-
-- Required: No
-- Type: bool
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: No
-- Type: array
-
-### Parameter: `properties`
-
-The properties of the compute. Will be ignored in case "resourceId" is set.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `resourceId`
-
-ARM resource ID of the underlying compute.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `sku`
-
-Specifies the sku, also referred as "edition". Required for creating a compute resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Basic'
- 'Free'
- 'Premium'
- 'Standard'
- ]
- ```
-
-### Parameter: `tags`
-
-Contains resource tags defined as key-value pairs. Ignored when attaching a compute resource, i.e. when you provide a resource ID.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the compute. |
-| `resourceGroupName` | string | The resource group the compute was deployed into. |
-| `resourceId` | string | The resource ID of the compute. |
-| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/machine-learning-services/workspace/compute/main.bicep b/modules/machine-learning-services/workspace/compute/main.bicep
deleted file mode 100644
index c59f29ba7c..0000000000
--- a/modules/machine-learning-services/workspace/compute/main.bicep
+++ /dev/null
@@ -1,158 +0,0 @@
-metadata name = 'Machine Learning Services Workspaces Computes'
-metadata description = '''This module deploys a Machine Learning Services Workspaces Compute.
-
-Attaching a compute is not idempotent and will fail in case you try to redeploy over an existing compute in AML (see parameter `deployCompute`).'''
-metadata owner = 'Azure/module-maintainers'
-
-// ================ //
-// Parameters //
-// ================ //
-
-@sys.description('Conditional. The name of the parent Machine Learning Workspace. Required if the template is used in a standalone deployment.')
-param machineLearningWorkspaceName string
-
-@sys.description('Required. Name of the compute.')
-@minLength(2)
-@maxLength(16)
-param name string
-
-@sys.description('Optional. Specifies the location of the resource.')
-param location string = resourceGroup().location
-
-@sys.description('Optional. Specifies the sku, also referred as "edition". Required for creating a compute resource.')
-@allowed([
- 'Basic'
- 'Free'
- 'Premium'
- 'Standard'
- ''
-])
-param sku string = ''
-
-@sys.description('Optional. Contains resource tags defined as key-value pairs. Ignored when attaching a compute resource, i.e. when you provide a resource ID.')
-param tags object?
-
-@sys.description('Optional. Flag to specify whether to deploy the compute. Required only for attach (i.e. providing a resource ID), as in this case the operation is not idempotent, i.e. a second deployment will fail. Therefore, this flag needs to be set to "false" as long as the compute resource exists.')
-param deployCompute bool = true
-
-@sys.description('Optional. Location for the underlying compute. Ignored when attaching a compute resource, i.e. when you provide a resource ID.')
-param computeLocation string = resourceGroup().location
-
-@sys.description('Optional. The description of the Machine Learning compute.')
-param description string = ''
-
-@sys.description('Optional. Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication.')
-param disableLocalAuth bool = false
-
-@sys.description('Optional. ARM resource ID of the underlying compute.')
-param resourceId string = ''
-
-@sys.description('Required. Set the object type.')
-@allowed([
- 'AKS'
- 'AmlCompute'
- 'ComputeInstance'
- 'Databricks'
- 'DataFactory'
- 'DataLakeAnalytics'
- 'HDInsight'
- 'Kubernetes'
- 'SynapseSpark'
- 'VirtualMachine'
-])
-param computeType string
-
-@sys.description('Optional. The properties of the compute. Will be ignored in case "resourceId" is set.')
-param properties object = {}
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-// ================//
-// Variables //
-// ================//
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-// ============================= //
-// Existing resources references //
-// ============================= //
-
-resource machineLearningWorkspace 'Microsoft.MachineLearningServices/workspaces@2022-10-01' existing = {
- name: machineLearningWorkspaceName
-}
-
-// ============ //
-// Dependencies //
-// ============ //
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource machineLearningWorkspaceCompute 'Microsoft.MachineLearningServices/workspaces/computes@2022-10-01' = if (deployCompute == true) {
- name: name
- location: location
- tags: empty(resourceId) ? tags : any(null)
- sku: empty(resourceId) ? {
- name: sku
- tier: sku
- } : any(null)
- parent: machineLearningWorkspace
- identity: empty(resourceId) ? identity : any(null)
- properties: union({
- description: description
- disableLocalAuth: disableLocalAuth
- computeType: computeType
- }, (!empty(resourceId) ? {
- resourceId: resourceId
- } : {
- computeLocation: computeLocation
- properties: properties
- }))
-}
-
-// =========== //
-// Outputs //
-// =========== //
-@sys.description('The name of the compute.')
-output name string = machineLearningWorkspaceCompute.name
-
-@sys.description('The resource ID of the compute.')
-output resourceId string = machineLearningWorkspaceCompute.id
-
-@sys.description('The resource group the compute was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(machineLearningWorkspace.identity, 'principalId') ? machineLearningWorkspace.identity.principalId : ''
-
-@sys.description('The location the resource was deployed into.')
-output location string = machineLearningWorkspaceCompute.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @sys.description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @sys.description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}?
diff --git a/modules/machine-learning-services/workspace/compute/main.json b/modules/machine-learning-services/workspace/compute/main.json
deleted file mode 100644
index 37b32fb8a0..0000000000
--- a/modules/machine-learning-services/workspace/compute/main.json
+++ /dev/null
@@ -1,234 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15942233592020548593"
- },
- "name": "Machine Learning Services Workspaces Computes",
- "description": "This module deploys a Machine Learning Services Workspaces Compute.\r\n\r\nAttaching a compute is not idempotent and will fail in case you try to redeploy over an existing compute in AML (see parameter `deployCompute`).",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "machineLearningWorkspaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Machine Learning Workspace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "minLength": 2,
- "maxLength": 16,
- "metadata": {
- "description": "Required. Name of the compute."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Specifies the location of the resource."
- }
- },
- "sku": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Basic",
- "Free",
- "Premium",
- "Standard",
- ""
- ],
- "metadata": {
- "description": "Optional. Specifies the sku, also referred as \"edition\". Required for creating a compute resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Contains resource tags defined as key-value pairs. Ignored when attaching a compute resource, i.e. when you provide a resource ID."
- }
- },
- "deployCompute": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Flag to specify whether to deploy the compute. Required only for attach (i.e. providing a resource ID), as in this case the operation is not idempotent, i.e. a second deployment will fail. Therefore, this flag needs to be set to \"false\" as long as the compute resource exists."
- }
- },
- "computeLocation": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for the underlying compute. Ignored when attaching a compute resource, i.e. when you provide a resource ID."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the Machine Learning compute."
- }
- },
- "disableLocalAuth": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication."
- }
- },
- "resourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ARM resource ID of the underlying compute."
- }
- },
- "computeType": {
- "type": "string",
- "allowedValues": [
- "AKS",
- "AmlCompute",
- "ComputeInstance",
- "Databricks",
- "DataFactory",
- "DataLakeAnalytics",
- "HDInsight",
- "Kubernetes",
- "SynapseSpark",
- "VirtualMachine"
- ],
- "metadata": {
- "description": "Required. Set the object type."
- }
- },
- "properties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of the compute. Will be ignored in case \"resourceId\" is set."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]"
- },
- "resources": {
- "machineLearningWorkspace": {
- "existing": true,
- "type": "Microsoft.MachineLearningServices/workspaces",
- "apiVersion": "2022-10-01",
- "name": "[parameters('machineLearningWorkspaceName')]"
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "machineLearningWorkspaceCompute": {
- "condition": "[equals(parameters('deployCompute'), true())]",
- "type": "Microsoft.MachineLearningServices/workspaces/computes",
- "apiVersion": "2022-10-01",
- "name": "[format('{0}/{1}', parameters('machineLearningWorkspaceName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[if(empty(parameters('resourceId')), parameters('tags'), null())]",
- "sku": "[if(empty(parameters('resourceId')), createObject('name', parameters('sku'), 'tier', parameters('sku')), null())]",
- "identity": "[if(empty(parameters('resourceId')), variables('identity'), null())]",
- "properties": "[union(createObject('description', parameters('description'), 'disableLocalAuth', parameters('disableLocalAuth'), 'computeType', parameters('computeType')), if(not(empty(parameters('resourceId'))), createObject('resourceId', parameters('resourceId')), createObject('computeLocation', parameters('computeLocation'), 'properties', parameters('properties'))))]",
- "dependsOn": [
- "machineLearningWorkspace"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the compute."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the compute."
- },
- "value": "[resourceId('Microsoft.MachineLearningServices/workspaces/computes', parameters('machineLearningWorkspaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the compute was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('machineLearningWorkspace', '2022-10-01', 'full').identity, 'principalId')), reference('machineLearningWorkspace', '2022-10-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('machineLearningWorkspaceCompute', '2022-10-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/machine-learning-services/workspace/compute/version.json b/modules/machine-learning-services/workspace/compute/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/machine-learning-services/workspace/compute/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/machine-learning-services/workspace/main.bicep b/modules/machine-learning-services/workspace/main.bicep
deleted file mode 100644
index a80c313a99..0000000000
--- a/modules/machine-learning-services/workspace/main.bicep
+++ /dev/null
@@ -1,452 +0,0 @@
-metadata name = 'Machine Learning Services Workspaces'
-metadata description = 'This module deploys a Machine Learning Services Workspace.'
-metadata owner = 'Azure/module-maintainers'
-
-// ================ //
-// Parameters //
-// ================ //
-@sys.description('Required. The name of the machine learning workspace.')
-param name string
-
-@sys.description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@sys.description('Required. Specifies the SKU, also referred as \'edition\' of the Azure Machine Learning workspace.')
-@allowed([
- 'Free'
- 'Basic'
- 'Standard'
- 'Premium'
-])
-param sku string
-
-@sys.description('Required. The resource ID of the associated Storage Account.')
-param associatedStorageAccountResourceId string
-
-@sys.description('Required. The resource ID of the associated Key Vault.')
-param associatedKeyVaultResourceId string
-
-@sys.description('Required. The resource ID of the associated Application Insights.')
-param associatedApplicationInsightsResourceId string
-
-@sys.description('Optional. The resource ID of the associated Container Registry.')
-param associatedContainerRegistryResourceId string = ''
-
-@sys.description('Optional. The lock settings of the service.')
-param lock lockType
-
-@sys.description('Optional. The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service.')
-param hbiWorkspace bool = false
-
-@sys.description('Optional. The flag to indicate whether to allow public access when behind VNet.')
-param allowPublicAccessWhenBehindVnet bool = false
-
-@sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
-param roleAssignments roleAssignmentType
-
-@sys.description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
-param privateEndpoints privateEndpointType
-
-@sys.description('Optional. Computes to create respectively attach to the workspace.')
-param computes array = []
-
-@sys.description('Optional. Resource tags.')
-param tags object?
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@sys.description('Optional. The managed identity definition for this resource. At least one identity type is required.')
-param managedIdentities managedIdentitiesType = {
- systemAssigned: true
-}
-
-// Diagnostic Settings
-
-@sys.description('Optional. The diagnostic settings of the service.')
-param diagnosticSettings diagnosticSettingType
-
-@sys.description('Optional. The description of this workspace.')
-param description string = ''
-
-@sys.description('Optional. URL for the discovery service to identify regional endpoints for machine learning experimentation services.')
-param discoveryUrl string = ''
-
-@sys.description('Optional. The customer managed key definition.')
-param customerManagedKey customerManagedKeyType
-
-@sys.description('Optional. The compute name for image build.')
-param imageBuildCompute string = ''
-
-@sys.description('Conditional. The user assigned identity resource ID that represents the workspace identity. Required if \'userAssignedIdentities\' is not empty and may not be used if \'systemAssignedIdentity\' is enabled.')
-param primaryUserAssignedIdentity string = ''
-
-@sys.description('Optional. The service managed resource settings.')
-param serviceManagedResourcesSettings object = {}
-
-@sys.description('Optional. The list of shared private link resources in this workspace.')
-param sharedPrivateLinkResources array = []
-
-@sys.description('Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set.')
-@allowed([
- ''
- 'Enabled'
- 'Disabled'
-])
-param publicNetworkAccess string = ''
-
-// ================//
-// Variables //
-// ================//
-var enableReferencedModulesTelemetry = false
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: (managedIdentities.?systemAssigned ?? false) ? (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null)
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-// ================//
-// Deployments //
-// ================//
-var builtInRoleNames = {
- 'AzureML Compute Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e503ece1-11d0-4e8e-8e2c-7a6c3bf38815')
- 'AzureML Data Scientist': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f6c7c914-8db3-469d-8ca1-694a8f32e121')
- 'AzureML Metrics Writer (preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '635dd51f-9968-44d3-b7fb-6d9a6bd613ae')
- 'AzureML Registry User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1823dd4f-9b8c-4ab6-ab4e-7397a3684615')
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource cMKKeyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId)) {
- name: last(split((customerManagedKey.?keyVaultResourceId ?? 'dummyVault'), '/'))
- scope: resourceGroup(split((customerManagedKey.?keyVaultResourceId ?? '//'), '/')[2], split((customerManagedKey.?keyVaultResourceId ?? '////'), '/')[4])
-
- resource cMKKey 'keys@2023-02-01' existing = if (!empty(customerManagedKey.?keyVaultResourceId) && !empty(customerManagedKey.?keyName)) {
- name: customerManagedKey.?keyName ?? 'dummyKey'
- }
-}
-
-resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = if (!empty(customerManagedKey.?userAssignedIdentityResourceId)) {
- name: last(split(customerManagedKey.?userAssignedIdentityResourceId ?? 'dummyMsi', '/'))
- scope: resourceGroup(split((customerManagedKey.?userAssignedIdentityResourceId ?? '//'), '/')[2], split((customerManagedKey.?userAssignedIdentityResourceId ?? '////'), '/')[4])
-}
-
-resource workspace 'Microsoft.MachineLearningServices/workspaces@2022-10-01' = {
- name: name
- location: location
- tags: tags
- sku: {
- name: sku
- tier: sku
- }
- identity: identity
- properties: {
- friendlyName: name
- storageAccount: associatedStorageAccountResourceId
- keyVault: associatedKeyVaultResourceId
- applicationInsights: associatedApplicationInsightsResourceId
- containerRegistry: !empty(associatedContainerRegistryResourceId) ? associatedContainerRegistryResourceId : null
- hbiWorkspace: hbiWorkspace
- allowPublicAccessWhenBehindVnet: allowPublicAccessWhenBehindVnet
- description: description
- discoveryUrl: discoveryUrl
- encryption: !empty(customerManagedKey) ? {
- status: 'Enabled'
- identity: !empty(customerManagedKey.?userAssignedIdentityResourceId) ? {
- userAssignedIdentity: cMKUserAssignedIdentity.id
- } : null
- keyVaultProperties: {
- keyVaultArmId: cMKKeyVault.id
- keyIdentifier: !empty(customerManagedKey.?keyVersion ?? '') ? '${cMKKeyVault::cMKKey.properties.keyUri}/${customerManagedKey!.keyVersion}' : cMKKeyVault::cMKKey.properties.keyUriWithVersion
- }
- } : null
- imageBuildCompute: imageBuildCompute
- primaryUserAssignedIdentity: primaryUserAssignedIdentity
- publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) ? 'Disabled' : 'Enabled')
- serviceManagedResourcesSettings: serviceManagedResourcesSettings
- sharedPrivateLinkResources: sharedPrivateLinkResources // Note: This property is not idempotent. Neither with [] or `null`
- }
-}
-
-module workspace_computes 'compute/main.bicep' = [for compute in computes: {
- name: '${workspace.name}-${compute.name}-compute'
- params: {
- machineLearningWorkspaceName: workspace.name
- name: compute.name
- location: compute.location
- sku: contains(compute, 'sku') ? compute.sku : ''
- managedIdentities: contains(compute, 'managedIdentities') ? compute.managedIdentities : null
- tags: contains(compute, 'tags') ? compute.tags : {}
- deployCompute: contains(compute, 'deployCompute') ? compute.deployCompute : true
- computeLocation: contains(compute, 'computeLocation') ? compute.computeLocation : ''
- description: contains(compute, 'description') ? compute.description : ''
- disableLocalAuth: compute.disableLocalAuth
- resourceId: contains(compute, 'resourceId') ? compute.resourceId : ''
- computeType: compute.computeType
- properties: contains(compute, 'properties') ? compute.properties : {}
- }
- dependsOn: [
- workspace_privateEndpoints
- ]
-}]
-
-resource workspace_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: workspace
-}
-
-resource workspace_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for (diagnosticSetting, index) in (diagnosticSettings ?? []): {
- name: diagnosticSetting.?name ?? '${name}-diagnosticSettings'
- properties: {
- storageAccountId: diagnosticSetting.?storageAccountResourceId
- workspaceId: diagnosticSetting.?workspaceResourceId
- eventHubAuthorizationRuleId: diagnosticSetting.?eventHubAuthorizationRuleResourceId
- eventHubName: diagnosticSetting.?eventHubName
- metrics: diagnosticSetting.?metricCategories ?? [
- {
- category: 'AllMetrics'
- timeGrain: null
- enabled: true
- }
- ]
- logs: diagnosticSetting.?logCategoriesAndGroups ?? [
- {
- categoryGroup: 'AllLogs'
- enabled: true
- }
- ]
- marketplacePartnerId: diagnosticSetting.?marketplacePartnerResourceId
- logAnalyticsDestinationType: diagnosticSetting.?logAnalyticsDestinationType
- }
- scope: workspace
-}]
-
-module workspace_privateEndpoints '../../network/private-endpoint/main.bicep' = [for (privateEndpoint, index) in (privateEndpoints ?? []): {
- name: '${uniqueString(deployment().name, location)}-workspace-PrivateEndpoint-${index}'
- params: {
- groupIds: [
- privateEndpoint.?service ?? 'amlworkspace'
- ]
- name: privateEndpoint.?name ?? 'pep-${last(split(workspace.id, '/'))}-${privateEndpoint.?service ?? 'amlworkspace'}-${index}'
- serviceResourceId: workspace.id
- subnetResourceId: privateEndpoint.subnetResourceId
- enableDefaultTelemetry: privateEndpoint.?enableDefaultTelemetry ?? enableReferencedModulesTelemetry
- location: privateEndpoint.?location ?? reference(split(privateEndpoint.subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location
- lock: privateEndpoint.?lock ?? lock
- privateDnsZoneGroupName: privateEndpoint.?privateDnsZoneGroupName
- privateDnsZoneResourceIds: privateEndpoint.?privateDnsZoneResourceIds
- roleAssignments: privateEndpoint.?roleAssignments
- tags: privateEndpoint.?tags ?? tags
- manualPrivateLinkServiceConnections: privateEndpoint.?manualPrivateLinkServiceConnections
- customDnsConfigs: privateEndpoint.?customDnsConfigs
- ipConfigurations: privateEndpoint.?ipConfigurations
- applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
- customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
- }
-}]
-
-resource workspace_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(workspace.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: workspace
-}]
-
-// ================//
-// Outputs //
-// ================//
-
-@sys.description('The resource ID of the machine learning service.')
-output resourceId string = workspace.id
-
-@sys.description('The resource group the machine learning service was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@sys.description('The name of the machine learning service.')
-output name string = workspace.name
-
-@sys.description('The principal ID of the system assigned identity.')
-output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(workspace.identity, 'principalId') ? workspace.identity.principalId : ''
-
-@sys.description('The location the resource was deployed into.')
-output location string = workspace.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @sys.description('Optional. Enables system assigned managed identity on the resource.')
- systemAssigned: bool?
-
- @sys.description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]?
-}
-
-type lockType = {
- @sys.description('Optional. Specify the name of lock.')
- name: string?
-
- @sys.description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @sys.description('Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead.')
- roleDefinitionIdOrName: string
-
- @sys.description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @sys.description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @sys.description('Optional. The description of the role assignment.')
- description: string?
-
- @sys.description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @sys.description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @sys.description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
-
-type privateEndpointType = {
- @sys.description('Optional. The name of the private endpoint.')
- name: string?
-
- @sys.description('Optional. The location to deploy the private endpoint to.')
- location: string?
-
- @sys.description('Optional. The service (sub-) type to deploy the private endpoint for. For example "vault" or "blob".')
- service: string?
-
- @sys.description('Required. Resource ID of the subnet where the endpoint needs to be created.')
- subnetResourceId: string
-
- @sys.description('Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.')
- privateDnsZoneGroupName: string?
-
- @sys.description('Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.')
- privateDnsZoneResourceIds: string[]?
-
- @sys.description('Optional. Custom DNS configurations.')
- customDnsConfigs: {
- fqdn: string?
- ipAddresses: string[]
- }[]?
-
- @sys.description('Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.')
- ipConfigurations: {
- name: string
- properties: {
- groupId: string
- memberName: string
- privateIPAddress: string
- }
- }[]?
-
- @sys.description('Optional. Application security groups in which the private endpoint IP configuration is included.')
- applicationSecurityGroupResourceIds: string[]?
-
- @sys.description('Optional. The custom name of the network interface attached to the private endpoint.')
- customNetworkInterfaceName: string?
-
- @sys.description('Optional. Specify the type of lock.')
- lock: lockType
-
- @sys.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 its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleAssignments: roleAssignmentType
-
- @sys.description('Optional. Tags to be applied on all resources/resource groups in this deployment.')
- tags: object?
-
- @sys.description('Optional. Manual PrivateLink Service Connections.')
- manualPrivateLinkServiceConnections: array?
-
- @sys.description('Optional. Enable/Disable usage telemetry for module.')
- enableTelemetry: bool?
-}[]?
-
-type diagnosticSettingType = {
- @sys.description('Optional. The name of diagnostic setting.')
- name: string?
-
- @sys.description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- logCategoriesAndGroups: {
- @sys.description('Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.')
- category: string?
-
- @sys.description('Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to \'AllLogs\' to collect all logs.')
- categoryGroup: string?
- }[]?
-
- @sys.description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to \'\' to disable log collection.')
- metricCategories: {
- @sys.description('Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to \'AllMetrics\' to collect all metrics.')
- category: string
- }[]?
-
- @sys.description('Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.')
- logAnalyticsDestinationType: ('Dedicated' | 'AzureDiagnostics')?
-
- @sys.description('Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- workspaceResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- storageAccountResourceId: string?
-
- @sys.description('Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.')
- eventHubAuthorizationRuleResourceId: string?
-
- @sys.description('Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.')
- eventHubName: string?
-
- @sys.description('Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.')
- marketplacePartnerResourceId: string?
-}[]?
-
-type customerManagedKeyType = {
- @sys.description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
- keyVaultResourceId: string
-
- @sys.description('Required. The name of the customer managed key to use for encryption.')
- keyName: string
-
- @sys.description('Optional. The version of the customer managed key to reference for encryption. If not provided, using \'latest\'.')
- keyVersion: string?
-
- @sys.description('Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use.')
- userAssignedIdentityResourceId: string?
-}?
diff --git a/modules/machine-learning-services/workspace/main.json b/modules/machine-learning-services/workspace/main.json
deleted file mode 100644
index 10c91f2d3c..0000000000
--- a/modules/machine-learning-services/workspace/main.json
+++ /dev/null
@@ -1,1687 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "262742885593710440"
- },
- "name": "Machine Learning Services Workspaces",
- "description": "This module deploys a Machine Learning Services Workspace.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- }
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "privateEndpointType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private endpoint."
- }
- },
- "location": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The location to deploy the private endpoint to."
- }
- },
- "service": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The service (sub-) type to deploy the private endpoint for. For example \"vault\" or \"blob\"."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "customDnsConfigs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "nullable": true
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "ipConfigurations": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string"
- },
- "memberName": {
- "type": "string"
- },
- "privateIPAddress": {
- "type": "string"
- }
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableTelemetry": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- }
- },
- "nullable": true
- },
- "diagnosticSettingType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of diagnostic setting."
- }
- },
- "logCategoriesAndGroups": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here."
- }
- },
- "categoryGroup": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to 'AllLogs' to collect all logs."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "metricCategories": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to 'AllMetrics' to collect all metrics."
- }
- }
- }
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of logs that will be streamed. \"allLogs\" includes all possible logs for the resource. Set to '' to disable log collection."
- }
- },
- "logAnalyticsDestinationType": {
- "type": "string",
- "allowedValues": [
- "AzureDiagnostics",
- "Dedicated"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type."
- }
- },
- "workspaceResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "storageAccountResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "eventHubAuthorizationRuleResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to."
- }
- },
- "eventHubName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub."
- }
- },
- "marketplacePartnerResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
- }
- }
- }
- },
- "nullable": true
- },
- "customerManagedKeyType": {
- "type": "object",
- "properties": {
- "keyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of a key vault to reference a customer managed key for encryption from."
- }
- },
- "keyName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the customer managed key to use for encryption."
- }
- },
- "keyVersion": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The version of the customer managed key to reference for encryption. If not provided, using 'latest'."
- }
- },
- "userAssignedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the machine learning workspace."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "sku": {
- "type": "string",
- "allowedValues": [
- "Free",
- "Basic",
- "Standard",
- "Premium"
- ],
- "metadata": {
- "description": "Required. Specifies the SKU, also referred as 'edition' of the Azure Machine Learning workspace."
- }
- },
- "associatedStorageAccountResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the associated Storage Account."
- }
- },
- "associatedKeyVaultResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the associated Key Vault."
- }
- },
- "associatedApplicationInsightsResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the associated Application Insights."
- }
- },
- "associatedContainerRegistryResourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The resource ID of the associated Container Registry."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "hbiWorkspace": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service."
- }
- },
- "allowPublicAccessWhenBehindVnet": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. The flag to indicate whether to allow public access when behind VNet."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "privateEndpoints": {
- "$ref": "#/definitions/privateEndpointType",
- "metadata": {
- "description": "Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible."
- }
- },
- "computes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Computes to create respectively attach to the workspace."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "defaultValue": {
- "systemAssigned": true
- },
- "metadata": {
- "description": "Optional. The managed identity definition for this resource. At least one identity type is required."
- }
- },
- "diagnosticSettings": {
- "$ref": "#/definitions/diagnosticSettingType",
- "metadata": {
- "description": "Optional. The diagnostic settings of the service."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of this workspace."
- }
- },
- "discoveryUrl": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. URL for the discovery service to identify regional endpoints for machine learning experimentation services."
- }
- },
- "customerManagedKey": {
- "$ref": "#/definitions/customerManagedKeyType",
- "metadata": {
- "description": "Optional. The customer managed key definition."
- }
- },
- "imageBuildCompute": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The compute name for image build."
- }
- },
- "primaryUserAssignedIdentity": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Conditional. The user assigned identity resource ID that represents the workspace identity. Required if 'userAssignedIdentities' is not empty and may not be used if 'systemAssignedIdentity' is enabled."
- }
- },
- "serviceManagedResourcesSettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The service managed resource settings."
- }
- },
- "sharedPrivateLinkResources": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The list of shared private link resources in this workspace."
- }
- },
- "publicNetworkAccess": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Enabled",
- "Disabled"
- ],
- "metadata": {
- "description": "Optional. Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "AzureML Compute Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e503ece1-11d0-4e8e-8e2c-7a6c3bf38815')]",
- "AzureML Data Scientist": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f6c7c914-8db3-469d-8ca1-694a8f32e121')]",
- "AzureML Metrics Writer (preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '635dd51f-9968-44d3-b7fb-6d9a6bd613ae')]",
- "AzureML Registry User": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '1823dd4f-9b8c-4ab6-ab4e-7397a3684615')]",
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "cMKKeyVault::cMKKey": {
- "condition": "[and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), and(not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'))), not(empty(tryGet(parameters('customerManagedKey'), 'keyName')))))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults/keys",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[format('{0}/{1}', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/')), coalesce(tryGet(parameters('customerManagedKey'), 'keyName'), 'dummyKey'))]",
- "dependsOn": [
- "cMKKeyVault"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "cMKKeyVault": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId')))]",
- "existing": true,
- "type": "Microsoft.KeyVault/vaults",
- "apiVersion": "2023-02-01",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))]"
- },
- "cMKUserAssignedIdentity": {
- "condition": "[not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId')))]",
- "existing": true,
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "subscriptionId": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2]]",
- "resourceGroup": "[split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]]",
- "name": "[last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/'))]"
- },
- "workspace": {
- "type": "Microsoft.MachineLearningServices/workspaces",
- "apiVersion": "2022-10-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "sku": {
- "name": "[parameters('sku')]",
- "tier": "[parameters('sku')]"
- },
- "identity": "[variables('identity')]",
- "properties": {
- "friendlyName": "[parameters('name')]",
- "storageAccount": "[parameters('associatedStorageAccountResourceId')]",
- "keyVault": "[parameters('associatedKeyVaultResourceId')]",
- "applicationInsights": "[parameters('associatedApplicationInsightsResourceId')]",
- "containerRegistry": "[if(not(empty(parameters('associatedContainerRegistryResourceId'))), parameters('associatedContainerRegistryResourceId'), null())]",
- "hbiWorkspace": "[parameters('hbiWorkspace')]",
- "allowPublicAccessWhenBehindVnet": "[parameters('allowPublicAccessWhenBehindVnet')]",
- "description": "[parameters('description')]",
- "discoveryUrl": "[parameters('discoveryUrl')]",
- "encryption": "[if(not(empty(parameters('customerManagedKey'))), createObject('status', 'Enabled', 'identity', if(not(empty(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'))), createObject('userAssignedIdentity', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), '////'), '/')[4]), 'Microsoft.ManagedIdentity/userAssignedIdentities', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'userAssignedIdentityResourceId'), 'dummyMsi'), '/')))), null()), 'keyVaultProperties', createObject('keyVaultArmId', extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '//'), '/')[2], split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), '////'), '/')[4]), 'Microsoft.KeyVault/vaults', last(split(coalesce(tryGet(parameters('customerManagedKey'), 'keyVaultResourceId'), 'dummyVault'), '/'))), 'keyIdentifier', if(not(empty(coalesce(tryGet(parameters('customerManagedKey'), 'keyVersion'), ''))), format('{0}/{1}', reference('cMKKeyVault::cMKKey').keyUri, parameters('customerManagedKey').keyVersion), reference('cMKKeyVault::cMKKey').keyUriWithVersion))), null())]",
- "imageBuildCompute": "[parameters('imageBuildCompute')]",
- "primaryUserAssignedIdentity": "[parameters('primaryUserAssignedIdentity')]",
- "publicNetworkAccess": "[if(not(empty(parameters('publicNetworkAccess'))), parameters('publicNetworkAccess'), if(not(empty(parameters('privateEndpoints'))), 'Disabled', 'Enabled'))]",
- "serviceManagedResourcesSettings": "[parameters('serviceManagedResourcesSettings')]",
- "sharedPrivateLinkResources": "[parameters('sharedPrivateLinkResources')]"
- },
- "dependsOn": [
- "cMKKeyVault",
- "cMKUserAssignedIdentity"
- ]
- },
- "workspace_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_diagnosticSettings": {
- "copy": {
- "name": "workspace_diagnosticSettings",
- "count": "[length(coalesce(parameters('diagnosticSettings'), createArray()))]"
- },
- "type": "Microsoft.Insights/diagnosticSettings",
- "apiVersion": "2021-05-01-preview",
- "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'name'), format('{0}-diagnosticSettings', parameters('name')))]",
- "properties": {
- "storageAccountId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'storageAccountResourceId')]",
- "workspaceId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'workspaceResourceId')]",
- "eventHubAuthorizationRuleId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubAuthorizationRuleResourceId')]",
- "eventHubName": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'eventHubName')]",
- "metrics": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'metricCategories'), createArray(createObject('category', 'AllMetrics', 'timeGrain', null(), 'enabled', true())))]",
- "logs": "[coalesce(tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logCategoriesAndGroups'), createArray(createObject('categoryGroup', 'AllLogs', 'enabled', true())))]",
- "marketplacePartnerId": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'marketplacePartnerResourceId')]",
- "logAnalyticsDestinationType": "[tryGet(coalesce(parameters('diagnosticSettings'), createArray())[copyIndex()], 'logAnalyticsDestinationType')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_roleAssignments": {
- "copy": {
- "name": "workspace_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.MachineLearningServices/workspaces', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "workspace"
- ]
- },
- "workspace_computes": {
- "copy": {
- "name": "workspace_computes",
- "count": "[length(parameters('computes'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-{1}-compute', parameters('name'), parameters('computes')[copyIndex()].name)]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "machineLearningWorkspaceName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('computes')[copyIndex()].name]"
- },
- "location": {
- "value": "[parameters('computes')[copyIndex()].location]"
- },
- "sku": "[if(contains(parameters('computes')[copyIndex()], 'sku'), createObject('value', parameters('computes')[copyIndex()].sku), createObject('value', ''))]",
- "managedIdentities": "[if(contains(parameters('computes')[copyIndex()], 'managedIdentities'), createObject('value', parameters('computes')[copyIndex()].managedIdentities), createObject('value', null()))]",
- "tags": "[if(contains(parameters('computes')[copyIndex()], 'tags'), createObject('value', parameters('computes')[copyIndex()].tags), createObject('value', createObject()))]",
- "deployCompute": "[if(contains(parameters('computes')[copyIndex()], 'deployCompute'), createObject('value', parameters('computes')[copyIndex()].deployCompute), createObject('value', true()))]",
- "computeLocation": "[if(contains(parameters('computes')[copyIndex()], 'computeLocation'), createObject('value', parameters('computes')[copyIndex()].computeLocation), createObject('value', ''))]",
- "description": "[if(contains(parameters('computes')[copyIndex()], 'description'), createObject('value', parameters('computes')[copyIndex()].description), createObject('value', ''))]",
- "disableLocalAuth": {
- "value": "[parameters('computes')[copyIndex()].disableLocalAuth]"
- },
- "resourceId": "[if(contains(parameters('computes')[copyIndex()], 'resourceId'), createObject('value', parameters('computes')[copyIndex()].resourceId), createObject('value', ''))]",
- "computeType": {
- "value": "[parameters('computes')[copyIndex()].computeType]"
- },
- "properties": "[if(contains(parameters('computes')[copyIndex()], 'properties'), createObject('value', parameters('computes')[copyIndex()].properties), createObject('value', createObject()))]"
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "10790106014691997162"
- },
- "name": "Machine Learning Services Workspaces Computes",
- "description": "This module deploys a Machine Learning Services Workspaces Compute.\n\nAttaching a compute is not idempotent and will fail in case you try to redeploy over an existing compute in AML (see parameter `deployCompute`).",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "systemAssigned": {
- "type": "bool",
- "nullable": true,
- "metadata": {
- "description": "Optional. Enables system assigned managed identity on the resource."
- }
- },
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "nullable": true,
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "machineLearningWorkspaceName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent Machine Learning Workspace. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "minLength": 2,
- "maxLength": 16,
- "metadata": {
- "description": "Required. Name of the compute."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Specifies the location of the resource."
- }
- },
- "sku": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "Basic",
- "Free",
- "Premium",
- "Standard",
- ""
- ],
- "metadata": {
- "description": "Optional. Specifies the sku, also referred as \"edition\". Required for creating a compute resource."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Contains resource tags defined as key-value pairs. Ignored when attaching a compute resource, i.e. when you provide a resource ID."
- }
- },
- "deployCompute": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Flag to specify whether to deploy the compute. Required only for attach (i.e. providing a resource ID), as in this case the operation is not idempotent, i.e. a second deployment will fail. Therefore, this flag needs to be set to \"false\" as long as the compute resource exists."
- }
- },
- "computeLocation": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for the underlying compute. Ignored when attaching a compute resource, i.e. when you provide a resource ID."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the Machine Learning compute."
- }
- },
- "disableLocalAuth": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication."
- }
- },
- "resourceId": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. ARM resource ID of the underlying compute."
- }
- },
- "computeType": {
- "type": "string",
- "allowedValues": [
- "AKS",
- "AmlCompute",
- "ComputeInstance",
- "Databricks",
- "DataFactory",
- "DataLakeAnalytics",
- "HDInsight",
- "Kubernetes",
- "SynapseSpark",
- "VirtualMachine"
- ],
- "metadata": {
- "description": "Required. Set the object type."
- }
- },
- "properties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The properties of the compute. Will be ignored in case \"resourceId\" is set."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- }
- },
- "variables": {
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'SystemAssigned,UserAssigned', 'SystemAssigned'), if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null())), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]"
- },
- "resources": {
- "machineLearningWorkspace": {
- "existing": true,
- "type": "Microsoft.MachineLearningServices/workspaces",
- "apiVersion": "2022-10-01",
- "name": "[parameters('machineLearningWorkspaceName')]"
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "machineLearningWorkspaceCompute": {
- "condition": "[equals(parameters('deployCompute'), true())]",
- "type": "Microsoft.MachineLearningServices/workspaces/computes",
- "apiVersion": "2022-10-01",
- "name": "[format('{0}/{1}', parameters('machineLearningWorkspaceName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[if(empty(parameters('resourceId')), parameters('tags'), null())]",
- "sku": "[if(empty(parameters('resourceId')), createObject('name', parameters('sku'), 'tier', parameters('sku')), null())]",
- "identity": "[if(empty(parameters('resourceId')), variables('identity'), null())]",
- "properties": "[union(createObject('description', parameters('description'), 'disableLocalAuth', parameters('disableLocalAuth'), 'computeType', parameters('computeType')), if(not(empty(parameters('resourceId'))), createObject('resourceId', parameters('resourceId')), createObject('computeLocation', parameters('computeLocation'), 'properties', parameters('properties'))))]",
- "dependsOn": [
- "machineLearningWorkspace"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the compute."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the compute."
- },
- "value": "[resourceId('Microsoft.MachineLearningServices/workspaces/computes', parameters('machineLearningWorkspaceName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the compute was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('machineLearningWorkspace', '2022-10-01', 'full').identity, 'principalId')), reference('machineLearningWorkspace', '2022-10-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('machineLearningWorkspaceCompute', '2022-10-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "workspace",
- "workspace_privateEndpoints"
- ]
- },
- "workspace_privateEndpoints": {
- "copy": {
- "name": "workspace_privateEndpoints",
- "count": "[length(coalesce(parameters('privateEndpoints'), createArray()))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-workspace-PrivateEndpoint-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "groupIds": {
- "value": [
- "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'amlworkspace')]"
- ]
- },
- "name": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'name'), format('pep-{0}-{1}-{2}', last(split(resourceId('Microsoft.MachineLearningServices/workspaces', parameters('name')), '/')), coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'service'), 'amlworkspace'), copyIndex()))]"
- },
- "serviceResourceId": {
- "value": "[resourceId('Microsoft.MachineLearningServices/workspaces', parameters('name'))]"
- },
- "subnetResourceId": {
- "value": "[coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId]"
- },
- "enableDefaultTelemetry": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'enableDefaultTelemetry'), variables('enableReferencedModulesTelemetry'))]"
- },
- "location": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'location'), reference(split(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()].subnetResourceId, '/subnets/')[0], '2020-06-01', 'Full').location)]"
- },
- "lock": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'lock'), parameters('lock'))]"
- },
- "privateDnsZoneGroupName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneGroupName')]"
- },
- "privateDnsZoneResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'privateDnsZoneResourceIds')]"
- },
- "roleAssignments": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'roleAssignments')]"
- },
- "tags": {
- "value": "[coalesce(tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "manualPrivateLinkServiceConnections": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'manualPrivateLinkServiceConnections')]"
- },
- "customDnsConfigs": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customDnsConfigs')]"
- },
- "ipConfigurations": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'ipConfigurations')]"
- },
- "applicationSecurityGroupResourceIds": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'applicationSecurityGroupResourceIds')]"
- },
- "customNetworkInterfaceName": {
- "value": "[tryGet(coalesce(parameters('privateEndpoints'), createArray())[copyIndex()], 'customNetworkInterfaceName')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "6873008238043407177"
- },
- "name": "Private Endpoints",
- "description": "This module deploys a Private Endpoint.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the role to assign. If it cannot be found you can specify the role definition ID instead."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "ipConfigurationsType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the resource that is unique within a resource group."
- }
- },
- "properties": {
- "type": "object",
- "properties": {
- "groupId": {
- "type": "string",
- "metadata": {
- "description": "Required. The ID of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "memberName": {
- "type": "string",
- "metadata": {
- "description": "Required. The member name of a group obtained from the remote resource that this private endpoint should connect to."
- }
- },
- "privateIPAddress": {
- "type": "string",
- "metadata": {
- "description": "Required. A private ip address obtained from the private endpoint's subnet."
- }
- }
- },
- "metadata": {
- "description": "Required. Properties of private endpoint IP configurations."
- }
- }
- }
- },
- "nullable": true
- },
- "customDnsConfigType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "fqdn": {
- "type": "string",
- "metadata": {
- "description": "Required. Fqdn that resolves to private endpoint ip address."
- }
- },
- "ipAddresses": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Required. A list of private ip addresses of the private endpoint."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the private endpoint resource to create."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the subnet where the endpoint needs to be created."
- }
- },
- "serviceResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. Resource ID of the resource that needs to be connected to the network."
- }
- },
- "applicationSecurityGroupResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Application security groups in which the private endpoint IP configuration is included."
- }
- },
- "customNetworkInterfaceName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The custom name of the network interface attached to the private endpoint."
- }
- },
- "ipConfigurations": {
- "$ref": "#/definitions/ipConfigurationsType",
- "nullable": true,
- "metadata": {
- "description": "Optional. A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints."
- }
- },
- "groupIds": {
- "type": "array",
- "metadata": {
- "description": "Required. Subtype(s) of the connection to be created. The allowed values depend on the type serviceResourceId refers to."
- }
- },
- "privateDnsZoneGroupName": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The name of the private DNS zone group to create if `privateDnsZoneResourceIds` were provided."
- }
- },
- "privateDnsZoneResourceIds": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. The private DNS zone groups to associate the private endpoint. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "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 its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags to be applied on all resources/resource groups in this deployment."
- }
- },
- "customDnsConfigs": {
- "$ref": "#/definitions/customDnsConfigType",
- "nullable": true,
- "metadata": {
- "description": "Optional. Custom DNS configurations."
- }
- },
- "manualPrivateLinkServiceConnections": {
- "type": "array",
- "nullable": true,
- "metadata": {
- "description": "Optional. Manual PrivateLink Service Connections."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "DNS Resolver Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0f2ebee7-ffd4-4fc0-b3b7-664099fdad5d')]",
- "DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')]",
- "Domain Services Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'eeaeda52-9324-47f6-8069-5d5bade478b2')]",
- "Domain Services Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '361898ef-9ed1-48c2-849c-a832951106bb')]",
- "Network Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4d97b98b-1d4f-4787-a291-c67834d212e7')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Private DNS Zone Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b12aa53e-6015-4669-85d0-8515ebb3ae7f')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "privateEndpoint": {
- "type": "Microsoft.Network/privateEndpoints",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "copy": [
- {
- "name": "applicationSecurityGroups",
- "count": "[length(coalesce(parameters('applicationSecurityGroupResourceIds'), createArray()))]",
- "input": {
- "id": "[coalesce(parameters('applicationSecurityGroupResourceIds'), createArray())[copyIndex('applicationSecurityGroups')]]"
- }
- }
- ],
- "customDnsConfigs": "[parameters('customDnsConfigs')]",
- "customNetworkInterfaceName": "[coalesce(parameters('customNetworkInterfaceName'), '')]",
- "ipConfigurations": "[coalesce(parameters('ipConfigurations'), createArray())]",
- "manualPrivateLinkServiceConnections": "[coalesce(parameters('manualPrivateLinkServiceConnections'), createArray())]",
- "privateLinkServiceConnections": [
- {
- "name": "[parameters('name')]",
- "properties": {
- "privateLinkServiceId": "[parameters('serviceResourceId')]",
- "groupIds": "[parameters('groupIds')]"
- }
- }
- ],
- "subnet": {
- "id": "[parameters('subnetResourceId')]"
- }
- }
- },
- "privateEndpoint_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_roleAssignments": {
- "copy": {
- "name": "privateEndpoint_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Network/privateEndpoints/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Network/privateEndpoints', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- },
- "privateEndpoint_privateDnsZoneGroup": {
- "condition": "[not(empty(parameters('privateDnsZoneResourceIds')))]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-PrivateEndpoint-PrivateDnsZoneGroup', uniqueString(deployment().name))]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[coalesce(parameters('privateDnsZoneGroupName'), 'default')]"
- },
- "privateDNSResourceIds": {
- "value": "[coalesce(parameters('privateDnsZoneResourceIds'), createArray())]"
- },
- "privateEndpointName": {
- "value": "[parameters('name')]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "17578977753131828304"
- },
- "name": "Private Endpoint Private DNS Zone Groups",
- "description": "This module deploys a Private Endpoint Private DNS Zone Group.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "privateEndpointName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent private endpoint. Required if the template is used in a standalone deployment."
- }
- },
- "privateDNSResourceIds": {
- "type": "array",
- "minLength": 1,
- "maxLength": 5,
- "metadata": {
- "description": "Required. Array of private DNS zone resource IDs. A DNS zone group can support up to 5 DNS zones."
- }
- },
- "name": {
- "type": "string",
- "defaultValue": "default",
- "metadata": {
- "description": "Optional. The name of the private DNS zone group."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable/Disable usage telemetry for module."
- }
- }
- },
- "variables": {
- "copy": [
- {
- "name": "privateDnsZoneConfigs",
- "count": "[length(parameters('privateDNSResourceIds'))]",
- "input": {
- "name": "[last(split(parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')], '/'))]",
- "properties": {
- "privateDnsZoneId": "[parameters('privateDNSResourceIds')[copyIndex('privateDnsZoneConfigs')]]"
- }
- }
- }
- ]
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
- "apiVersion": "2023-04-01",
- "name": "[format('{0}/{1}', parameters('privateEndpointName'), parameters('name'))]",
- "properties": {
- "privateDnsZoneConfigs": "[variables('privateDnsZoneConfigs')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint DNS zone group."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint DNS zone group."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints/privateDnsZoneGroups', parameters('privateEndpointName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint DNS zone group was deployed into."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "privateEndpoint"
- ]
- }
- },
- "outputs": {
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the private endpoint was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the private endpoint."
- },
- "value": "[resourceId('Microsoft.Network/privateEndpoints', parameters('name'))]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the private endpoint."
- },
- "value": "[parameters('name')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('privateEndpoint', '2023-04-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "workspace"
- ]
- }
- },
- "outputs": {
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the machine learning service."
- },
- "value": "[resourceId('Microsoft.MachineLearningServices/workspaces', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the machine learning service was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the machine learning service."
- },
- "value": "[parameters('name')]"
- },
- "systemAssignedMIPrincipalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID of the system assigned identity."
- },
- "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('workspace', '2022-10-01', 'full').identity, 'principalId')), reference('workspace', '2022-10-01', 'full').identity.principalId, '')]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('workspace', '2022-10-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/machine-learning-services/workspace/tests/e2e/defaults/dependencies.bicep b/modules/machine-learning-services/workspace/tests/e2e/defaults/dependencies.bicep
deleted file mode 100644
index 950a61c9f9..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/defaults/dependencies.bicep
+++ /dev/null
@@ -1,54 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Application Insights instance to create.')
-param applicationInsightsName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-}
-
-resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: applicationInsightsName
- location: location
- kind: ''
- properties: {}
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-@description('The resource ID of the created Application Insights instance.')
-output applicationInsightsResourceId string = applicationInsights.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
diff --git a/modules/machine-learning-services/workspace/tests/e2e/defaults/main.test.bicep b/modules/machine-learning-services/workspace/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 4ad340de5c..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,65 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-machinelearningservices.workspaces-${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 = 'mlswmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- applicationInsightsName: 'dep-${namePrefix}-appI-${serviceShort}'
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- associatedApplicationInsightsResourceId: nestedDependencies.outputs.applicationInsightsResourceId
- associatedKeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- associatedStorageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId
- sku: 'Basic'
- managedIdentities: {
- systemAssigned: true
- }
- }
-}
diff --git a/modules/machine-learning-services/workspace/tests/e2e/encr/dependencies.bicep b/modules/machine-learning-services/workspace/tests/e2e/encr/dependencies.bicep
deleted file mode 100644
index b4446ffb5c..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/encr/dependencies.bicep
+++ /dev/null
@@ -1,144 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-@minLength(3)
-@maxLength(24)
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Application Insights instance to create.')
-param applicationInsightsName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required by batch account
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'keyEncryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVaultServicePermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Contributor-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-resource keyVaultDataPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Data-Admin-RoleAssignment')
- scope: keyVault::key
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '12338af0-0e69-4776-bea7-57ae8d297424') // Key Vault Crypto User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: applicationInsightsName
- location: location
- kind: ''
- properties: {}
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.api.azureml.ms'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Application Insights instance.')
-output applicationInsightsResourceId string = applicationInsights.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The name of the Key Vault Encryption Key.')
-output keyVaultEncryptionKeyName string = keyVault::key.name
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/machine-learning-services/workspace/tests/e2e/encr/main.test.bicep b/modules/machine-learning-services/workspace/tests/e2e/encr/main.test.bicep
deleted file mode 100644
index 43af630b14..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/encr/main.test.bicep
+++ /dev/null
@@ -1,97 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-machinelearningservices.workspaces-${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 = 'mlswecr'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- applicationInsightsName: 'dep-${namePrefix}-appI-${serviceShort}'
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- associatedApplicationInsightsResourceId: nestedDependencies.outputs.applicationInsightsResourceId
- associatedKeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- associatedStorageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId
- sku: 'Basic'
- customerManagedKey: {
- keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName
- keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
- }
- primaryUserAssignedIdentity: nestedDependencies.outputs.managedIdentityResourceId
- privateEndpoints: [
- {
- service: 'amlworkspace'
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- // systemAssigned must be false if `primaryUserAssignedIdentity` is provided
- managedIdentities: {
- systemAssigned: false
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/machine-learning-services/workspace/tests/e2e/max/dependencies.bicep b/modules/machine-learning-services/workspace/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index 4f7b46494d..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,134 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Application Insights instance to create.')
-param applicationInsightsName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVaultServicePermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Contributor-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-resource keyVaultDataPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Data-Admin-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483') // Key Vault Administrator
- principalType: 'ServicePrincipal'
- }
-}
-
-resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: applicationInsightsName
- location: location
- kind: ''
- properties: {}
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.api.azureml.ms'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Application Insights instance.')
-output applicationInsightsResourceId string = applicationInsights.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/machine-learning-services/workspace/tests/e2e/max/main.test.bicep b/modules/machine-learning-services/workspace/tests/e2e/max/main.test.bicep
deleted file mode 100644
index f09fb15a5c..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,172 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-machinelearningservices.workspaces-${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 = 'mlswmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- applicationInsightsName: 'dep-${namePrefix}-appi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- associatedApplicationInsightsResourceId: nestedDependencies.outputs.applicationInsightsResourceId
- associatedKeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- associatedStorageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId
- sku: 'Premium'
- computes: [
- {
- computeLocation: 'westeurope'
- computeType: 'AmlCompute'
- description: 'Default CPU Cluster'
- disableLocalAuth: false
- location: 'westeurope'
- name: 'DefaultCPU'
- properties: {
- enableNodePublicIp: true
- isolatedNetwork: false
- osType: 'Linux'
- remoteLoginPortPublicAccess: 'Disabled'
- scaleSettings: {
- maxNodeCount: 3
- minNodeCount: 0
- nodeIdleTimeBeforeScaleDown: 'PT5M'
- }
- vmPriority: 'Dedicated'
- vmSize: 'STANDARD_DS11_V2'
- }
- sku: 'Basic'
- // Must be false if `primaryUserAssignedIdentity` is provided
- managedIdentities: {
- systemAssigned: false
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- }
- ]
- description: 'The cake is a lie.'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- discoveryUrl: 'http://example.com'
- imageBuildCompute: 'testcompute'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- primaryUserAssignedIdentity: nestedDependencies.outputs.managedIdentityResourceId
- privateEndpoints: [
- {
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- managedIdentities: {
- systemAssigned: false
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/machine-learning-services/workspace/tests/e2e/waf-aligned/dependencies.bicep b/modules/machine-learning-services/workspace/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 4f7b46494d..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,134 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Application Insights instance to create.')
-param applicationInsightsName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: null
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVaultServicePermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Contributor-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c') // Contributor
- principalType: 'ServicePrincipal'
- }
-}
-resource keyVaultDataPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${managedIdentity.id}-KeyVault-Data-Admin-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: managedIdentity.properties.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '00482a5a-887f-4fb3-b363-3b7fe8e74483') // Key Vault Administrator
- principalType: 'ServicePrincipal'
- }
-}
-
-resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
- name: applicationInsightsName
- location: location
- kind: ''
- properties: {}
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- sku: {
- name: 'Standard_LRS'
- }
- kind: 'StorageV2'
-}
-
-resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
- name: 'privatelink.api.azureml.ms'
- location: 'global'
-
- resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = {
- name: '${virtualNetwork.name}-vnetlink'
- location: 'global'
- properties: {
- virtualNetwork: {
- id: virtualNetwork.id
- }
- registrationEnabled: false
- }
- }
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The resource ID of the created Key Vault.')
-output keyVaultResourceId string = keyVault.id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Application Insights instance.')
-output applicationInsightsResourceId string = applicationInsights.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
-
-@description('The resource ID of the created Private DNS Zone.')
-output privateDNSZoneResourceId string = privateDNSZone.id
diff --git a/modules/machine-learning-services/workspace/tests/e2e/waf-aligned/main.test.bicep b/modules/machine-learning-services/workspace/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 416696a964..0000000000
--- a/modules/machine-learning-services/workspace/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,155 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-machinelearningservices.workspaces-${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 = 'mlswwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}'
- applicationInsightsName: 'dep-${namePrefix}-appi-${serviceShort}'
- storageAccountName: 'dep${namePrefix}st${serviceShort}'
- }
-}
-
-// Diagnostics
-// ===========
-module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-diagnosticDependencies'
- params: {
- storageAccountName: 'dep${namePrefix}diasa${serviceShort}01'
- logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}'
- eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}'
- eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}'
- location: location
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- associatedApplicationInsightsResourceId: nestedDependencies.outputs.applicationInsightsResourceId
- associatedKeyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId
- associatedStorageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId
- sku: 'Premium'
- computes: [
- {
- computeLocation: 'westeurope'
- computeType: 'AmlCompute'
- description: 'Default CPU Cluster'
- disableLocalAuth: false
- location: 'westeurope'
- name: 'DefaultCPU'
- properties: {
- enableNodePublicIp: true
- isolatedNetwork: false
- osType: 'Linux'
- remoteLoginPortPublicAccess: 'Disabled'
- scaleSettings: {
- maxNodeCount: 3
- minNodeCount: 0
- nodeIdleTimeBeforeScaleDown: 'PT5M'
- }
- vmPriority: 'Dedicated'
- vmSize: 'STANDARD_DS11_V2'
- }
- sku: 'Basic'
- // Must be false if `primaryUserAssignedIdentity` is provided
- managedIdentities: {
- systemAssigned: false
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- }
- ]
- description: 'The cake is a lie.'
- diagnosticSettings: [
- {
- name: 'customSetting'
- metricCategories: [
- {
- category: 'AllMetrics'
- }
- ]
- eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId
- workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- }
- ]
- discoveryUrl: 'http://example.com'
- imageBuildCompute: 'testcompute'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- primaryUserAssignedIdentity: nestedDependencies.outputs.managedIdentityResourceId
- privateEndpoints: [
- {
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- privateDnsZoneResourceIds: [
- nestedDependencies.outputs.privateDNSZoneResourceId
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
- ]
- managedIdentities: {
- systemAssigned: false
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/machine-learning-services/workspace/version.json b/modules/machine-learning-services/workspace/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/machine-learning-services/workspace/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/maintenance/maintenance-configuration/README.md b/modules/maintenance/maintenance-configuration/README.md
index e26f1b8299..45e7ef044b 100644
--- a/modules/maintenance/maintenance-configuration/README.md
+++ b/modules/maintenance/maintenance-configuration/README.md
@@ -1,648 +1,7 @@
-# Maintenance Configurations `[Microsoft.Maintenance/maintenanceConfigurations]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Maintenance Configuration Name. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`extensionProperties`](#parameter-extensionproperties) | object | Gets or sets extensionProperties of the maintenanceConfiguration. |
-| [`installPatches`](#parameter-installpatches) | object | Configuration settings for VM guest patching with Azure Update Manager. |
-| [`location`](#parameter-location) | string | Location for all Resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`maintenanceScope`](#parameter-maintenancescope) | string | Gets or sets maintenanceScope of the configuration. |
-| [`maintenanceWindow`](#parameter-maintenancewindow) | object | Definition of a MaintenanceWindow. |
-| [`namespace`](#parameter-namespace) | string | Gets or sets namespace of the resource. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Gets or sets tags of the resource. |
-| [`visibility`](#parameter-visibility) | string | Gets or sets the visibility of the configuration. The default value is 'Custom'. |
-
-### Parameter: `name`
-
-Maintenance Configuration Name.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `extensionProperties`
-
-Gets or sets extensionProperties of the maintenanceConfiguration.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `installPatches`
-
-Configuration settings for VM guest patching with Azure Update Manager.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `location`
-
-Location for all Resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `maintenanceScope`
-
-Gets or sets maintenanceScope of the configuration.
-
-- Required: No
-- Type: string
-- Default: `'Host'`
-- Allowed:
- ```Bicep
- [
- 'Extension'
- 'Host'
- 'InGuestPatch'
- 'OSImage'
- 'SQLDB'
- 'SQLManagedInstance'
- ]
- ```
-
-### Parameter: `maintenanceWindow`
-
-Definition of a MaintenanceWindow.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `namespace`
-
-Gets or sets namespace of the resource.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Gets or sets tags of the resource.
-
-- Required: No
-- Type: object
-
-### Parameter: `visibility`
-
-Gets or sets the visibility of the configuration. The default value is 'Custom'.
-
-- Required: No
-- Type: string
-- Default: `''`
-- Allowed:
- ```Bicep
- [
- ''
- 'Custom'
- 'Public'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the Maintenance Configuration was created in. |
-| `name` | string | The name of the Maintenance Configuration. |
-| `resourceGroupName` | string | The name of the resource group the Maintenance Configuration was created in. |
-| `resourceId` | string | The resource ID of the Maintenance Configuration. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/maintenance/maintenance-configuration/main.bicep b/modules/maintenance/maintenance-configuration/main.bicep
deleted file mode 100644
index 8a885c291f..0000000000
--- a/modules/maintenance/maintenance-configuration/main.bicep
+++ /dev/null
@@ -1,169 +0,0 @@
-metadata name = 'Maintenance Configurations'
-metadata description = 'This module deploys a Maintenance Configuration.'
-metadata owner = 'Azure/module-maintainers'
-
-// ============== //
-// Parameters //
-// ============== //
-
-@description('Required. Maintenance Configuration Name.')
-param name string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Gets or sets extensionProperties of the maintenanceConfiguration.')
-param extensionProperties object = {}
-
-@description('Optional. Location for all Resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Gets or sets maintenanceScope of the configuration.')
-@allowed([
- 'Host'
- 'OSImage'
- 'Extension'
- 'InGuestPatch'
- 'SQLDB'
- 'SQLManagedInstance'
-])
-param maintenanceScope string = 'Host'
-
-@description('Optional. Definition of a MaintenanceWindow.')
-param maintenanceWindow object = {}
-
-@description('Optional. Gets or sets namespace of the resource.')
-param namespace string = ''
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Gets or sets tags of the resource.')
-param tags object?
-
-@description('Optional. Gets or sets the visibility of the configuration. The default value is \'Custom\'.')
-@allowed([
- ''
- 'Custom'
- 'Public'
-])
-param visibility string = ''
-
-@description('Optional. Configuration settings for VM guest patching with Azure Update Manager.')
-param installPatches object = {}
-
-// =============== //
-// Deployments //
-// =============== //
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'Scheduled Patching Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'cd08ab90-6b14-449c-ad9a-8f8e549482c6')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource maintenanceConfiguration 'Microsoft.Maintenance/maintenanceConfigurations@2023-04-01' = {
- location: location
- name: name
- tags: tags
- properties: {
- extensionProperties: extensionProperties
- maintenanceScope: maintenanceScope
- maintenanceWindow: maintenanceWindow
- namespace: namespace
- visibility: visibility
- installPatches: (maintenanceScope == 'InGuestPatch') ? installPatches : null
- }
-}
-
-resource maintenanceConfiguration_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: maintenanceConfiguration
-}
-
-resource maintenanceConfiguration_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(maintenanceConfiguration.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: maintenanceConfiguration
-}]
-
-// =========== //
-// Outputs //
-// =========== //
-
-@description('The name of the Maintenance Configuration.')
-output name string = maintenanceConfiguration.name
-
-@description('The resource ID of the Maintenance Configuration.')
-output resourceId string = maintenanceConfiguration.id
-
-@description('The name of the resource group the Maintenance Configuration was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the Maintenance Configuration was created in.')
-output location string = maintenanceConfiguration.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/maintenance/maintenance-configuration/main.json b/modules/maintenance/maintenance-configuration/main.json
deleted file mode 100644
index 4876cc4f59..0000000000
--- a/modules/maintenance/maintenance-configuration/main.json
+++ /dev/null
@@ -1,311 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "11566518301977789457"
- },
- "name": "Maintenance Configurations",
- "description": "This module deploys a Maintenance Configuration.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Maintenance Configuration Name."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "extensionProperties": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Gets or sets extensionProperties of the maintenanceConfiguration."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all Resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "maintenanceScope": {
- "type": "string",
- "defaultValue": "Host",
- "allowedValues": [
- "Host",
- "OSImage",
- "Extension",
- "InGuestPatch",
- "SQLDB",
- "SQLManagedInstance"
- ],
- "metadata": {
- "description": "Optional. Gets or sets maintenanceScope of the configuration."
- }
- },
- "maintenanceWindow": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Definition of a MaintenanceWindow."
- }
- },
- "namespace": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Gets or sets namespace of the resource."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Gets or sets tags of the resource."
- }
- },
- "visibility": {
- "type": "string",
- "defaultValue": "",
- "allowedValues": [
- "",
- "Custom",
- "Public"
- ],
- "metadata": {
- "description": "Optional. Gets or sets the visibility of the configuration. The default value is 'Custom'."
- }
- },
- "installPatches": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Configuration settings for VM guest patching with Azure Update Manager."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "Scheduled Patching Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'cd08ab90-6b14-449c-ad9a-8f8e549482c6')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "maintenanceConfiguration": {
- "type": "Microsoft.Maintenance/maintenanceConfigurations",
- "apiVersion": "2023-04-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "extensionProperties": "[parameters('extensionProperties')]",
- "maintenanceScope": "[parameters('maintenanceScope')]",
- "maintenanceWindow": "[parameters('maintenanceWindow')]",
- "namespace": "[parameters('namespace')]",
- "visibility": "[parameters('visibility')]",
- "installPatches": "[if(equals(parameters('maintenanceScope'), 'InGuestPatch'), parameters('installPatches'), null())]"
- }
- },
- "maintenanceConfiguration_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.Maintenance/maintenanceConfigurations/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "maintenanceConfiguration"
- ]
- },
- "maintenanceConfiguration_roleAssignments": {
- "copy": {
- "name": "maintenanceConfiguration_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.Maintenance/maintenanceConfigurations/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.Maintenance/maintenanceConfigurations', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "maintenanceConfiguration"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Maintenance Configuration."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Maintenance Configuration."
- },
- "value": "[resourceId('Microsoft.Maintenance/maintenanceConfigurations', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the Maintenance Configuration was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the Maintenance Configuration was created in."
- },
- "value": "[reference('maintenanceConfiguration', '2023-04-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep b/modules/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index b12067c411..0000000000
--- a/modules/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-maintenance.maintenanceconfigurations-${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 = 'mmcmin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}]
diff --git a/modules/maintenance/maintenance-configuration/tests/e2e/max/dependencies.bicep b/modules/maintenance/maintenance-configuration/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/maintenance/maintenance-configuration/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep b/modules/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep
deleted file mode 100644
index dc3d91a268..0000000000
--- a/modules/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,112 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-maintenance.maintenanceconfigurations-${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 = 'mmcmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- extensionProperties: {
- InGuestPatchMode: 'User'
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- maintenanceScope: 'InGuestPatch'
- maintenanceWindow: {
- duration: '03:00'
- expirationDateTime: '9999-12-31 23:59:59'
- recurEvery: 'Day'
- startDateTime: '2022-12-31 13:00'
- timeZone: 'W. Europe Standard Time'
- }
- namespace: '${serviceShort}ns'
- visibility: 'Custom'
- installPatches: {
- linuxParameters: {
- classificationsToInclude: null
- packageNameMasksToExclude: null
- packageNameMasksToInclude: null
- }
- rebootSetting: 'IfRequired'
- windowsParameters: {
- classificationsToInclude: [
- 'Critical'
- 'Security'
- ]
- kbNumbersToExclude: null
- kbNumbersToInclude: null
- }
- }
- }
-}]
diff --git a/modules/maintenance/maintenance-configuration/tests/e2e/waf-aligned/dependencies.bicep b/modules/maintenance/maintenance-configuration/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/maintenance/maintenance-configuration/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep b/modules/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 19697a964c..0000000000
--- a/modules/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,95 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-maintenance.maintenanceconfigurations-${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 = 'mmcwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- extensionProperties: {
- InGuestPatchMode: 'User'
- }
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- maintenanceScope: 'InGuestPatch'
- maintenanceWindow: {
- duration: '03:00'
- expirationDateTime: '9999-12-31 23:59:59'
- recurEvery: 'Day'
- startDateTime: '2022-12-31 13:00'
- timeZone: 'W. Europe Standard Time'
- }
- namespace: '${serviceShort}ns'
- visibility: 'Custom'
- installPatches: {
- linuxParameters: {
- classificationsToInclude: null
- packageNameMasksToExclude: null
- packageNameMasksToInclude: null
- }
- rebootSetting: 'IfRequired'
- windowsParameters: {
- classificationsToInclude: [
- 'Critical'
- 'Security'
- ]
- kbNumbersToExclude: null
- kbNumbersToInclude: null
- }
- }
- }
-}]
diff --git a/modules/maintenance/maintenance-configuration/version.json b/modules/maintenance/maintenance-configuration/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/maintenance/maintenance-configuration/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/managed-identity/user-assigned-identity/README.md b/modules/managed-identity/user-assigned-identity/README.md
index cb4ec31501..54da259cdd 100644
--- a/modules/managed-identity/user-assigned-identity/README.md
+++ b/modules/managed-identity/user-assigned-identity/README.md
@@ -1,479 +1,7 @@
-# User Assigned Identities `[Microsoft.ManagedIdentity/userAssignedIdentities]`
+
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`federatedIdentityCredentials`](#parameter-federatedidentitycredentials) | array | The federated identity credentials list to indicate which token from the external IdP should be trusted by your application. Federated identity credentials are supported on applications only. A maximum of 20 federated identity credentials can be added per application object. |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`name`](#parameter-name) | string | Name of the User Assigned Identity. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `federatedIdentityCredentials`
-
-The federated identity credentials list to indicate which token from the external IdP should be trusted by your application. Federated identity credentials are supported on applications only. A maximum of 20 federated identity credentials can be added per application object.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `name`
-
-Name of the User Assigned Identity.
-
-- Required: No
-- Type: string
-- Default: `[guid(resourceGroup().id)]`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `clientId` | string | The client ID (application ID) of the user assigned identity. |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the user assigned identity. |
-| `principalId` | string | The principal ID (object ID) of the user assigned identity. |
-| `resourceGroupName` | string | The resource group the user assigned identity was deployed into. |
-| `resourceId` | string | The resource ID of the user assigned identity. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/managed-identity/user-assigned-identity/federated-identity-credential/README.md b/modules/managed-identity/user-assigned-identity/federated-identity-credential/README.md
deleted file mode 100644
index a9483eb2d7..0000000000
--- a/modules/managed-identity/user-assigned-identity/federated-identity-credential/README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-# User Assigned Identity Federated Identity Credential `[Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials]`
-
-This module deploys a User Assigned Identity Federated Identity Credential.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ManagedIdentity/2023-01-31/userAssignedIdentities/federatedIdentityCredentials) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`audiences`](#parameter-audiences) | array | The list of audiences that can appear in the issued token. Should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you might need to create a new application registration in your IdP to serve as the audience of this token. |
-| [`issuer`](#parameter-issuer) | string | The URL of the issuer to be trusted. Must match the issuer claim of the external token being exchanged. |
-| [`name`](#parameter-name) | string | The name of the secret. |
-| [`subject`](#parameter-subject) | string | The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each IdP uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`userAssignedIdentityName`](#parameter-userassignedidentityname) | string | The name of the parent user assigned identity. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-
-### Parameter: `audiences`
-
-The list of audiences that can appear in the issued token. Should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you might need to create a new application registration in your IdP to serve as the audience of this token.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `issuer`
-
-The URL of the issuer to be trusted. Must match the issuer claim of the external token being exchanged.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the secret.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `subject`
-
-The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each IdP uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `userAssignedIdentityName`
-
-The name of the parent user assigned identity. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the federated identity credential. |
-| `resourceGroupName` | string | The name of the resource group the federated identity credential was created in. |
-| `resourceId` | string | The resource ID of the federated identity credential. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/managed-identity/user-assigned-identity/federated-identity-credential/main.bicep b/modules/managed-identity/user-assigned-identity/federated-identity-credential/main.bicep
deleted file mode 100644
index b1b0165c47..0000000000
--- a/modules/managed-identity/user-assigned-identity/federated-identity-credential/main.bicep
+++ /dev/null
@@ -1,56 +0,0 @@
-metadata name = 'User Assigned Identity Federated Identity Credential'
-metadata description = 'This module deploys a User Assigned Identity Federated Identity Credential.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent user assigned identity. Required if the template is used in a standalone deployment.')
-param userAssignedIdentityName string
-
-@description('Required. The name of the secret.')
-param name string
-
-@description('Required. The list of audiences that can appear in the issued token. Should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you might need to create a new application registration in your IdP to serve as the audience of this token.')
-param audiences array
-
-@description('Required. The URL of the issuer to be trusted. Must match the issuer claim of the external token being exchanged.')
-param issuer string
-
-@description('Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each IdP uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD.')
-param subject string
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource userAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = {
- name: userAssignedIdentityName
-}
-
-resource federatedIdentityCredential 'Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials@2023-01-31' = {
- name: name
- parent: userAssignedIdentity
- properties: {
- audiences: audiences
- issuer: issuer
- subject: subject
- }
-}
-
-@description('The name of the federated identity credential.')
-output name string = federatedIdentityCredential.name
-
-@description('The resource ID of the federated identity credential.')
-output resourceId string = federatedIdentityCredential.id
-
-@description('The name of the resource group the federated identity credential was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/managed-identity/user-assigned-identity/federated-identity-credential/main.json b/modules/managed-identity/user-assigned-identity/federated-identity-credential/main.json
deleted file mode 100644
index d7d037aaa3..0000000000
--- a/modules/managed-identity/user-assigned-identity/federated-identity-credential/main.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "15026838206978058830"
- },
- "name": "User Assigned Identity Federated Identity Credential",
- "description": "This module deploys a User Assigned Identity Federated Identity Credential.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "userAssignedIdentityName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent user assigned identity. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the secret."
- }
- },
- "audiences": {
- "type": "array",
- "metadata": {
- "description": "Required. The list of audiences that can appear in the issued token. Should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you might need to create a new application registration in your IdP to serve as the audience of this token."
- }
- },
- "issuer": {
- "type": "string",
- "metadata": {
- "description": "Required. The URL of the issuer to be trusted. Must match the issuer claim of the external token being exchanged."
- }
- },
- "subject": {
- "type": "string",
- "metadata": {
- "description": "Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each IdP uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('userAssignedIdentityName'), parameters('name'))]",
- "properties": {
- "audiences": "[parameters('audiences')]",
- "issuer": "[parameters('issuer')]",
- "subject": "[parameters('subject')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the federated identity credential."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the federated identity credential."
- },
- "value": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials', parameters('userAssignedIdentityName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the federated identity credential was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/managed-identity/user-assigned-identity/federated-identity-credential/version.json b/modules/managed-identity/user-assigned-identity/federated-identity-credential/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/managed-identity/user-assigned-identity/federated-identity-credential/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/managed-identity/user-assigned-identity/main.bicep b/modules/managed-identity/user-assigned-identity/main.bicep
deleted file mode 100644
index 19afb3549c..0000000000
--- a/modules/managed-identity/user-assigned-identity/main.bicep
+++ /dev/null
@@ -1,142 +0,0 @@
-metadata name = 'User Assigned Identities'
-metadata description = 'This module deploys a User Assigned Identity.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Optional. Name of the User Assigned Identity.')
-param name string = guid(resourceGroup().id)
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The federated identity credentials list to indicate which token from the external IdP should be trusted by your application. Federated identity credentials are supported on applications only. A maximum of 20 federated identity credentials can be added per application object.')
-param federatedIdentityCredentials array = []
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Tags of the resource.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- 'Managed Identity Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e40ec5ca-96e0-45a2-b4ff-59039f2c2b59')
- 'Managed Identity Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f1a07417-d97a-45cb-824c-7a7467783830')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource userAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
- name: name
- location: location
- tags: tags
-}
-
-resource userMsi_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: userAssignedIdentity
-}
-
-module userMsi_federatedIdentityCredentials 'federated-identity-credential/main.bicep' = [for (federatedIdentityCredential, index) in federatedIdentityCredentials: {
- name: '${uniqueString(deployment().name, location)}-UserMSI-FederatedIdentityCredential-${index}'
- params: {
- name: federatedIdentityCredential.name
- userAssignedIdentityName: userAssignedIdentity.name
- audiences: federatedIdentityCredential.audiences
- issuer: federatedIdentityCredential.issuer
- subject: federatedIdentityCredential.subject
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource userMsi_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(userAssignedIdentity.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: userAssignedIdentity
-}]
-
-@description('The name of the user assigned identity.')
-output name string = userAssignedIdentity.name
-
-@description('The resource ID of the user assigned identity.')
-output resourceId string = userAssignedIdentity.id
-
-@description('The principal ID (object ID) of the user assigned identity.')
-output principalId string = userAssignedIdentity.properties.principalId
-
-@description('The client ID (application ID) of the user assigned identity.')
-output clientId string = userAssignedIdentity.properties.clientId
-
-@description('The resource group the user assigned identity was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = userAssignedIdentity.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/managed-identity/user-assigned-identity/main.json b/modules/managed-identity/user-assigned-identity/main.json
deleted file mode 100644
index b143e7a16b..0000000000
--- a/modules/managed-identity/user-assigned-identity/main.json
+++ /dev/null
@@ -1,412 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "13454855788862691467"
- },
- "name": "User Assigned Identities",
- "description": "This module deploys a User Assigned Identity.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "defaultValue": "[guid(resourceGroup().id)]",
- "metadata": {
- "description": "Optional. Name of the User Assigned Identity."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "federatedIdentityCredentials": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The federated identity credentials list to indicate which token from the external IdP should be trusted by your application. Federated identity credentials are supported on applications only. A maximum of 20 federated identity credentials can be added per application object."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Managed Identity Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e40ec5ca-96e0-45a2-b4ff-59039f2c2b59')]",
- "Managed Identity Operator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f1a07417-d97a-45cb-824c-7a7467783830')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "userAssignedIdentity": {
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities",
- "apiVersion": "2023-01-31",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]"
- },
- "userMsi_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.ManagedIdentity/userAssignedIdentities/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "userAssignedIdentity"
- ]
- },
- "userMsi_roleAssignments": {
- "copy": {
- "name": "userMsi_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.ManagedIdentity/userAssignedIdentities/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "userAssignedIdentity"
- ]
- },
- "userMsi_federatedIdentityCredentials": {
- "copy": {
- "name": "userMsi_federatedIdentityCredentials",
- "count": "[length(parameters('federatedIdentityCredentials'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-UserMSI-FederatedIdentityCredential-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "name": {
- "value": "[parameters('federatedIdentityCredentials')[copyIndex()].name]"
- },
- "userAssignedIdentityName": {
- "value": "[parameters('name')]"
- },
- "audiences": {
- "value": "[parameters('federatedIdentityCredentials')[copyIndex()].audiences]"
- },
- "issuer": {
- "value": "[parameters('federatedIdentityCredentials')[copyIndex()].issuer]"
- },
- "subject": {
- "value": "[parameters('federatedIdentityCredentials')[copyIndex()].subject]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "16507829721467583096"
- },
- "name": "User Assigned Identity Federated Identity Credential",
- "description": "This module deploys a User Assigned Identity Federated Identity Credential.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "userAssignedIdentityName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent user assigned identity. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the secret."
- }
- },
- "audiences": {
- "type": "array",
- "metadata": {
- "description": "Required. The list of audiences that can appear in the issued token. Should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you might need to create a new application registration in your IdP to serve as the audience of this token."
- }
- },
- "issuer": {
- "type": "string",
- "metadata": {
- "description": "Required. The URL of the issuer to be trusted. Must match the issuer claim of the external token being exchanged."
- }
- },
- "subject": {
- "type": "string",
- "metadata": {
- "description": "Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each IdP uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": [
- {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- {
- "type": "Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials",
- "apiVersion": "2023-01-31",
- "name": "[format('{0}/{1}', parameters('userAssignedIdentityName'), parameters('name'))]",
- "properties": {
- "audiences": "[parameters('audiences')]",
- "issuer": "[parameters('issuer')]",
- "subject": "[parameters('subject')]"
- }
- }
- ],
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the federated identity credential."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the federated identity credential."
- },
- "value": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials', parameters('userAssignedIdentityName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the federated identity credential was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
- }
- },
- "dependsOn": [
- "userAssignedIdentity"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the user assigned identity."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the user assigned identity."
- },
- "value": "[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', parameters('name'))]"
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "The principal ID (object ID) of the user assigned identity."
- },
- "value": "[reference('userAssignedIdentity').principalId]"
- },
- "clientId": {
- "type": "string",
- "metadata": {
- "description": "The client ID (application ID) of the user assigned identity."
- },
- "value": "[reference('userAssignedIdentity').clientId]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the user assigned identity was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('userAssignedIdentity', '2023-01-31', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep b/modules/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index fba55f1303..0000000000
--- a/modules/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-managedidentity.userassignedidentities-${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 = 'miuaimin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- }
-}]
diff --git a/modules/managed-identity/user-assigned-identity/tests/e2e/max/dependencies.bicep b/modules/managed-identity/user-assigned-identity/tests/e2e/max/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/managed-identity/user-assigned-identity/tests/e2e/max/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep b/modules/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep
deleted file mode 100644
index f633bc4d28..0000000000
--- a/modules/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,93 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-managedidentity.userassignedidentities-${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 = 'miuaimax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- federatedIdentityCredentials: [
- {
- name: 'test-fed-cred-${serviceShort}-001'
- audiences: [
- 'api://AzureADTokenExchange'
- ]
- issuer: 'https://contoso.com/${subscription().tenantId}/${guid(deployment().name)}/'
- subject: 'system:serviceaccount:default:workload-identity-sa'
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/dependencies.bicep b/modules/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index a7f42aee7b..0000000000
--- a/modules/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,13 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep b/modules/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 17904d21b4..0000000000
--- a/modules/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,76 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-managedidentity.userassignedidentities-${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 = 'miuaiwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- federatedIdentityCredentials: [
- {
- name: 'test-fed-cred-${serviceShort}-001'
- audiences: [
- 'api://AzureADTokenExchange'
- ]
- issuer: 'https://contoso.com/${subscription().tenantId}/${guid(deployment().name)}/'
- subject: 'system:serviceaccount:default:workload-identity-sa'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/managed-identity/user-assigned-identity/version.json b/modules/managed-identity/user-assigned-identity/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/managed-identity/user-assigned-identity/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/managed-services/registration-definition/.bicep/nested_registrationAssignment.bicep b/modules/managed-services/registration-definition/.bicep/nested_registrationAssignment.bicep
deleted file mode 100644
index eed777ecb5..0000000000
--- a/modules/managed-services/registration-definition/.bicep/nested_registrationAssignment.bicep
+++ /dev/null
@@ -1,15 +0,0 @@
-param registrationDefinitionId string
-param registrationAssignmentId string
-
-resource registrationAssignment 'Microsoft.ManagedServices/registrationAssignments@2019-09-01' = {
- name: registrationAssignmentId
- properties: {
- registrationDefinitionId: registrationDefinitionId
- }
-}
-
-@description('The name of the registration assignment.')
-output name string = registrationAssignment.name
-
-@description('The resource ID of the registration assignment.')
-output resourceId string = registrationAssignment.id
diff --git a/modules/managed-services/registration-definition/README.md b/modules/managed-services/registration-definition/README.md
index c60cb76100..4e96720637 100644
--- a/modules/managed-services/registration-definition/README.md
+++ b/modules/managed-services/registration-definition/README.md
@@ -1,440 +1,7 @@
-# Registration Definitions `[Microsoft.ManagedServices/registrationDefinitions]`
+
-
-
-
-### Example 2: _Rg_
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`authorizations`](#parameter-authorizations) | array | Specify an array of objects, containing object of Azure Active Directory principalId, a Azure roleDefinitionId, and an optional principalIdDisplayName. The roleDefinition specified is granted to the principalId in the provider's Active Directory and the principalIdDisplayName is visible to customers. |
-| [`managedByTenantId`](#parameter-managedbytenantid) | string | Specify the tenant ID of the tenant which homes the principals you are delegating permissions to. |
-| [`name`](#parameter-name) | string | Specify a unique name for your offer/registration. i.e '
-
-
-
-### Example 2: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-
-
-
-
-### Example 3: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The group ID of the Management group. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`displayName`](#parameter-displayname) | string | The friendly name of the management group. If no value is passed then this field will be set to the group ID. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location deployment metadata. |
-| [`parentId`](#parameter-parentid) | string | The management group parent ID. Defaults to current scope. |
-
-### Parameter: `name`
-
-The group ID of the Management group.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `displayName`
-
-The friendly name of the management group. If no value is passed then this field will be set to the group ID.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location deployment metadata.
-
-- Required: No
-- Type: string
-- Default: `[deployment().location]`
-
-### Parameter: `parentId`
-
-The management group parent ID. Defaults to current scope.
-
-- Required: No
-- Type: string
-- Default: `[last(split(managementGroup().id, '/'))]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the management group. |
-| `resourceId` | string | The resource ID of the management group. |
-
-## Cross-referenced modules
-
-_None_
-
-## Notes
-
-### Considerations
-
-This template is using a **Tenant level deployment**, meaning the user/principal deploying it needs to have the [proper access](https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-to-tenant#required-access)
-
-If owner access is excessive, the following rights roles will grant enough rights:
-
-- **Automation Job Operator** at **tenant** level (scope '/')
-- **Management Group Contributor** at the top management group that needs to be managed
-
-Consider using the following script:
-
-```powershell
-$PrincipalID = "
-
-
-
-### Example 2: _Nfs3_
-
-
-
-
-
-### Example 3: _Nfs41_
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the NetApp account. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`capacityPools`](#parameter-capacitypools) | array | Capacity pools to create. |
-| [`dnsServers`](#parameter-dnsservers) | string | Required if domainName is specified. Comma separated list of DNS server IP addresses (IPv4 only) required for the Active Directory (AD) domain join and SMB authentication operations to succeed. |
-| [`domainJoinOU`](#parameter-domainjoinou) | string | Used only if domainName is specified. LDAP Path for the Organization Unit (OU) where SMB Server machine accounts will be created (i.e. 'OU=SecondLevel,OU=FirstLevel'). |
-| [`domainJoinPassword`](#parameter-domainjoinpassword) | securestring | Required if domainName is specified. Password of the user specified in domainJoinUser parameter. |
-| [`domainJoinUser`](#parameter-domainjoinuser) | string | Required if domainName is specified. Username of Active Directory domain administrator, with permissions to create SMB server machine account in the AD domain. |
-| [`domainName`](#parameter-domainname) | string | Fully Qualified Active Directory DNS Domain Name (e.g. 'contoso.com'). |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`lock`](#parameter-lock) | object | The lock settings of the service. |
-| [`managedIdentities`](#parameter-managedidentities) | object | The managed identity definition for this resource. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`smbServerNamePrefix`](#parameter-smbservernameprefix) | string | Required if domainName is specified. NetBIOS name of the SMB server. A computer account with this prefix will be registered in the AD and used to mount volumes. |
-| [`tags`](#parameter-tags) | object | Tags for all resources. |
-
-### Parameter: `name`
-
-The name of the NetApp account.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `capacityPools`
-
-Capacity pools to create.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `dnsServers`
-
-Required if domainName is specified. Comma separated list of DNS server IP addresses (IPv4 only) required for the Active Directory (AD) domain join and SMB authentication operations to succeed.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `domainJoinOU`
-
-Used only if domainName is specified. LDAP Path for the Organization Unit (OU) where SMB Server machine accounts will be created (i.e. 'OU=SecondLevel,OU=FirstLevel').
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `domainJoinPassword`
-
-Required if domainName is specified. Password of the user specified in domainJoinUser parameter.
-
-- Required: No
-- Type: securestring
-- Default: `''`
-
-### Parameter: `domainJoinUser`
-
-Required if domainName is specified. Username of Active Directory domain administrator, with permissions to create SMB server machine account in the AD domain.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `domainName`
-
-Fully Qualified Active Directory DNS Domain Name (e.g. 'contoso.com').
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `lock`
-
-The lock settings of the service.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`kind`](#parameter-lockkind) | string | Specify the type of lock. |
-| [`name`](#parameter-lockname) | string | Specify the name of lock. |
-
-### Parameter: `lock.kind`
-
-Specify the type of lock.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'CanNotDelete'
- 'None'
- 'ReadOnly'
- ]
- ```
-
-### Parameter: `lock.name`
-
-Specify the name of lock.
-
-- Required: No
-- Type: string
-
-### Parameter: `managedIdentities`
-
-The managed identity definition for this resource.
-
-- Required: No
-- Type: object
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`userAssignedResourceIds`](#parameter-managedidentitiesuserassignedresourceids) | array | The resource ID(s) to assign to the resource. |
-
-### Parameter: `managedIdentities.userAssignedResourceIds`
-
-The resource ID(s) to assign to the resource.
-
-- Required: Yes
-- Type: array
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `smbServerNamePrefix`
-
-Required if domainName is specified. NetBIOS name of the SMB server. A computer account with this prefix will be registered in the AD and used to mount volumes.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `tags`
-
-Tags for all resources.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the NetApp account. |
-| `resourceGroupName` | string | The name of the Resource Group the NetApp account was created in. |
-| `resourceId` | string | The Resource ID of the NetApp account. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/net-app/net-app-account/capacity-pool/README.md b/modules/net-app/net-app-account/capacity-pool/README.md
deleted file mode 100644
index 381674df79..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/README.md
+++ /dev/null
@@ -1,257 +0,0 @@
-# Azure NetApp Files Capacity Pools `[Microsoft.NetApp/netAppAccounts/capacityPools]`
-
-This module deploys an Azure NetApp Files Capacity Pool.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools) |
-| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools/volumes) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the capacity pool. |
-| [`size`](#parameter-size) | int | Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104). |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`netAppAccountName`](#parameter-netappaccountname) | string | The name of the parent NetApp account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`coolAccess`](#parameter-coolaccess) | bool | If enabled (true) the pool can contain cool Access enabled volumes. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`encryptionType`](#parameter-encryptiontype) | string | Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. |
-| [`location`](#parameter-location) | string | Location of the pool volume. |
-| [`qosType`](#parameter-qostype) | string | The qos type of the pool. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`serviceLevel`](#parameter-servicelevel) | string | The pool service level. |
-| [`tags`](#parameter-tags) | object | Tags for all resources. |
-| [`volumes`](#parameter-volumes) | array | List of volumnes to create in the capacity pool. |
-
-### Parameter: `name`
-
-The name of the capacity pool.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `size`
-
-Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104).
-
-- Required: Yes
-- Type: int
-
-### Parameter: `netAppAccountName`
-
-The name of the parent NetApp account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `coolAccess`
-
-If enabled (true) the pool can contain cool Access enabled volumes.
-
-- Required: No
-- Type: bool
-- Default: `False`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `encryptionType`
-
-Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.
-
-- Required: No
-- Type: string
-- Default: `'Single'`
-- Allowed:
- ```Bicep
- [
- 'Double'
- 'Single'
- ]
- ```
-
-### Parameter: `location`
-
-Location of the pool volume.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `qosType`
-
-The qos type of the pool.
-
-- Required: No
-- Type: string
-- Default: `'Auto'`
-- Allowed:
- ```Bicep
- [
- 'Auto'
- 'Manual'
- ]
- ```
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `serviceLevel`
-
-The pool service level.
-
-- Required: No
-- Type: string
-- Default: `'Standard'`
-- Allowed:
- ```Bicep
- [
- 'Premium'
- 'Standard'
- 'StandardZRS'
- 'Ultra'
- ]
- ```
-
-### Parameter: `tags`
-
-Tags for all resources.
-
-- Required: No
-- Type: object
-
-### Parameter: `volumes`
-
-List of volumnes to create in the capacity pool.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Capacity Pool. |
-| `resourceGroupName` | string | The name of the Resource Group the Capacity Pool was created in. |
-| `resourceId` | string | The resource ID of the Capacity Pool. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/net-app/net-app-account/capacity-pool/main.bicep b/modules/net-app/net-app-account/capacity-pool/main.bicep
deleted file mode 100644
index 213245ba7e..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/main.bicep
+++ /dev/null
@@ -1,164 +0,0 @@
-metadata name = 'Azure NetApp Files Capacity Pools'
-metadata description = 'This module deploys an Azure NetApp Files Capacity Pool.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment.')
-param netAppAccountName string
-
-@description('Required. The name of the capacity pool.')
-param name string
-
-@description('Optional. Location of the pool volume.')
-param location string = resourceGroup().location
-
-@description('Optional. Tags for all resources.')
-param tags object?
-
-@description('Optional. The pool service level.')
-@allowed([
- 'Premium'
- 'Standard'
- 'StandardZRS'
- 'Ultra'
-])
-param serviceLevel string = 'Standard'
-
-@description('Required. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104).')
-param size int
-
-@description('Optional. The qos type of the pool.')
-@allowed([
- 'Auto'
- 'Manual'
-])
-param qosType string = 'Auto'
-
-@description('Optional. List of volumnes to create in the capacity pool.')
-param volumes array = []
-
-@description('Optional. If enabled (true) the pool can contain cool Access enabled volumes.')
-param coolAccess bool = false
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.')
-@allowed([
- 'Double'
- 'Single'
-])
-param encryptionType string = 'Single'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2022-11-01' existing = {
- name: netAppAccountName
-}
-
-resource capacityPool 'Microsoft.NetApp/netAppAccounts/capacityPools@2022-11-01' = {
- name: name
- parent: netAppAccount
- location: location
- tags: tags
- properties: {
- serviceLevel: serviceLevel
- size: size
- qosType: qosType
- coolAccess: coolAccess
- encryptionType: encryptionType
- }
-}
-
-@batchSize(1)
-module capacityPool_volumes 'volume/main.bicep' = [for (volume, index) in volumes: {
- name: '${deployment().name}-Vol-${index}'
- params: {
- netAppAccountName: netAppAccount.name
- capacityPoolName: capacityPool.name
- name: volume.name
- location: location
- serviceLevel: serviceLevel
- creationToken: contains(volume, 'creationToken') ? volume.creationToken : volume.name
- usageThreshold: volume.usageThreshold
- protocolTypes: contains(volume, 'protocolTypes') ? volume.protocolTypes : []
- subnetResourceId: volume.subnetResourceId
- exportPolicyRules: contains(volume, 'exportPolicyRules') ? volume.exportPolicyRules : []
- roleAssignments: contains(volume, 'roleAssignments') ? volume.roleAssignments : []
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-resource capacityPool_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(capacityPool.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: capacityPool
-}]
-
-@description('The name of the Capacity Pool.')
-output name string = capacityPool.name
-
-@description('The resource ID of the Capacity Pool.')
-output resourceId string = capacityPool.id
-
-@description('The name of the Resource Group the Capacity Pool was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = capacityPool.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/net-app/net-app-account/capacity-pool/main.json b/modules/net-app/net-app-account/capacity-pool/main.json
deleted file mode 100644
index 464a90fcd8..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/main.json
+++ /dev/null
@@ -1,609 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15353329491336313807"
- },
- "name": "Azure NetApp Files Capacity Pools",
- "description": "This module deploys an Azure NetApp Files Capacity Pool.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "netAppAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the capacity pool."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location of the pool volume."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags for all resources."
- }
- },
- "serviceLevel": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Premium",
- "Standard",
- "StandardZRS",
- "Ultra"
- ],
- "metadata": {
- "description": "Optional. The pool service level."
- }
- },
- "size": {
- "type": "int",
- "metadata": {
- "description": "Required. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104)."
- }
- },
- "qosType": {
- "type": "string",
- "defaultValue": "Auto",
- "allowedValues": [
- "Auto",
- "Manual"
- ],
- "metadata": {
- "description": "Optional. The qos type of the pool."
- }
- },
- "volumes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of volumnes to create in the capacity pool."
- }
- },
- "coolAccess": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If enabled (true) the pool can contain cool Access enabled volumes."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "encryptionType": {
- "type": "string",
- "defaultValue": "Single",
- "allowedValues": [
- "Double",
- "Single"
- ],
- "metadata": {
- "description": "Optional. Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "netAppAccount": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts",
- "apiVersion": "2022-11-01",
- "name": "[parameters('netAppAccountName')]"
- },
- "capacityPool": {
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "serviceLevel": "[parameters('serviceLevel')]",
- "size": "[parameters('size')]",
- "qosType": "[parameters('qosType')]",
- "coolAccess": "[parameters('coolAccess')]",
- "encryptionType": "[parameters('encryptionType')]"
- },
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "capacityPool_roleAssignments": {
- "copy": {
- "name": "capacityPool_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}/capacityPools/{1}', parameters('netAppAccountName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', parameters('netAppAccountName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "capacityPool"
- ]
- },
- "capacityPool_volumes": {
- "copy": {
- "name": "capacityPool_volumes",
- "count": "[length(parameters('volumes'))]",
- "mode": "serial",
- "batchSize": 1
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Vol-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "netAppAccountName": {
- "value": "[parameters('netAppAccountName')]"
- },
- "capacityPoolName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('volumes')[copyIndex()].name]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "serviceLevel": {
- "value": "[parameters('serviceLevel')]"
- },
- "creationToken": "[if(contains(parameters('volumes')[copyIndex()], 'creationToken'), createObject('value', parameters('volumes')[copyIndex()].creationToken), createObject('value', parameters('volumes')[copyIndex()].name))]",
- "usageThreshold": {
- "value": "[parameters('volumes')[copyIndex()].usageThreshold]"
- },
- "protocolTypes": "[if(contains(parameters('volumes')[copyIndex()], 'protocolTypes'), createObject('value', parameters('volumes')[copyIndex()].protocolTypes), createObject('value', createArray()))]",
- "subnetResourceId": {
- "value": "[parameters('volumes')[copyIndex()].subnetResourceId]"
- },
- "exportPolicyRules": "[if(contains(parameters('volumes')[copyIndex()], 'exportPolicyRules'), createObject('value', parameters('volumes')[copyIndex()].exportPolicyRules), createObject('value', createArray()))]",
- "roleAssignments": "[if(contains(parameters('volumes')[copyIndex()], 'roleAssignments'), createObject('value', parameters('volumes')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3662331312918191126"
- },
- "name": "Azure NetApp Files Capacity Pool Volumes",
- "description": "This module deploys an Azure NetApp Files Capacity Pool Volume.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "netAppAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment."
- }
- },
- "capacityPoolName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent capacity pool. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the pool volume."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location of the pool volume."
- }
- },
- "serviceLevel": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Premium",
- "Standard",
- "StandardZRS",
- "Ultra"
- ],
- "metadata": {
- "description": "Optional. The pool service level. Must match the one of the parent capacity pool."
- }
- },
- "creationToken": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. A unique file path for the volume. This is the name of the volume export. A volume is mounted using the export path. File path must start with an alphabetical character and be unique within the subscription."
- }
- },
- "usageThreshold": {
- "type": "int",
- "metadata": {
- "description": "Required. Maximum storage quota allowed for a file system in bytes."
- }
- },
- "protocolTypes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Set of protocol types."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes."
- }
- },
- "exportPolicyRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Export policy rules."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "netAppAccount::capacityPool": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]",
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "netAppAccount": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts",
- "apiVersion": "2022-11-01",
- "name": "[parameters('netAppAccountName')]"
- },
- "volume": {
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "properties": {
- "serviceLevel": "[parameters('serviceLevel')]",
- "creationToken": "[parameters('creationToken')]",
- "usageThreshold": "[parameters('usageThreshold')]",
- "protocolTypes": "[parameters('protocolTypes')]",
- "subnetId": "[parameters('subnetResourceId')]",
- "exportPolicy": "[if(not(empty(parameters('exportPolicyRules'))), createObject('rules', parameters('exportPolicyRules')), null())]"
- },
- "dependsOn": [
- "netAppAccount::capacityPool"
- ]
- },
- "volume_roleAssignments": {
- "copy": {
- "name": "volume_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}/capacityPools/{1}/volumes/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.NetApp/netAppAccounts/capacityPools/volumes', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "volume"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Volume."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The Resource ID of the Volume."
- },
- "value": "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools/volumes', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Volume was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('volume', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "capacityPool",
- "netAppAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Capacity Pool."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Capacity Pool."
- },
- "value": "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', parameters('netAppAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Capacity Pool was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('capacityPool', '2022-11-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/net-app/net-app-account/capacity-pool/version.json b/modules/net-app/net-app-account/capacity-pool/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/net-app/net-app-account/capacity-pool/volume/README.md b/modules/net-app/net-app-account/capacity-pool/volume/README.md
deleted file mode 100644
index bf17feb0a2..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/volume/README.md
+++ /dev/null
@@ -1,241 +0,0 @@
-# Azure NetApp Files Capacity Pool Volumes `[Microsoft.NetApp/netAppAccounts/capacityPools/volumes]`
-
-This module deploys an Azure NetApp Files Capacity Pool Volume.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools/volumes) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | The name of the pool volume. |
-| [`subnetResourceId`](#parameter-subnetresourceid) | string | The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. |
-| [`usageThreshold`](#parameter-usagethreshold) | int | Maximum storage quota allowed for a file system in bytes. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`capacityPoolName`](#parameter-capacitypoolname) | string | The name of the parent capacity pool. Required if the template is used in a standalone deployment. |
-| [`netAppAccountName`](#parameter-netappaccountname) | string | The name of the parent NetApp account. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`creationToken`](#parameter-creationtoken) | string | A unique file path for the volume. This is the name of the volume export. A volume is mounted using the export path. File path must start with an alphabetical character and be unique within the subscription. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`exportPolicyRules`](#parameter-exportpolicyrules) | array | Export policy rules. |
-| [`location`](#parameter-location) | string | Location of the pool volume. |
-| [`protocolTypes`](#parameter-protocoltypes) | array | Set of protocol types. |
-| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
-| [`serviceLevel`](#parameter-servicelevel) | string | The pool service level. Must match the one of the parent capacity pool. |
-
-### Parameter: `name`
-
-The name of the pool volume.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `subnetResourceId`
-
-The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `usageThreshold`
-
-Maximum storage quota allowed for a file system in bytes.
-
-- Required: Yes
-- Type: int
-
-### Parameter: `capacityPoolName`
-
-The name of the parent capacity pool. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `netAppAccountName`
-
-The name of the parent NetApp account. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `creationToken`
-
-A unique file path for the volume. This is the name of the volume export. A volume is mounted using the export path. File path must start with an alphabetical character and be unique within the subscription.
-
-- Required: No
-- Type: string
-- Default: `[parameters('name')]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `exportPolicyRules`
-
-Export policy rules.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `location`
-
-Location of the pool volume.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `protocolTypes`
-
-Set of protocol types.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `roleAssignments`
-
-Array of role assignments to create.
-
-- Required: No
-- Type: array
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`principalId`](#parameter-roleassignmentsprincipalid) | string | The principal ID of the principal (user/group/identity) to assign the role to. |
-| [`roleDefinitionIdOrName`](#parameter-roleassignmentsroledefinitionidorname) | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
-| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
-| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
-| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
-| [`principalType`](#parameter-roleassignmentsprincipaltype) | string | The principal type of the assigned principal ID. |
-
-### Parameter: `roleAssignments.principalId`
-
-The principal ID of the principal (user/group/identity) to assign the role to.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.roleDefinitionIdOrName`
-
-The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `roleAssignments.condition`
-
-The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.conditionVersion`
-
-Version of the condition.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- '2.0'
- ]
- ```
-
-### Parameter: `roleAssignments.delegatedManagedIdentityResourceId`
-
-The Resource Id of the delegated managed identity resource.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.description`
-
-The description of the role assignment.
-
-- Required: No
-- Type: string
-
-### Parameter: `roleAssignments.principalType`
-
-The principal type of the assigned principal ID.
-
-- Required: No
-- Type: string
-- Allowed:
- ```Bicep
- [
- 'Device'
- 'ForeignGroup'
- 'Group'
- 'ServicePrincipal'
- 'User'
- ]
- ```
-
-### Parameter: `serviceLevel`
-
-The pool service level. Must match the one of the parent capacity pool.
-
-- Required: No
-- Type: string
-- Default: `'Standard'`
-- Allowed:
- ```Bicep
- [
- 'Premium'
- 'Standard'
- 'StandardZRS'
- 'Ultra'
- ]
- ```
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the Volume. |
-| `resourceGroupName` | string | The name of the Resource Group the Volume was created in. |
-| `resourceId` | string | The Resource ID of the Volume. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/net-app/net-app-account/capacity-pool/volume/main.bicep b/modules/net-app/net-app-account/capacity-pool/volume/main.bicep
deleted file mode 100644
index 5870382621..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/volume/main.bicep
+++ /dev/null
@@ -1,141 +0,0 @@
-metadata name = 'Azure NetApp Files Capacity Pool Volumes'
-metadata description = 'This module deploys an Azure NetApp Files Capacity Pool Volume.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment.')
-param netAppAccountName string
-
-@description('Conditional. The name of the parent capacity pool. Required if the template is used in a standalone deployment.')
-param capacityPoolName string
-
-@description('Required. The name of the pool volume.')
-param name string
-
-@description('Optional. Location of the pool volume.')
-param location string = resourceGroup().location
-
-@description('Optional. The pool service level. Must match the one of the parent capacity pool.')
-@allowed([
- 'Premium'
- 'Standard'
- 'StandardZRS'
- 'Ultra'
-])
-param serviceLevel string = 'Standard'
-
-@description('Optional. A unique file path for the volume. This is the name of the volume export. A volume is mounted using the export path. File path must start with an alphabetical character and be unique within the subscription.')
-param creationToken string = name
-
-@description('Required. Maximum storage quota allowed for a file system in bytes.')
-param usageThreshold int
-
-@description('Optional. Set of protocol types.')
-param protocolTypes array = []
-
-@description('Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes.')
-param subnetResourceId string
-
-@description('Optional. Export policy rules.')
-param exportPolicyRules array = []
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2022-11-01' existing = {
- name: netAppAccountName
-
- resource capacityPool 'capacityPools@2022-11-01' existing = {
- name: capacityPoolName
- }
-}
-
-resource volume 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes@2022-11-01' = {
- name: name
- parent: netAppAccount::capacityPool
- location: location
- properties: {
- serviceLevel: serviceLevel
- creationToken: creationToken
- usageThreshold: usageThreshold
- protocolTypes: protocolTypes
- subnetId: subnetResourceId
- exportPolicy: !empty(exportPolicyRules) ? {
- rules: exportPolicyRules
- } : null
- }
-}
-
-resource volume_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(volume.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: volume
-}]
-
-@description('The name of the Volume.')
-output name string = volume.name
-
-@description('The Resource ID of the Volume.')
-output resourceId string = volume.id
-
-@description('The name of the Resource Group the Volume was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = volume.location
-// =============== //
-// Definitions //
-// =============== //
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/net-app/net-app-account/capacity-pool/volume/main.json b/modules/net-app/net-app-account/capacity-pool/volume/main.json
deleted file mode 100644
index 5e0f1b20ef..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/volume/main.json
+++ /dev/null
@@ -1,278 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3662331312918191126"
- },
- "name": "Azure NetApp Files Capacity Pool Volumes",
- "description": "This module deploys an Azure NetApp Files Capacity Pool Volume.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "netAppAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment."
- }
- },
- "capacityPoolName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent capacity pool. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the pool volume."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location of the pool volume."
- }
- },
- "serviceLevel": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Premium",
- "Standard",
- "StandardZRS",
- "Ultra"
- ],
- "metadata": {
- "description": "Optional. The pool service level. Must match the one of the parent capacity pool."
- }
- },
- "creationToken": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. A unique file path for the volume. This is the name of the volume export. A volume is mounted using the export path. File path must start with an alphabetical character and be unique within the subscription."
- }
- },
- "usageThreshold": {
- "type": "int",
- "metadata": {
- "description": "Required. Maximum storage quota allowed for a file system in bytes."
- }
- },
- "protocolTypes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Set of protocol types."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes."
- }
- },
- "exportPolicyRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Export policy rules."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "netAppAccount::capacityPool": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]",
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "netAppAccount": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts",
- "apiVersion": "2022-11-01",
- "name": "[parameters('netAppAccountName')]"
- },
- "volume": {
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "properties": {
- "serviceLevel": "[parameters('serviceLevel')]",
- "creationToken": "[parameters('creationToken')]",
- "usageThreshold": "[parameters('usageThreshold')]",
- "protocolTypes": "[parameters('protocolTypes')]",
- "subnetId": "[parameters('subnetResourceId')]",
- "exportPolicy": "[if(not(empty(parameters('exportPolicyRules'))), createObject('rules', parameters('exportPolicyRules')), null())]"
- },
- "dependsOn": [
- "netAppAccount::capacityPool"
- ]
- },
- "volume_roleAssignments": {
- "copy": {
- "name": "volume_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}/capacityPools/{1}/volumes/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.NetApp/netAppAccounts/capacityPools/volumes', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "volume"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Volume."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The Resource ID of the Volume."
- },
- "value": "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools/volumes', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Volume was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('volume', '2022-11-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/net-app/net-app-account/capacity-pool/volume/version.json b/modules/net-app/net-app-account/capacity-pool/volume/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/net-app/net-app-account/capacity-pool/volume/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/net-app/net-app-account/main.bicep b/modules/net-app/net-app-account/main.bicep
deleted file mode 100644
index 2fc4c5833d..0000000000
--- a/modules/net-app/net-app-account/main.bicep
+++ /dev/null
@@ -1,189 +0,0 @@
-metadata name = 'Azure NetApp Files'
-metadata description = 'This module deploys an Azure NetApp File.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. The name of the NetApp account.')
-param name string
-
-@description('Optional. Fully Qualified Active Directory DNS Domain Name (e.g. \'contoso.com\').')
-param domainName string = ''
-
-@description('Optional. Required if domainName is specified. Username of Active Directory domain administrator, with permissions to create SMB server machine account in the AD domain.')
-param domainJoinUser string = ''
-
-@description('Optional. Required if domainName is specified. Password of the user specified in domainJoinUser parameter.')
-@secure()
-param domainJoinPassword string = ''
-
-@description('Optional. Used only if domainName is specified. LDAP Path for the Organization Unit (OU) where SMB Server machine accounts will be created (i.e. \'OU=SecondLevel,OU=FirstLevel\').')
-param domainJoinOU string = ''
-
-@description('Optional. Required if domainName is specified. Comma separated list of DNS server IP addresses (IPv4 only) required for the Active Directory (AD) domain join and SMB authentication operations to succeed.')
-param dnsServers string = ''
-
-@description('Optional. Required if domainName is specified. NetBIOS name of the SMB server. A computer account with this prefix will be registered in the AD and used to mount volumes.')
-param smbServerNamePrefix string = ''
-
-@description('Optional. Capacity pools to create.')
-param capacityPools array = []
-
-@description('Optional. The managed identity definition for this resource.')
-param managedIdentities managedIdentitiesType
-
-@description('Optional. Array of role assignments to create.')
-param roleAssignments roleAssignmentType
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. The lock settings of the service.')
-param lock lockType
-
-@description('Optional. Tags for all resources.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-var enableReferencedModulesTelemetry = false
-
-var activeDirectoryConnectionProperties = [
- {
- username: !empty(domainName) ? domainJoinUser : null
- password: !empty(domainName) ? domainJoinPassword : null
- domain: !empty(domainName) ? domainName : null
- dns: !empty(domainName) ? dnsServers : null
- smbServerName: !empty(domainName) ? smbServerNamePrefix : null
- organizationalUnit: !empty(domainJoinOU) ? domainJoinOU : null
- }
-]
-
-var formattedUserAssignedIdentities = reduce(map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }), {}, (cur, next) => union(cur, next)) // Converts the flat array to an object like { '${id1}': {}, '${id2}': {} }
-
-var identity = !empty(managedIdentities) ? {
- type: !empty(managedIdentities.?userAssignedResourceIds ?? {}) ? 'UserAssigned' : null
- userAssignedIdentities: !empty(formattedUserAssignedIdentities) ? formattedUserAssignedIdentities : null
-} : null
-
-var builtInRoleNames = {
- Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
- Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
- Reader: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- 'Role Based Access Control Administrator (Preview)': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')
- 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
-}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource netAppAccount 'Microsoft.NetApp/netAppAccounts@2022-11-01' = {
- name: name
- tags: tags
- identity: identity
- location: location
- properties: {
- activeDirectories: !empty(domainName) ? activeDirectoryConnectionProperties : null
- }
-}
-
-resource netAppAccount_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') {
- name: lock.?name ?? 'lock-${name}'
- properties: {
- level: lock.?kind ?? ''
- notes: lock.?kind == 'CanNotDelete' ? 'Cannot delete resource or child resources.' : 'Cannot delete or modify the resource or child resources.'
- }
- scope: netAppAccount
-}
-
-resource netAppAccount_roleAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for (roleAssignment, index) in (roleAssignments ?? []): {
- name: guid(netAppAccount.id, roleAssignment.principalId, roleAssignment.roleDefinitionIdOrName)
- properties: {
- roleDefinitionId: contains(builtInRoleNames, roleAssignment.roleDefinitionIdOrName) ? builtInRoleNames[roleAssignment.roleDefinitionIdOrName] : contains(roleAssignment.roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/') ? roleAssignment.roleDefinitionIdOrName : subscriptionResourceId('Microsoft.Authorization/roleDefinitions', roleAssignment.roleDefinitionIdOrName)
- principalId: roleAssignment.principalId
- description: roleAssignment.?description
- principalType: roleAssignment.?principalType
- condition: roleAssignment.?condition
- conditionVersion: !empty(roleAssignment.?condition) ? (roleAssignment.?conditionVersion ?? '2.0') : null // Must only be set if condtion is set
- delegatedManagedIdentityResourceId: roleAssignment.?delegatedManagedIdentityResourceId
- }
- scope: netAppAccount
-}]
-
-module netAppAccount_capacityPools 'capacity-pool/main.bicep' = [for (capacityPool, index) in capacityPools: {
- name: '${uniqueString(deployment().name, location)}-ANFAccount-CapPool-${index}'
- params: {
- netAppAccountName: netAppAccount.name
- name: capacityPool.name
- location: location
- size: capacityPool.size
- serviceLevel: contains(capacityPool, 'serviceLevel') ? capacityPool.serviceLevel : 'Standard'
- qosType: contains(capacityPool, 'qosType') ? capacityPool.qosType : 'Auto'
- volumes: contains(capacityPool, 'volumes') ? capacityPool.volumes : []
- coolAccess: contains(capacityPool, 'coolAccess') ? capacityPool.coolAccess : false
- roleAssignments: contains(capacityPool, 'roleAssignments') ? capacityPool.roleAssignments : []
- encryptionType: contains(capacityPool, 'encryptionType') ? capacityPool.encryptionType : 'Single'
- tags: capacityPool.?tags ?? tags
- enableDefaultTelemetry: enableReferencedModulesTelemetry
- }
-}]
-
-@description('The name of the NetApp account.')
-output name string = netAppAccount.name
-
-@description('The Resource ID of the NetApp account.')
-output resourceId string = netAppAccount.id
-
-@description('The name of the Resource Group the NetApp account was created in.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = netAppAccount.location
-
-// =============== //
-// Definitions //
-// =============== //
-
-type managedIdentitiesType = {
- @description('Optional. The resource ID(s) to assign to the resource.')
- userAssignedResourceIds: string[]
-}?
-
-type lockType = {
- @description('Optional. Specify the name of lock.')
- name: string?
-
- @description('Optional. Specify the type of lock.')
- kind: ('CanNotDelete' | 'ReadOnly' | 'None')?
-}?
-
-type roleAssignmentType = {
- @description('Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
- roleDefinitionIdOrName: string
-
- @description('Required. The principal ID of the principal (user/group/identity) to assign the role to.')
- principalId: string
-
- @description('Optional. The principal type of the assigned principal ID.')
- principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')?
-
- @description('Optional. The description of the role assignment.')
- description: string?
-
- @description('Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"')
- condition: string?
-
- @description('Optional. Version of the condition.')
- conditionVersion: '2.0'?
-
- @description('Optional. The Resource Id of the delegated managed identity resource.')
- delegatedManagedIdentityResourceId: string?
-}[]?
diff --git a/modules/net-app/net-app-account/main.json b/modules/net-app/net-app-account/main.json
deleted file mode 100644
index 862b3c67db..0000000000
--- a/modules/net-app/net-app-account/main.json
+++ /dev/null
@@ -1,987 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "8081072067801758787"
- },
- "name": "Azure NetApp Files",
- "description": "This module deploys an Azure NetApp File.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "managedIdentitiesType": {
- "type": "object",
- "properties": {
- "userAssignedResourceIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "metadata": {
- "description": "Optional. The resource ID(s) to assign to the resource."
- }
- }
- },
- "nullable": true
- },
- "lockType": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the name of lock."
- }
- },
- "kind": {
- "type": "string",
- "allowedValues": [
- "CanNotDelete",
- "None",
- "ReadOnly"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Specify the type of lock."
- }
- }
- },
- "nullable": true
- },
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the NetApp account."
- }
- },
- "domainName": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Fully Qualified Active Directory DNS Domain Name (e.g. 'contoso.com')."
- }
- },
- "domainJoinUser": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Required if domainName is specified. Username of Active Directory domain administrator, with permissions to create SMB server machine account in the AD domain."
- }
- },
- "domainJoinPassword": {
- "type": "securestring",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Required if domainName is specified. Password of the user specified in domainJoinUser parameter."
- }
- },
- "domainJoinOU": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Used only if domainName is specified. LDAP Path for the Organization Unit (OU) where SMB Server machine accounts will be created (i.e. 'OU=SecondLevel,OU=FirstLevel')."
- }
- },
- "dnsServers": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Required if domainName is specified. Comma separated list of DNS server IP addresses (IPv4 only) required for the Active Directory (AD) domain join and SMB authentication operations to succeed."
- }
- },
- "smbServerNamePrefix": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. Required if domainName is specified. NetBIOS name of the SMB server. A computer account with this prefix will be registered in the AD and used to mount volumes."
- }
- },
- "capacityPools": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Capacity pools to create."
- }
- },
- "managedIdentities": {
- "$ref": "#/definitions/managedIdentitiesType",
- "metadata": {
- "description": "Optional. The managed identity definition for this resource."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "lock": {
- "$ref": "#/definitions/lockType",
- "metadata": {
- "description": "Optional. The lock settings of the service."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags for all resources."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "activeDirectoryConnectionProperties": [
- {
- "username": "[if(not(empty(parameters('domainName'))), parameters('domainJoinUser'), null())]",
- "password": "[if(not(empty(parameters('domainName'))), parameters('domainJoinPassword'), null())]",
- "domain": "[if(not(empty(parameters('domainName'))), parameters('domainName'), null())]",
- "dns": "[if(not(empty(parameters('domainName'))), parameters('dnsServers'), null())]",
- "smbServerName": "[if(not(empty(parameters('domainName'))), parameters('smbServerNamePrefix'), null())]",
- "organizationalUnit": "[if(not(empty(parameters('domainJoinOU'))), parameters('domainJoinOU'), null())]"
- }
- ],
- "formattedUserAssignedIdentities": "[reduce(map(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createArray()), lambda('id', createObject(format('{0}', lambdaVariables('id')), createObject()))), createObject(), lambda('cur', 'next', union(lambdaVariables('cur'), lambdaVariables('next'))))]",
- "identity": "[if(not(empty(parameters('managedIdentities'))), createObject('type', if(not(empty(coalesce(tryGet(parameters('managedIdentities'), 'userAssignedResourceIds'), createObject()))), 'UserAssigned', null()), 'userAssignedIdentities', if(not(empty(variables('formattedUserAssignedIdentities'))), variables('formattedUserAssignedIdentities'), null())), null())]",
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "netAppAccount": {
- "type": "Microsoft.NetApp/netAppAccounts",
- "apiVersion": "2022-11-01",
- "name": "[parameters('name')]",
- "tags": "[parameters('tags')]",
- "identity": "[variables('identity')]",
- "location": "[parameters('location')]",
- "properties": {
- "activeDirectories": "[if(not(empty(parameters('domainName'))), variables('activeDirectoryConnectionProperties'), null())]"
- }
- },
- "netAppAccount_lock": {
- "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]",
- "type": "Microsoft.Authorization/locks",
- "apiVersion": "2020-05-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}', parameters('name'))]",
- "name": "[coalesce(tryGet(parameters('lock'), 'name'), format('lock-{0}', parameters('name')))]",
- "properties": {
- "level": "[coalesce(tryGet(parameters('lock'), 'kind'), '')]",
- "notes": "[if(equals(tryGet(parameters('lock'), 'kind'), 'CanNotDelete'), 'Cannot delete resource or child resources.', 'Cannot delete or modify the resource or child resources.')]"
- },
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "netAppAccount_roleAssignments": {
- "copy": {
- "name": "netAppAccount_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}', parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.NetApp/netAppAccounts', parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "netAppAccount_capacityPools": {
- "copy": {
- "name": "netAppAccount_capacityPools",
- "count": "[length(parameters('capacityPools'))]"
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-ANFAccount-CapPool-{1}', uniqueString(deployment().name, parameters('location')), copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "netAppAccountName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('capacityPools')[copyIndex()].name]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "size": {
- "value": "[parameters('capacityPools')[copyIndex()].size]"
- },
- "serviceLevel": "[if(contains(parameters('capacityPools')[copyIndex()], 'serviceLevel'), createObject('value', parameters('capacityPools')[copyIndex()].serviceLevel), createObject('value', 'Standard'))]",
- "qosType": "[if(contains(parameters('capacityPools')[copyIndex()], 'qosType'), createObject('value', parameters('capacityPools')[copyIndex()].qosType), createObject('value', 'Auto'))]",
- "volumes": "[if(contains(parameters('capacityPools')[copyIndex()], 'volumes'), createObject('value', parameters('capacityPools')[copyIndex()].volumes), createObject('value', createArray()))]",
- "coolAccess": "[if(contains(parameters('capacityPools')[copyIndex()], 'coolAccess'), createObject('value', parameters('capacityPools')[copyIndex()].coolAccess), createObject('value', false()))]",
- "roleAssignments": "[if(contains(parameters('capacityPools')[copyIndex()], 'roleAssignments'), createObject('value', parameters('capacityPools')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "encryptionType": "[if(contains(parameters('capacityPools')[copyIndex()], 'encryptionType'), createObject('value', parameters('capacityPools')[copyIndex()].encryptionType), createObject('value', 'Single'))]",
- "tags": {
- "value": "[coalesce(tryGet(parameters('capacityPools')[copyIndex()], 'tags'), parameters('tags'))]"
- },
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "15353329491336313807"
- },
- "name": "Azure NetApp Files Capacity Pools",
- "description": "This module deploys an Azure NetApp Files Capacity Pool.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "netAppAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the capacity pool."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location of the pool volume."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags for all resources."
- }
- },
- "serviceLevel": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Premium",
- "Standard",
- "StandardZRS",
- "Ultra"
- ],
- "metadata": {
- "description": "Optional. The pool service level."
- }
- },
- "size": {
- "type": "int",
- "metadata": {
- "description": "Required. Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104)."
- }
- },
- "qosType": {
- "type": "string",
- "defaultValue": "Auto",
- "allowedValues": [
- "Auto",
- "Manual"
- ],
- "metadata": {
- "description": "Optional. The qos type of the pool."
- }
- },
- "volumes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. List of volumnes to create in the capacity pool."
- }
- },
- "coolAccess": {
- "type": "bool",
- "defaultValue": false,
- "metadata": {
- "description": "Optional. If enabled (true) the pool can contain cool Access enabled volumes."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "encryptionType": {
- "type": "string",
- "defaultValue": "Single",
- "allowedValues": [
- "Double",
- "Single"
- ],
- "metadata": {
- "description": "Optional. Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "enableReferencedModulesTelemetry": false,
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "netAppAccount": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts",
- "apiVersion": "2022-11-01",
- "name": "[parameters('netAppAccountName')]"
- },
- "capacityPool": {
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "serviceLevel": "[parameters('serviceLevel')]",
- "size": "[parameters('size')]",
- "qosType": "[parameters('qosType')]",
- "coolAccess": "[parameters('coolAccess')]",
- "encryptionType": "[parameters('encryptionType')]"
- },
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "capacityPool_roleAssignments": {
- "copy": {
- "name": "capacityPool_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}/capacityPools/{1}', parameters('netAppAccountName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', parameters('netAppAccountName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "capacityPool"
- ]
- },
- "capacityPool_volumes": {
- "copy": {
- "name": "capacityPool_volumes",
- "count": "[length(parameters('volumes'))]",
- "mode": "serial",
- "batchSize": 1
- },
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2022-09-01",
- "name": "[format('{0}-Vol-{1}', deployment().name, copyIndex())]",
- "properties": {
- "expressionEvaluationOptions": {
- "scope": "inner"
- },
- "mode": "Incremental",
- "parameters": {
- "netAppAccountName": {
- "value": "[parameters('netAppAccountName')]"
- },
- "capacityPoolName": {
- "value": "[parameters('name')]"
- },
- "name": {
- "value": "[parameters('volumes')[copyIndex()].name]"
- },
- "location": {
- "value": "[parameters('location')]"
- },
- "serviceLevel": {
- "value": "[parameters('serviceLevel')]"
- },
- "creationToken": "[if(contains(parameters('volumes')[copyIndex()], 'creationToken'), createObject('value', parameters('volumes')[copyIndex()].creationToken), createObject('value', parameters('volumes')[copyIndex()].name))]",
- "usageThreshold": {
- "value": "[parameters('volumes')[copyIndex()].usageThreshold]"
- },
- "protocolTypes": "[if(contains(parameters('volumes')[copyIndex()], 'protocolTypes'), createObject('value', parameters('volumes')[copyIndex()].protocolTypes), createObject('value', createArray()))]",
- "subnetResourceId": {
- "value": "[parameters('volumes')[copyIndex()].subnetResourceId]"
- },
- "exportPolicyRules": "[if(contains(parameters('volumes')[copyIndex()], 'exportPolicyRules'), createObject('value', parameters('volumes')[copyIndex()].exportPolicyRules), createObject('value', createArray()))]",
- "roleAssignments": "[if(contains(parameters('volumes')[copyIndex()], 'roleAssignments'), createObject('value', parameters('volumes')[copyIndex()].roleAssignments), createObject('value', createArray()))]",
- "enableDefaultTelemetry": {
- "value": "[variables('enableReferencedModulesTelemetry')]"
- }
- },
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "3662331312918191126"
- },
- "name": "Azure NetApp Files Capacity Pool Volumes",
- "description": "This module deploys an Azure NetApp Files Capacity Pool Volume.",
- "owner": "Azure/module-maintainers"
- },
- "definitions": {
- "roleAssignmentType": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "roleDefinitionIdOrName": {
- "type": "string",
- "metadata": {
- "description": "Required. The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'."
- }
- },
- "principalId": {
- "type": "string",
- "metadata": {
- "description": "Required. The principal ID of the principal (user/group/identity) to assign the role to."
- }
- },
- "principalType": {
- "type": "string",
- "allowedValues": [
- "Device",
- "ForeignGroup",
- "Group",
- "ServicePrincipal",
- "User"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. The principal type of the assigned principal ID."
- }
- },
- "description": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The description of the role assignment."
- }
- },
- "condition": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase \"foo_storage_container\""
- }
- },
- "conditionVersion": {
- "type": "string",
- "allowedValues": [
- "2.0"
- ],
- "nullable": true,
- "metadata": {
- "description": "Optional. Version of the condition."
- }
- },
- "delegatedManagedIdentityResourceId": {
- "type": "string",
- "nullable": true,
- "metadata": {
- "description": "Optional. The Resource Id of the delegated managed identity resource."
- }
- }
- }
- },
- "nullable": true
- }
- },
- "parameters": {
- "netAppAccountName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent NetApp account. Required if the template is used in a standalone deployment."
- }
- },
- "capacityPoolName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent capacity pool. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the pool volume."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location of the pool volume."
- }
- },
- "serviceLevel": {
- "type": "string",
- "defaultValue": "Standard",
- "allowedValues": [
- "Premium",
- "Standard",
- "StandardZRS",
- "Ultra"
- ],
- "metadata": {
- "description": "Optional. The pool service level. Must match the one of the parent capacity pool."
- }
- },
- "creationToken": {
- "type": "string",
- "defaultValue": "[parameters('name')]",
- "metadata": {
- "description": "Optional. A unique file path for the volume. This is the name of the volume export. A volume is mounted using the export path. File path must start with an alphabetical character and be unique within the subscription."
- }
- },
- "usageThreshold": {
- "type": "int",
- "metadata": {
- "description": "Required. Maximum storage quota allowed for a file system in bytes."
- }
- },
- "protocolTypes": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Set of protocol types."
- }
- },
- "subnetResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes."
- }
- },
- "exportPolicyRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. Export policy rules."
- }
- },
- "roleAssignments": {
- "$ref": "#/definitions/roleAssignmentType",
- "metadata": {
- "description": "Optional. Array of role assignments to create."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "variables": {
- "builtInRoleNames": {
- "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
- "Owner": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')]",
- "Reader": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]",
- "Role Based Access Control Administrator (Preview)": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f58310d9-a9f6-439a-9e8d-f62e7b41a168')]",
- "User Access Administrator": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')]"
- }
- },
- "resources": {
- "netAppAccount::capacityPool": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}', parameters('netAppAccountName'), parameters('capacityPoolName'))]",
- "dependsOn": [
- "netAppAccount"
- ]
- },
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "netAppAccount": {
- "existing": true,
- "type": "Microsoft.NetApp/netAppAccounts",
- "apiVersion": "2022-11-01",
- "name": "[parameters('netAppAccountName')]"
- },
- "volume": {
- "type": "Microsoft.NetApp/netAppAccounts/capacityPools/volumes",
- "apiVersion": "2022-11-01",
- "name": "[format('{0}/{1}/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
- "location": "[parameters('location')]",
- "properties": {
- "serviceLevel": "[parameters('serviceLevel')]",
- "creationToken": "[parameters('creationToken')]",
- "usageThreshold": "[parameters('usageThreshold')]",
- "protocolTypes": "[parameters('protocolTypes')]",
- "subnetId": "[parameters('subnetResourceId')]",
- "exportPolicy": "[if(not(empty(parameters('exportPolicyRules'))), createObject('rules', parameters('exportPolicyRules')), null())]"
- },
- "dependsOn": [
- "netAppAccount::capacityPool"
- ]
- },
- "volume_roleAssignments": {
- "copy": {
- "name": "volume_roleAssignments",
- "count": "[length(coalesce(parameters('roleAssignments'), createArray()))]"
- },
- "type": "Microsoft.Authorization/roleAssignments",
- "apiVersion": "2022-04-01",
- "scope": "[format('Microsoft.NetApp/netAppAccounts/{0}/capacityPools/{1}/volumes/{2}', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]",
- "name": "[guid(resourceId('Microsoft.NetApp/netAppAccounts/capacityPools/volumes', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name')), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId, coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)]",
- "properties": {
- "roleDefinitionId": "[if(contains(variables('builtInRoleNames'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName), variables('builtInRoleNames')[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName], if(contains(coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, '/providers/Microsoft.Authorization/roleDefinitions/'), coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', coalesce(parameters('roleAssignments'), createArray())[copyIndex()].roleDefinitionIdOrName)))]",
- "principalId": "[coalesce(parameters('roleAssignments'), createArray())[copyIndex()].principalId]",
- "description": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'description')]",
- "principalType": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'principalType')]",
- "condition": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition')]",
- "conditionVersion": "[if(not(empty(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'condition'))), coalesce(tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'conditionVersion'), '2.0'), null())]",
- "delegatedManagedIdentityResourceId": "[tryGet(coalesce(parameters('roleAssignments'), createArray())[copyIndex()], 'delegatedManagedIdentityResourceId')]"
- },
- "dependsOn": [
- "volume"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Volume."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The Resource ID of the Volume."
- },
- "value": "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools/volumes', parameters('netAppAccountName'), parameters('capacityPoolName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Volume was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('volume', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "capacityPool",
- "netAppAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the Capacity Pool."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the Capacity Pool."
- },
- "value": "[resourceId('Microsoft.NetApp/netAppAccounts/capacityPools', parameters('netAppAccountName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the Capacity Pool was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('capacityPool', '2022-11-01', 'full').location]"
- }
- }
- }
- },
- "dependsOn": [
- "netAppAccount"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the NetApp account."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The Resource ID of the NetApp account."
- },
- "value": "[resourceId('Microsoft.NetApp/netAppAccounts', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the Resource Group the NetApp account was created in."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('netAppAccount', '2022-11-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/net-app/net-app-account/tests/e2e/defaults/main.test.bicep b/modules/net-app/net-app-account/tests/e2e/defaults/main.test.bicep
deleted file mode 100644
index 5a4111f482..0000000000
--- a/modules/net-app/net-app-account/tests/e2e/defaults/main.test.bicep
+++ /dev/null
@@ -1,48 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using only defaults'
-metadata description = 'This instance deploys the module with the minimum set of required parameters.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${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 = 'nanaamin'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- }
-}
diff --git a/modules/net-app/net-app-account/tests/e2e/nfs3/dependencies.bicep b/modules/net-app/net-app-account/tests/e2e/nfs3/dependencies.bicep
deleted file mode 100644
index 71e1d77e16..0000000000
--- a/modules/net-app/net-app-account/tests/e2e/nfs3/dependencies.bicep
+++ /dev/null
@@ -1,49 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- delegations: [
- {
- name: 'netappDel'
- properties: {
- serviceName: 'Microsoft.Netapp/volumes'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
diff --git a/modules/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep b/modules/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep
deleted file mode 100644
index dc2b95f9b3..0000000000
--- a/modules/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep
+++ /dev/null
@@ -1,146 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${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 = 'nanaanfs3'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- capacityPools: [
- {
- name: '${namePrefix}-${serviceShort}-cp-001'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- serviceLevel: 'Premium'
- size: 4398046511104
- volumes: [
- {
- exportPolicyRules: [
- {
- allowedClients: '0.0.0.0/0'
- nfsv3: true
- nfsv41: false
- ruleIndex: 1
- unixReadOnly: false
- unixReadWrite: true
- }
- ]
- name: '${namePrefix}-${serviceShort}-vol-001'
- protocolTypes: [
- 'NFSv3'
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- usageThreshold: 107374182400
- }
- {
- name: '${namePrefix}-${serviceShort}-vol-002'
- protocolTypes: [
- 'NFSv3'
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- usageThreshold: 107374182400
- }
- ]
- }
- {
- name: '${namePrefix}-${serviceShort}-cp-002'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- serviceLevel: 'Premium'
- size: 4398046511104
- volumes: []
- }
- ]
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Contact: 'test.user@testcompany.com'
- CostCenter: '7890'
- Environment: 'Non-Prod'
- PurchaseOrder: '1234'
- Role: 'DeploymentValidation'
- ServiceName: 'DeploymentValidation'
- }
- }
-}
diff --git a/modules/net-app/net-app-account/tests/e2e/nfs41/dependencies.bicep b/modules/net-app/net-app-account/tests/e2e/nfs41/dependencies.bicep
deleted file mode 100644
index d0c6383547..0000000000
--- a/modules/net-app/net-app-account/tests/e2e/nfs41/dependencies.bicep
+++ /dev/null
@@ -1,52 +0,0 @@
-@description('Optional. The location to deploy to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- delegations: [
- {
- name: 'netappDel'
- properties: {
- serviceName: 'Microsoft.Netapp/volumes'
- }
- }
- ]
- }
- }
- ]
- }
-}
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
diff --git a/modules/net-app/net-app-account/tests/e2e/nfs41/main.test.bicep b/modules/net-app/net-app-account/tests/e2e/nfs41/main.test.bicep
deleted file mode 100644
index a751b084cc..0000000000
--- a/modules/net-app/net-app-account/tests/e2e/nfs41/main.test.bicep
+++ /dev/null
@@ -1,157 +0,0 @@
-targetScope = 'subscription'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${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 = 'nanaanfs41'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-module testDeployment '../../../main.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- capacityPools: [
- {
- name: '${namePrefix}-${serviceShort}-cp-001'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- serviceLevel: 'Premium'
- size: 4398046511104
- volumes: [
- {
- exportPolicyRules: [
- {
- allowedClients: '0.0.0.0/0'
- nfsv3: false
- nfsv41: true
- ruleIndex: 1
- unixReadOnly: false
- unixReadWrite: true
- }
- ]
- name: '${namePrefix}-${serviceShort}-vol-001'
- protocolTypes: [
- 'NFSv4.1'
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- usageThreshold: 107374182400
- }
- {
- exportPolicyRules: [
- {
- allowedClients: '0.0.0.0/0'
- nfsv3: false
- nfsv41: true
- ruleIndex: 1
- unixReadOnly: false
- unixReadWrite: true
- }
- ]
- name: '${namePrefix}-${serviceShort}-vol-002'
- protocolTypes: [
- 'NFSv4.1'
- ]
- subnetResourceId: nestedDependencies.outputs.subnetResourceId
- usageThreshold: 107374182400
- }
- ]
- }
- {
- name: '${namePrefix}-${serviceShort}-cp-002'
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Reader'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- serviceLevel: 'Premium'
- size: 4398046511104
- volumes: []
- }
- ]
- roleAssignments: [
- {
- roleDefinitionIdOrName: 'Owner'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- {
- roleDefinitionIdOrName: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
- principalId: nestedDependencies.outputs.managedIdentityPrincipalId
- principalType: 'ServicePrincipal'
- }
- ]
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Contact: 'test.user@testcompany.com'
- CostCenter: '7890'
- Environment: 'Non-Prod'
- PurchaseOrder: '1234'
- Role: 'DeploymentValidation'
- ServiceName: 'DeploymentValidation'
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- }
-}
diff --git a/modules/net-app/net-app-account/version.json b/modules/net-app/net-app-account/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/net-app/net-app-account/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/network/application-gateway-web-application-firewall-policy/README.md b/modules/network/application-gateway-web-application-firewall-policy/README.md
index 096047b5f3..0ffbd5f044 100644
--- a/modules/network/application-gateway-web-application-firewall-policy/README.md
+++ b/modules/network/application-gateway-web-application-firewall-policy/README.md
@@ -1,320 +1,7 @@
-# Application Gateway Web Application Firewall (WAF) Policies `[Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies]`
+
-
-
-
-### Example 2: _WAF-aligned_
-
-This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
-
-
-
-
-
-
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`name`](#parameter-name) | string | Name of the Application Gateway WAF policy. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`customRules`](#parameter-customrules) | array | The custom rules inside the policy. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`location`](#parameter-location) | string | Location for all resources. |
-| [`managedRules`](#parameter-managedrules) | object | Describes the managedRules structure. |
-| [`policySettings`](#parameter-policysettings) | object | The PolicySettings for policy. |
-| [`tags`](#parameter-tags) | object | Resource tags. |
-
-### Parameter: `name`
-
-Name of the Application Gateway WAF policy.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `customRules`
-
-The custom rules inside the policy.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `location`
-
-Location for all resources.
-
-- Required: No
-- Type: string
-- Default: `[resourceGroup().location]`
-
-### Parameter: `managedRules`
-
-Describes the managedRules structure.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `policySettings`
-
-The PolicySettings for policy.
-
-- Required: No
-- Type: object
-- Default: `{}`
-
-### Parameter: `tags`
-
-Resource tags.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `location` | string | The location the resource was deployed into. |
-| `name` | string | The name of the application gateway WAF policy. |
-| `resourceGroupName` | string | The resource group the application gateway WAF policy was deployed into. |
-| `resourceId` | string | The resource ID of the application gateway WAF policy. |
-
-## Cross-referenced modules
-
-_None_
+For more information about this transition, see the notice, [here](https://github.com/Azure/ResourceModules?tab=readme-ov-file#%EF%B8%8F-CARML---AVM-transition-%EF%B8%8F).
diff --git a/modules/network/application-gateway-web-application-firewall-policy/main.bicep b/modules/network/application-gateway-web-application-firewall-policy/main.bicep
deleted file mode 100644
index d59777c07c..0000000000
--- a/modules/network/application-gateway-web-application-firewall-policy/main.bicep
+++ /dev/null
@@ -1,59 +0,0 @@
-metadata name = 'Application Gateway Web Application Firewall (WAF) Policies'
-metadata description = 'This module deploys an Application Gateway Web Application Firewall (WAF) Policy.'
-metadata owner = 'Azure/module-maintainers'
-
-@description('Required. Name of the Application Gateway WAF policy.')
-param name string
-
-@description('Optional. Location for all resources.')
-param location string = resourceGroup().location
-
-@description('Optional. Resource tags.')
-param tags object?
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. Describes the managedRules structure.')
-param managedRules object = {}
-
-@description('Optional. The custom rules inside the policy.')
-param customRules array = []
-
-@description('Optional. The PolicySettings for policy.')
-param policySettings object = {}
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource applicationGatewayWAFPolicy 'Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies@2022-11-01' = {
- name: name
- location: location
- tags: tags
- properties: {
- managedRules: managedRules
- customRules: customRules
- policySettings: policySettings
- }
-}
-
-@description('The name of the application gateway WAF policy.')
-output name string = applicationGatewayWAFPolicy.name
-
-@description('The resource ID of the application gateway WAF policy.')
-output resourceId string = applicationGatewayWAFPolicy.id
-
-@description('The resource group the application gateway WAF policy was deployed into.')
-output resourceGroupName string = resourceGroup().name
-
-@description('The location the resource was deployed into.')
-output location string = applicationGatewayWAFPolicy.location
diff --git a/modules/network/application-gateway-web-application-firewall-policy/main.json b/modules/network/application-gateway-web-application-firewall-policy/main.json
deleted file mode 100644
index 3d860d9883..0000000000
--- a/modules/network/application-gateway-web-application-firewall-policy/main.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.23.1.45101",
- "templateHash": "2444407542563544390"
- },
- "name": "Application Gateway Web Application Firewall (WAF) Policies",
- "description": "This module deploys an Application Gateway Web Application Firewall (WAF) Policy.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. Name of the Application Gateway WAF policy."
- }
- },
- "location": {
- "type": "string",
- "defaultValue": "[resourceGroup().location]",
- "metadata": {
- "description": "Optional. Location for all resources."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Resource tags."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- },
- "managedRules": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. Describes the managedRules structure."
- }
- },
- "customRules": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The custom rules inside the policy."
- }
- },
- "policySettings": {
- "type": "object",
- "defaultValue": {},
- "metadata": {
- "description": "Optional. The PolicySettings for policy."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name, parameters('location')))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "applicationGatewayWAFPolicy": {
- "type": "Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies",
- "apiVersion": "2022-11-01",
- "name": "[parameters('name')]",
- "location": "[parameters('location')]",
- "tags": "[parameters('tags')]",
- "properties": {
- "managedRules": "[parameters('managedRules')]",
- "customRules": "[parameters('customRules')]",
- "policySettings": "[parameters('policySettings')]"
- }
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the application gateway WAF policy."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the application gateway WAF policy."
- },
- "value": "[resourceId('Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies', parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The resource group the application gateway WAF policy was deployed into."
- },
- "value": "[resourceGroup().name]"
- },
- "location": {
- "type": "string",
- "metadata": {
- "description": "The location the resource was deployed into."
- },
- "value": "[reference('applicationGatewayWAFPolicy', '2022-11-01', 'full').location]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/network/application-gateway-web-application-firewall-policy/tests/e2e/max/main.test.bicep b/modules/network/application-gateway-web-application-firewall-policy/tests/e2e/max/main.test.bicep
deleted file mode 100644
index 6d6e62eff2..0000000000
--- a/modules/network/application-gateway-web-application-firewall-policy/tests/e2e/max/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'Using large parameter set'
-metadata description = 'This instance deploys the module with most of its features enabled.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-network.applicationGatewayWebApplicationFirewallPolicies-${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 = 'nagwafpmax'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policySettings: {
- fileUploadLimitInMb: 10
- state: 'Enabled'
- mode: 'Prevention'
- }
- managedRules: {
- managedRuleSets: [
- {
- ruleSetType: 'OWASP'
- ruleSetVersion: '3.2'
- ruleGroupOverrides: []
- }
- {
- ruleSetType: 'Microsoft_BotManagerRuleSet'
- ruleSetVersion: '0.1'
- ruleGroupOverrides: []
- }
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/network/application-gateway-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep b/modules/network/application-gateway-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index 5ef5d817c3..0000000000
--- a/modules/network/application-gateway-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,73 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-network.applicationGatewayWebApplicationFirewallPolicies-${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 = 'nagwafpwaf'
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
- name: resourceGroupName
- location: location
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- policySettings: {
- fileUploadLimitInMb: 10
- state: 'Enabled'
- mode: 'Prevention'
- }
- managedRules: {
- managedRuleSets: [
- {
- ruleSetType: 'OWASP'
- ruleSetVersion: '3.2'
- ruleGroupOverrides: []
- }
- {
- ruleSetType: 'Microsoft_BotManagerRuleSet'
- ruleSetVersion: '0.1'
- ruleGroupOverrides: []
- }
- ]
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- Environment: 'Non-Prod'
- Role: 'DeploymentValidation'
- }
- }
-}]
diff --git a/modules/network/application-gateway-web-application-firewall-policy/version.json b/modules/network/application-gateway-web-application-firewall-policy/version.json
deleted file mode 100644
index 04a0dd1a80..0000000000
--- a/modules/network/application-gateway-web-application-firewall-policy/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.5",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/network/application-gateway/README.md b/modules/network/application-gateway/README.md
index 8848ba6a2e..5142c88b61 100644
--- a/modules/network/application-gateway/README.md
+++ b/modules/network/application-gateway/README.md
@@ -1,2871 +1,7 @@
-# Network Application Gateways `[Microsoft.Network/applicationGateways]`
+Parameter JSON format
-
-```json
-"imageReference": {
- "value": {
- "publisher": "MicrosoftWindowsServer",
- "offer": "WindowsServer",
- "sku": "2022-datacenter-azure-edition",
- "version": "latest"
- }
-}
-```
-
-Bicep format
-
-```bicep
-imageReference: {
- publisher: 'MicrosoftWindowsServer'
- offer: 'WindowsServer'
- sku: '2022-datacenter-azure-edition'
- version: 'latest'
-}
-```
-
-Parameter JSON format
-
-```json
-"imageReference": {
- "value": {
- "id": "/subscriptions/12345-6789-1011-1213-15161718/resourceGroups/rg-name/providers/Microsoft.Compute/images/imagename"
- }
-}
-```
-
-Bicep format
-
-```bicep
-imageReference: {
- id: '/subscriptions/12345-6789-1011-1213-15161718/resourceGroups/rg-name/providers/Microsoft.Compute/images/imagename'
-}
-```
-
-Parameter JSON format
-
-```json
-"plan": {
- "value": {
- "name": "qvsa-25",
- "product": "qualys-virtual-scanner",
- "publisher": "qualysguard"
- }
-}
-```
-
-Bicep format
-
-```bicep
-plan: {
- name: 'qvsa-25'
- product: 'qualys-virtual-scanner'
- publisher: 'qualysguard'
-}
-```
-
-Parameter JSON format
-
-```json
-"osDisk": {
- "value": {
- "createOption": "fromImage",
- "deleteOption": "Delete", // Optional. Can be 'Delete' or 'Detach'
- "diskSizeGB": "128",
- "managedDisk": {
- "storageAccountType": "Premium_LRS",
- "diskEncryptionSet": { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
- "id": "/subscriptions/Bicep format
-
-```bicep
-osDisk: {
- createOption: 'fromImage'
- deleteOption: 'Delete' // Optional. Can be 'Delete' or 'Detach'
- diskSizeGB: '128'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- diskEncryptionSet: { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
- id: '/subscriptions/Parameter JSON format
-
-```json
-"dataDisks": {
- "value": [
- {
- "caching": "ReadOnly",
- "createOption": "Empty",
- "deleteOption": "Delete", // Optional. Can be 'Delete' or 'Detach'
- "diskSizeGB": "256",
- "managedDisk": {
- "storageAccountType": "Premium_LRS",
- "diskEncryptionSet": { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
- "id": "/subscriptions/Bicep format
-
-```bicep
-dataDisks: [
- {
- caching: 'ReadOnly'
- createOption: 'Empty'
- deleteOption: 'Delete' // Optional. Can be 'Delete' or 'Detach'
- diskSizeGB: '256'
- managedDisk: {
- storageAccountType: 'Premium_LRS'
- diskEncryptionSet: { // Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.
- id: '/subscriptions/Parameter JSON format
-
-```json
-"nicConfigurations": {
- "value": [
- {
- "nicSuffix": "-nic-01",
- "deleteOption": "Delete", // Optional. Can be 'Delete' or 'Detach'
- "ipConfigurations": [
- {
- "name": "ipconfig1",
- "subnetResourceId": "/subscriptions/Bicep format
-
-```bicep
-nicConfigurations: {
- value: [
- {
- nicSuffix: '-nic-01'
- deleteOption: 'Delete' // Optional. Can be 'Delete' or 'Detach'
- ipConfigurations: [
- {
- name: 'ipconfig1'
- subnetResourceId: '/subscriptions/Parameter JSON format
-
-```json
-"configurationProfileAssignments": {
- "value": [
- "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction",
- "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"
- ]
-}
-```
-
-Bicep format
-
-```bicep
-configurationProfileAssignments: [
- '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction'
- '/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest'
-]
-```
-
-Parameter JSON format
-
-```json
-"extensionDomainJoinConfig": {
- "value": {
- "enabled": true,
- "settings": {
- "name": "contoso.com",
- "user": "test.user@testcompany.com",
- "ouPath": "OU=testOU; DC=contoso; DC=com",
- "restart": true,
- "options": 3
- }
- }
-},
-"extensionDomainJoinPassword": {
- "reference": {
- "keyVault": {
- "id": "/subscriptions/<Bicep format
-
-```bicep
-extensionDomainJoinConfig: {
- enabled: true
- settings: {
- name: 'contoso.com'
- user: 'test.user@testcompany.com'
- ouPath: 'OU=testOU; DC=contoso; DC=com'
- restart: true
- options: 3
- }
-}
-
-resource kv1 'Microsoft.KeyVault/vaults@2019-09-01' existing = {
- name: 'adp-[[namePrefix]]-az-kv-x-001'
- scope: resourceGroup('[[subscriptionId]]','validation-rg')
-}
-
-extensionDomainJoinPassword: kv1.getSecret('domainJoinUser02-Password')
-```
-
-Parameter JSON format
-
-```json
-"extensionAntiMalwareConfig": {
- "value": {
- "enabled": true,
- "settings": {
- "AntimalwareEnabled": true,
- "Exclusions": {
- "Extensions": ".log;.ldf",
- "Paths": "D:\\IISlogs;D:\\DatabaseLogs",
- "Processes": "mssence.svc"
- },
- "RealtimeProtectionEnabled": true,
- "ScheduledScanSettings": {
- "isEnabled": "true",
- "scanType": "Quick",
- "day": "7",
- "time": "120"
- }
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionAntiMalwareConfig: {
- enabled: true
- settings: {
- AntimalwareEnabled: true
- Exclusions: {
- Extensions: '.log;.ldf'
- Paths: 'D:\\IISlogs;D:\\DatabaseLogs'
- Processes: 'mssence.svc'
- }
- RealtimeProtectionEnabled: true
- ScheduledScanSettings: {
- isEnabled: 'true'
- scanType: 'Quick'
- day: '7'
- time: '120'
- }
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"extensionAzureDiskEncryptionConfig": {
- // Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.
- "value": {
- "enabled": true,
- "settings": {
- "EncryptionOperation": "EnableEncryption",
- "KeyVaultURL": "https://mykeyvault.vault.azure.net/",
- "KeyVaultResourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001",
- "KeyEncryptionKeyURL": "https://mykeyvault.vault.azure.net/keys/keyEncryptionKey/bc3bb46d95c64367975d722f473eeae5", // ID must be updated for new keys
- "KekVaultResourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001",
- "KeyEncryptionAlgorithm": "RSA-OAEP", //'RSA-OAEP'/'RSA-OAEP-256'/'RSA1_5'
- "VolumeType": "All", //'OS'/'Data'/'All'
- "ResizeOSDisk": "false"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionAzureDiskEncryptionConfig: {
- // Restrictions: Cannot be enabled on disks that have encryption at host enabled. Managed disks encrypted using Azure Disk Encryption cannot be encrypted using customer-managed keys.
- enabled: true
- settings: {
- EncryptionOperation: 'EnableEncryption'
- KeyVaultURL: 'https://mykeyvault.vault.azure.net/'
- KeyVaultResourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001'
- KeyEncryptionKeyURL: 'https://mykeyvault.vault.azure.net/keys/keyEncryptionKey/bc3bb46d95c64367975d722f473eeae5' // ID must be updated for new keys
- KekVaultResourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-sxx-az-kv-x-001'
- KeyEncryptionAlgorithm: 'RSA-OAEP' //'RSA-OAEP'/'RSA-OAEP-256'/'RSA1_5'
- VolumeType: 'All' //'OS'/'Data'/'All'
- ResizeOSDisk: 'false'
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"extensionDSCConfig": {
- "value": {
- {
- "enabled": true,
- "settings": {
- "wmfVersion": "latest",
- "configuration": {
- "url": "http://validURLToConfigLocation",
- "script": "ConfigurationScript.ps1",
- "function": "ConfigurationFunction"
- },
- "configurationArguments": {
- "argument1": "Value1",
- "argument2": "Value2"
- },
- "configurationData": {
- "url": "https://foo.psd1"
- },
- "privacy": {
- "dataCollection": "enable"
- },
- "advancedOptions": {
- "forcePullAndApply": false,
- "downloadMappings": {
- "specificDependencyKey": "https://myCustomDependencyLocation"
- }
- }
- },
- "protectedSettings": {
- "configurationArguments": {
- "mySecret": "MyPlaceholder"
- },
- "configurationUrlSasToken": "MyPlaceholder",
- "configurationDataUrlSasToken": "MyPlaceholder"
- }
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionDSCConfig: {
- {
- enabled: true
- settings: {
- wmfVersion: 'latest'
- configuration: {
- url: 'http://validURLToConfigLocation'
- script: 'ConfigurationScript.ps1'
- function: 'ConfigurationFunction'
- }
- configurationArguments: {
- argument1: 'Value1'
- argument2: 'Value2'
- }
- configurationData: {
- url: 'https://foo.psd1'
- }
- privacy: {
- dataCollection: 'enable'
- }
- advancedOptions: {
- forcePullAndApply: false
- downloadMappings: {
- specificDependencyKey: 'https://myCustomDependencyLocation'
- }
- }
- }
- protectedSettings: {
- configurationArguments: {
- mySecret: 'MyPlaceholder'
- }
- configurationUrlSasToken: 'MyPlaceholder'
- configurationDataUrlSasToken: 'MyPlaceholder'
- }
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"extensionCustomScriptConfig": {
- "value": {
- "enabled": true,
- "fileData": [
- //storage accounts with SAS token requirement
- {
- "uri": "https://mystorageaccount.blob.core.windows.net/avdscripts/File1.ps1",
- "storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName"
- },
- {
- "uri": "https://mystorageaccount.blob.core.windows.net/avdscripts/File2.ps1",
- "storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName"
- },
- //storage account with public container (no SAS token is required) OR other public URL (not a storage account)
- {
- "uri": "https://github.com/myProject/File3.ps1",
- "storageAccountId": ""
- }
- ],
- "settings": {
- "commandToExecute": "powershell -ExecutionPolicy Unrestricted -File testscript.ps1"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-extensionCustomScriptConfig: {
- enabled: true
- fileData: [
- //storage accounts with SAS token requirement
- {
- uri: 'https://mystorageaccount.blob.core.windows.net/avdscripts/File1.ps1'
- storageAccountId: '/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName'
- }
- {
- uri: 'https://mystorageaccount.blob.core.windows.net/avdscripts/File2.ps1'
- storageAccountId: '/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rgName/providers/Microsoft.Storage/storageAccounts/storageAccountName'
- }
- //storage account with public container (no SAS token is required) OR other public URL (not a storage account)
- {
- uri: 'https://github.com/myProject/File3.ps1'
- storageAccountId: ''
- }
- ]
- settings: {
- commandToExecute: 'powershell -ExecutionPolicy Unrestricted -File testscript.ps1'
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"extensionCustomScriptProtectedSetting": {
- "value": [
- {
- "commandToExecute": "mycommandToRun -someParam MYSECRET"
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-extensionCustomScriptProtectedSetting: [
- {
- commandToExecute: 'mycommandToRun -someParam MYSECRET'
- }
-]
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a Consumption Budget for Subscriptions.
+**This module has been evolved into the following AVM module: [avm/res/consumption/budget](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/consumption/budget).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/consumption/budget).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Consumption/budgets` | [2021-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Consumption/2021-10-01/budgets) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/consumption.budget:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module budget 'br:bicep/modules/consumption.budget:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-cbmin'
- params: {
- // Required parameters
- amount: 500
- name: 'cbmin001'
- // Non-required parameters
- contactEmails: [
- 'dummy@contoso.com'
- ]
- enableDefaultTelemetry: '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
- "amount": {
- "value": 500
- },
- "name": {
- "value": "cbmin001"
- },
- // Non-required parameters
- "contactEmails": {
- "value": [
- "dummy@contoso.com"
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module budget 'br:bicep/modules/consumption.budget:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-cbmax'
- params: {
- // Required parameters
- amount: 500
- name: 'cbmax001'
- // Non-required parameters
- contactEmails: [
- 'dummy@contoso.com'
- ]
- enableDefaultTelemetry: '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
- "amount": {
- "value": 500
- },
- "name": {
- "value": "cbmax001"
- },
- // Non-required parameters
- "contactEmails": {
- "value": [
- "dummy@contoso.com"
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module budget 'br:bicep/modules/consumption.budget:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-cbwaf'
- params: {
- // Required parameters
- amount: 500
- name: 'cbwaf001'
- // Non-required parameters
- contactEmails: [
- 'dummy@contoso.com'
- ]
- enableDefaultTelemetry: '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
- "amount": {
- "value": 500
- },
- "name": {
- "value": "cbwaf001"
- },
- // Non-required parameters
- "contactEmails": {
- "value": [
- "dummy@contoso.com"
- ]
- },
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Container Instance Container Group.
+**This module has been evolved into the following AVM module: [avm/res/container-instance/container-group](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/container-instance/container-group).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/container-instance/container-group).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.ContainerInstance/containerGroups` | [2022-09-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerInstance/2022-09-01/containerGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/container-instance.container-group:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [Private](#example-4-private)
-- [WAF-aligned](#example-5-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module containerGroup 'br:bicep/modules/container-instance.container-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cicgmin'
- params: {
- // Required parameters
- containers: [
- {
- name: 'az-aci-x-001'
- properties: {
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- name: 'cicgmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "containers": {
- "value": [
- {
- "name": "az-aci-x-001",
- "properties": {
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "443",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- }
- ]
- },
- "name": {
- "value": "cicgmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module containerGroup 'br:bicep/modules/container-instance.container-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cicgenc'
- params: {
- // Required parameters
- containers: [
- {
- name: 'az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- {
- name: 'az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- name: 'cicgenc001'
- // Non-required parameters
- customerManagedKey: {
- keyName: '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
- "containers": {
- "value": [
- {
- "name": "az-aci-x-001",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "80",
- "protocol": "Tcp"
- },
- {
- "port": "443",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- },
- {
- "name": "az-aci-x-002",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "8080",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- }
- ]
- },
- "name": {
- "value": "cicgenc001"
- },
- // Non-required parameters
- "customerManagedKey": {
- "value": {
- "keyName": "via Bicep module
-
-```bicep
-module containerGroup 'br:bicep/modules/container-instance.container-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cicgmax'
- params: {
- // Required parameters
- containers: [
- {
- name: 'az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- {
- name: 'az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- name: 'cicgmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "containers": {
- "value": [
- {
- "name": "az-aci-x-001",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "80",
- "protocol": "Tcp"
- },
- {
- "port": "443",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- },
- {
- "name": "az-aci-x-002",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "8080",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- }
- ]
- },
- "name": {
- "value": "cicgmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module containerGroup 'br:bicep/modules/container-instance.container-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cicgprivate'
- params: {
- // Required parameters
- containers: [
- {
- name: 'az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 4
- }
- }
- volumeMounts: [
- {
- mountPath: '/mnt/empty'
- name: 'my-name'
- }
- ]
- }
- }
- {
- name: 'az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- name: 'cicgprivate001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "containers": {
- "value": [
- {
- "name": "az-aci-x-001",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "80",
- "protocol": "Tcp"
- },
- {
- "port": "443",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 4
- }
- },
- "volumeMounts": [
- {
- "mountPath": "/mnt/empty",
- "name": "my-name"
- }
- ]
- }
- },
- {
- "name": "az-aci-x-002",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "8080",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- }
- ]
- },
- "name": {
- "value": "cicgprivate001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module containerGroup 'br:bicep/modules/container-instance.container-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-cicgwaf'
- params: {
- // Required parameters
- containers: [
- {
- name: 'az-aci-x-001'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '80'
- protocol: 'Tcp'
- }
- {
- port: '443'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- {
- name: 'az-aci-x-002'
- properties: {
- command: []
- environmentVariables: []
- image: 'mcr.microsoft.com/azuredocs/aci-helloworld'
- ports: [
- {
- port: '8080'
- protocol: 'Tcp'
- }
- ]
- resources: {
- requests: {
- cpu: 2
- memoryInGB: 2
- }
- }
- }
- }
- ]
- name: 'cicgwaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "containers": {
- "value": [
- {
- "name": "az-aci-x-001",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "80",
- "protocol": "Tcp"
- },
- {
- "port": "443",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- },
- {
- "name": "az-aci-x-002",
- "properties": {
- "command": [],
- "environmentVariables": [],
- "image": "mcr.microsoft.com/azuredocs/aci-helloworld",
- "ports": [
- {
- "port": "8080",
- "protocol": "Tcp"
- }
- ],
- "resources": {
- "requests": {
- "cpu": 2,
- "memoryInGB": 2
- }
- }
- }
- }
- ]
- },
- "name": {
- "value": "cicgwaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "Parameter JSON format
-
-```json
-"imageRegistryCredentials": {
- "value": [
- {
- "server": "sxxazacrx001.azurecr.io",
- "username": "sxxazacrx001"
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-imageRegistryCredentials: [
- {
- server: 'sxxazacrx001.azurecr.io'
- username: 'sxxazacrx001'
- }
-]
-```
-
-Parameter JSON format
-
-```json
-"autoGeneratedDomainNameLabelScope": {
- "value": "Unsecure"
- },
-```
-
-Bicep format
-
-```bicep
-autoGeneratedDomainNameLabelScope: 'Unsecure'
-```
-
-Parameter JSON format
-
-```json
-"volumes": [
- {
- "azureFile": {
- "readOnly": "bool",
- "shareName": "string",
- "storageAccountKey": "string",
- "storageAccountName": "string"
- },
- "emptyDir": {},
- "gitRepo": {
- "directory": "string",
- "repository": "string",
- "revision": "string"
- },
- "name": "string",
- "secret": {}
- }
- ]
-```
-
-Bicep format
-
-```bicep
-volumes: [
- {
- azureFile: {
- readOnly: bool
- shareName: 'string'
- storageAccountKey: 'string'
- storageAccountName: 'string'
- }
- emptyDir: any()
- gitRepo: {
- directory: 'string'
- repository: 'string'
- revision: 'string'
- }
- name: 'string'
- secret: {}
- }
- ]
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys an Azure Container Registry (ACR).
+**This module has been evolved into the following AVM module: [avm/res/container-registry/registry](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/container-registry/registry).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/container-registry/registry).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.ContainerRegistry/registries` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries) |
-| `Microsoft.ContainerRegistry/registries/cacheRules` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries/cacheRules) |
-| `Microsoft.ContainerRegistry/registries/replications` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries/replications) |
-| `Microsoft.ContainerRegistry/registries/webhooks` | [2023-06-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerRegistry/registries/webhooks) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/container-registry.registry:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [Pe](#example-4-pe)
-- [WAF-aligned](#example-5-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module registry 'br:bicep/modules/container-registry.registry:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crrmin'
- params: {
- // Required parameters
- name: 'crrmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "crrmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module registry 'br:bicep/modules/container-registry.registry:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crrencr'
- params: {
- // Required parameters
- name: 'crrencr001'
- // Non-required parameters
- acrSku: 'Premium'
- customerManagedKey: {
- keyName: '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": "crrencr001"
- },
- // Non-required parameters
- "acrSku": {
- "value": "Premium"
- },
- "customerManagedKey": {
- "value": {
- "keyName": "via Bicep module
-
-```bicep
-module registry 'br:bicep/modules/container-registry.registry:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crrmax'
- params: {
- // Required parameters
- name: 'crrmax001'
- // Non-required parameters
- acrAdminUserEnabled: false
- acrSku: 'Premium'
- azureADAuthenticationAsArmPolicyStatus: 'enabled'
- cacheRules: [
- {
- name: 'customRule'
- sourceRepository: 'docker.io/library/hello-world'
- targetRepository: 'cached-docker-hub/hello-world'
- }
- {
- sourceRepository: 'docker.io/library/hello-world'
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "crrmax001"
- },
- // Non-required parameters
- "acrAdminUserEnabled": {
- "value": false
- },
- "acrSku": {
- "value": "Premium"
- },
- "azureADAuthenticationAsArmPolicyStatus": {
- "value": "enabled"
- },
- "cacheRules": {
- "value": [
- {
- "name": "customRule",
- "sourceRepository": "docker.io/library/hello-world",
- "targetRepository": "cached-docker-hub/hello-world"
- },
- {
- "sourceRepository": "docker.io/library/hello-world"
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module registry 'br:bicep/modules/container-registry.registry:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crrpe'
- params: {
- // Required parameters
- name: 'crrpe001'
- // Non-required parameters
- acrSku: 'Premium'
- enableDefaultTelemetry: '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": "crrpe001"
- },
- // Non-required parameters
- "acrSku": {
- "value": "Premium"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module registry 'br:bicep/modules/container-registry.registry:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-crrwaf'
- params: {
- // Required parameters
- name: 'crrwaf001'
- // Non-required parameters
- acrAdminUserEnabled: false
- acrSku: 'Premium'
- azureADAuthenticationAsArmPolicyStatus: 'enabled'
- cacheRules: [
- {
- name: 'customRule'
- sourceRepository: 'docker.io/library/hello-world'
- targetRepository: 'cached-docker-hub/hello-world'
- }
- {
- sourceRepository: 'docker.io/library/hello-world'
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "crrwaf001"
- },
- // Non-required parameters
- "acrAdminUserEnabled": {
- "value": false
- },
- "acrSku": {
- "value": "Premium"
- },
- "azureADAuthenticationAsArmPolicyStatus": {
- "value": "enabled"
- },
- "cacheRules": {
- "value": [
- {
- "name": "customRule",
- "sourceRepository": "docker.io/library/hello-world",
- "targetRepository": "cached-docker-hub/hello-world"
- },
- {
- "sourceRepository": "docker.io/library/hello-world"
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Kubernetes Service (AKS) Managed Cluster.
+**This module has been evolved into the following AVM module: [avm/res/container-service/managed-cluster](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/container-service/managed-cluster).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/container-service/managed-cluster).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.ContainerService/managedClusters` | [2023-07-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-07-02-preview/managedClusters) |
-| `Microsoft.ContainerService/managedClusters/agentPools` | [2023-07-02-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ContainerService/2023-07-02-preview/managedClusters/agentPools) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.KubernetesConfiguration/extensions` | [2022-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/2022-03-01/extensions) |
-| `Microsoft.KubernetesConfiguration/fluxConfigurations` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/fluxConfigurations) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/container-service.managed-cluster:1.0.0`.
-
-- [Azure](#example-1-azure)
-- [Using only defaults](#example-2-using-only-defaults)
-- [Kubenet](#example-3-kubenet)
-- [Priv](#example-4-priv)
-
-### Example 1: _Azure_
-
-via Bicep module
-
-```bicep
-module managedCluster 'br:bicep/modules/container-service.managed-cluster:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csmaz'
- params: {
- // Required parameters
- name: 'csmaz001'
- primaryAgentPoolProfile: [
- {
- availabilityZones: [
- '3'
- ]
- count: 1
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- mode: 'System'
- name: 'systempool'
- osDiskSizeGB: 0
- osType: 'Linux'
- serviceCidr: ''
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: '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": "csmaz001"
- },
- "primaryAgentPoolProfile": {
- "value": [
- {
- "availabilityZones": [
- "3"
- ],
- "count": 1,
- "enableAutoScaling": true,
- "maxCount": 3,
- "maxPods": 30,
- "minCount": 1,
- "mode": "System",
- "name": "systempool",
- "osDiskSizeGB": 0,
- "osType": "Linux",
- "serviceCidr": "",
- "storageProfile": "ManagedDisks",
- "type": "VirtualMachineScaleSets",
- "vmSize": "Standard_DS2_v2",
- "vnetSubnetID": "via Bicep module
-
-```bicep
-module managedCluster 'br:bicep/modules/container-service.managed-cluster:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csmmin'
- params: {
- // Required parameters
- name: 'csmmin001'
- primaryAgentPoolProfile: [
- {
- count: 1
- mode: 'System'
- name: 'systempool'
- vmSize: 'Standard_DS2_v2'
- }
- ]
- // Non-required parameters
- enableDefaultTelemetry: '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": "csmmin001"
- },
- "primaryAgentPoolProfile": {
- "value": [
- {
- "count": 1,
- "mode": "System",
- "name": "systempool",
- "vmSize": "Standard_DS2_v2"
- }
- ]
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module managedCluster 'br:bicep/modules/container-service.managed-cluster:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csmkube'
- params: {
- // Required parameters
- name: 'csmkube001'
- primaryAgentPoolProfile: [
- {
- availabilityZones: [
- '3'
- ]
- count: 1
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- mode: 'System'
- name: 'systempool'
- osDiskSizeGB: 0
- osType: 'Linux'
- serviceCidr: ''
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- ]
- // Non-required parameters
- agentPools: [
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool1'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- {
- availabilityZones: [
- '3'
- ]
- count: 2
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- minPods: 2
- mode: 'User'
- name: 'userpool2'
- nodeLabels: {}
- nodeTaints: [
- 'CriticalAddonsOnly=true:NoSchedule'
- ]
- osDiskSizeGB: 128
- osType: 'Linux'
- scaleSetEvictionPolicy: 'Delete'
- scaleSetPriority: 'Regular'
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "csmkube001"
- },
- "primaryAgentPoolProfile": {
- "value": [
- {
- "availabilityZones": [
- "3"
- ],
- "count": 1,
- "enableAutoScaling": true,
- "maxCount": 3,
- "maxPods": 30,
- "minCount": 1,
- "mode": "System",
- "name": "systempool",
- "osDiskSizeGB": 0,
- "osType": "Linux",
- "serviceCidr": "",
- "storageProfile": "ManagedDisks",
- "type": "VirtualMachineScaleSets",
- "vmSize": "Standard_DS2_v2"
- }
- ]
- },
- // Non-required parameters
- "agentPools": {
- "value": [
- {
- "availabilityZones": [
- "3"
- ],
- "count": 2,
- "enableAutoScaling": true,
- "maxCount": 3,
- "maxPods": 30,
- "minCount": 1,
- "minPods": 2,
- "mode": "User",
- "name": "userpool1",
- "nodeLabels": {},
- "nodeTaints": [
- "CriticalAddonsOnly=true:NoSchedule"
- ],
- "osDiskSizeGB": 128,
- "osType": "Linux",
- "scaleSetEvictionPolicy": "Delete",
- "scaleSetPriority": "Regular",
- "storageProfile": "ManagedDisks",
- "type": "VirtualMachineScaleSets",
- "vmSize": "Standard_DS2_v2"
- },
- {
- "availabilityZones": [
- "3"
- ],
- "count": 2,
- "enableAutoScaling": true,
- "maxCount": 3,
- "maxPods": 30,
- "minCount": 1,
- "minPods": 2,
- "mode": "User",
- "name": "userpool2",
- "nodeLabels": {},
- "nodeTaints": [
- "CriticalAddonsOnly=true:NoSchedule"
- ],
- "osDiskSizeGB": 128,
- "osType": "Linux",
- "scaleSetEvictionPolicy": "Delete",
- "scaleSetPriority": "Regular",
- "storageProfile": "ManagedDisks",
- "type": "VirtualMachineScaleSets",
- "vmSize": "Standard_DS2_v2"
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module managedCluster 'br:bicep/modules/container-service.managed-cluster:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-csmpriv'
- params: {
- // Required parameters
- name: 'csmpriv001'
- primaryAgentPoolProfile: [
- {
- availabilityZones: [
- '3'
- ]
- count: 1
- enableAutoScaling: true
- maxCount: 3
- maxPods: 30
- minCount: 1
- mode: 'System'
- name: 'systempool'
- osDiskSizeGB: 0
- osType: 'Linux'
- serviceCidr: ''
- storageProfile: 'ManagedDisks'
- type: 'VirtualMachineScaleSets'
- vmSize: 'Standard_DS2_v2'
- vnetSubnetID: '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": "csmpriv001"
- },
- "primaryAgentPoolProfile": {
- "value": [
- {
- "availabilityZones": [
- "3"
- ],
- "count": 1,
- "enableAutoScaling": true,
- "maxCount": 3,
- "maxPods": 30,
- "minCount": 1,
- "mode": "System",
- "name": "systempool",
- "osDiskSizeGB": 0,
- "osType": "Linux",
- "serviceCidr": "",
- "storageProfile": "ManagedDisks",
- "type": "VirtualMachineScaleSets",
- "vmSize": "Standard_DS2_v2",
- "vnetSubnetID": "Parameter JSON format
-
-```json
-"httpProxyConfig": {
- "value": {
- "httpProxy": "http://proxy.contoso.com:8080/",
- "httpsProxy": "http://proxy.contoso.com:8080/",
- "noProxy": [
- "10.0.0.0/8",
- "127.0.0.1",
- "168.63.129.16",
- "169.254.169.254",
- "azurecr.io",
- "konnectivity",
- "localhost"
- ]
- }
-}
-```
-
-Bicep format
-
-```bicep
-httpProxyConfig: {
- httpProxy: 'http://proxy.contoso.com:8080/'
- httpsProxy: 'http://proxy.contoso.com:8080/'
- noProxy: [
- '10.0.0.0/8'
- '127.0.0.1'
- '168.63.129.16'
- '169.254.169.254'
- 'azurecr.io'
- 'konnectivity'
- 'localhost'
- ]
-}
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a Data Factory.
+**This module has been evolved into the following AVM module: [avm/res/data-factory/factory](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/data-factory/factory).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/data-factory/factory).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DataFactory/factories` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories) |
-| `Microsoft.DataFactory/factories/integrationRuntimes` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/integrationRuntimes) |
-| `Microsoft.DataFactory/factories/managedVirtualNetworks` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/managedVirtualNetworks) |
-| `Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints` | [2018-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataFactory/2018-06-01/factories/managedVirtualNetworks/managedPrivateEndpoints) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/data-factory.factory:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module factory 'br:bicep/modules/data-factory.factory:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dffmin'
- params: {
- // Required parameters
- name: 'dffmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dffmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module factory 'br:bicep/modules/data-factory.factory:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dffmax'
- params: {
- // Required parameters
- name: 'dffmax001'
- // Non-required parameters
- customerManagedKey: {
- keyName: '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": "dffmax001"
- },
- // Non-required parameters
- "customerManagedKey": {
- "value": {
- "keyName": "via Bicep module
-
-```bicep
-module factory 'br:bicep/modules/data-factory.factory:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dffwaf'
- params: {
- // Required parameters
- name: 'dffwaf001'
- // Non-required parameters
- customerManagedKey: {
- keyName: '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": "dffwaf001"
- },
- // Non-required parameters
- "customerManagedKey": {
- "value": {
- "keyName": "Parameter JSON format
-
-```json
-"managedPrivateEndpoints": {
- "value": [
- {
- "name": "mystorageaccount-managed-privateEndpoint", // Required: The managed private endpoint resource name
- "groupId": "blob", // Required: The groupId to which the managed private endpoint is created
- "fqdns": [
- "mystorageaccount.blob.core.windows.net" // Required: Fully qualified domain names
- ],
- "privateLinkResourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/mystorageaccount"
- // Required: The ARM resource ID of the resource to which the managed private endpoint is created.
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-managedPrivateEndpoints: [
- // Example showing all available fields
- {
- name: 'mystorageaccount-managed-privateEndpoint' // Required: The managed private endpoint resource name
- groupId: 'blob' // Required: The groupId to which the managed private endpoint is created
- fqdns: [
- 'mystorageaccount.blob.core.windows.net' // Required: Fully qualified domain names
- ]
- privateLinkResourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/mystorageaccount'
- } // Required: The ARM resource ID of the resource to which the managed private endpoint is created.
-]
-```
-
-Parameter JSON format
-
-```json
-"typeProperties": {
- "value": {
- "computeProperties": {
- "location": "AutoResolve"
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-typeProperties: {
- computeProperties: {
- location: 'AutoResolve'
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"managedPrivateEndpoints": {
- "value": [
- {
- "name": "mystorageaccount-managed-privateEndpoint", // Required: The managed private endpoint resource name
- "groupId": "blob", // Required: The groupId to which the managed private endpoint is created
- "fqdns": [
- "mystorageaccount.blob.core.windows.net" // Required: Fully qualified domain names
- ],
- "privateLinkResourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/mystorageaccount"
- // Required: The ARM resource ID of the resource to which the managed private endpoint is created.
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-managedPrivateEndpoints: [
- // Example showing all available fields
- {
- name: 'mystorageaccount-managed-privateEndpoint' // Required: The managed private endpoint resource name
- groupId: 'blob' // Required: The groupId to which the managed private endpoint is created
- fqdns: [
- 'mystorageaccount.blob.core.windows.net' // Required: Fully qualified domain names
- ]
- privateLinkResourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/mystorageaccount'
- } // Required: The ARM resource ID of the resource to which the managed private endpoint is created.
-]
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a Data Protection Backup Vault.
+**This module has been evolved into the following AVM module: [avm/res/data-protection/backup-vault](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/data-protection/backup-vault).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/data-protection/backup-vault).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DataProtection/backupVaults` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/backupVaults) |
-| `Microsoft.DataProtection/backupVaults/backupPolicies` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/backupVaults/backupPolicies) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/data-protection.backup-vault:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dpbvmin'
- params: {
- // Required parameters
- name: 'dpbvmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dpbvmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dpbvmax'
- params: {
- // Required parameters
- name: 'dpbvmax001'
- // Non-required parameters
- azureMonitorAlertSettingsAlertsForAllJobFailures: 'Disabled'
- backupPolicies: [
- {
- name: 'DefaultPolicy'
- properties: {
- datasourceTypes: [
- 'Microsoft.Compute/disks'
- ]
- objectType: 'BackupPolicy'
- policyRules: [
- {
- backupParameters: {
- backupType: 'Incremental'
- objectType: 'AzureBackupParams'
- }
- dataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- name: 'BackupDaily'
- objectType: 'AzureBackupRule'
- trigger: {
- objectType: 'ScheduleBasedTriggerContext'
- schedule: {
- repeatingTimeIntervals: [
- 'R/2022-05-31T23:30:00+01:00/P1D'
- ]
- timeZone: 'W. Europe Standard Time'
- }
- taggingCriteria: [
- {
- isDefault: true
- taggingPriority: 99
- tagInfo: {
- id: 'Default_'
- tagName: 'Default'
- }
- }
- ]
- }
- }
- {
- isDefault: true
- lifecycles: [
- {
- deleteAfter: {
- duration: 'P7D'
- objectType: 'AbsoluteDeleteOption'
- }
- sourceDataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- targetDataStoreCopySettings: []
- }
- ]
- name: 'Default'
- objectType: 'AzureRetentionRule'
- }
- ]
- }
- }
- ]
- enableDefaultTelemetry: '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": "dpbvmax001"
- },
- // Non-required parameters
- "azureMonitorAlertSettingsAlertsForAllJobFailures": {
- "value": "Disabled"
- },
- "backupPolicies": {
- "value": [
- {
- "name": "DefaultPolicy",
- "properties": {
- "datasourceTypes": [
- "Microsoft.Compute/disks"
- ],
- "objectType": "BackupPolicy",
- "policyRules": [
- {
- "backupParameters": {
- "backupType": "Incremental",
- "objectType": "AzureBackupParams"
- },
- "dataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- },
- "name": "BackupDaily",
- "objectType": "AzureBackupRule",
- "trigger": {
- "objectType": "ScheduleBasedTriggerContext",
- "schedule": {
- "repeatingTimeIntervals": [
- "R/2022-05-31T23:30:00+01:00/P1D"
- ],
- "timeZone": "W. Europe Standard Time"
- },
- "taggingCriteria": [
- {
- "isDefault": true,
- "taggingPriority": 99,
- "tagInfo": {
- "id": "Default_",
- "tagName": "Default"
- }
- }
- ]
- }
- },
- {
- "isDefault": true,
- "lifecycles": [
- {
- "deleteAfter": {
- "duration": "P7D",
- "objectType": "AbsoluteDeleteOption"
- },
- "sourceDataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- },
- "targetDataStoreCopySettings": []
- }
- ],
- "name": "Default",
- "objectType": "AzureRetentionRule"
- }
- ]
- }
- }
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module backupVault 'br:bicep/modules/data-protection.backup-vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dpbvwaf'
- params: {
- // Required parameters
- name: 'dpbvwaf001'
- // Non-required parameters
- azureMonitorAlertSettingsAlertsForAllJobFailures: 'Disabled'
- backupPolicies: [
- {
- name: 'DefaultPolicy'
- properties: {
- datasourceTypes: [
- 'Microsoft.Compute/disks'
- ]
- objectType: 'BackupPolicy'
- policyRules: [
- {
- backupParameters: {
- backupType: 'Incremental'
- objectType: 'AzureBackupParams'
- }
- dataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- name: 'BackupDaily'
- objectType: 'AzureBackupRule'
- trigger: {
- objectType: 'ScheduleBasedTriggerContext'
- schedule: {
- repeatingTimeIntervals: [
- 'R/2022-05-31T23:30:00+01:00/P1D'
- ]
- timeZone: 'W. Europe Standard Time'
- }
- taggingCriteria: [
- {
- isDefault: true
- taggingPriority: 99
- tagInfo: {
- id: 'Default_'
- tagName: 'Default'
- }
- }
- ]
- }
- }
- {
- isDefault: true
- lifecycles: [
- {
- deleteAfter: {
- duration: 'P7D'
- objectType: 'AbsoluteDeleteOption'
- }
- sourceDataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- targetDataStoreCopySettings: []
- }
- ]
- name: 'Default'
- objectType: 'AzureRetentionRule'
- }
- ]
- }
- }
- ]
- enableDefaultTelemetry: '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": "dpbvwaf001"
- },
- // Non-required parameters
- "azureMonitorAlertSettingsAlertsForAllJobFailures": {
- "value": "Disabled"
- },
- "backupPolicies": {
- "value": [
- {
- "name": "DefaultPolicy",
- "properties": {
- "datasourceTypes": [
- "Microsoft.Compute/disks"
- ],
- "objectType": "BackupPolicy",
- "policyRules": [
- {
- "backupParameters": {
- "backupType": "Incremental",
- "objectType": "AzureBackupParams"
- },
- "dataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- },
- "name": "BackupDaily",
- "objectType": "AzureBackupRule",
- "trigger": {
- "objectType": "ScheduleBasedTriggerContext",
- "schedule": {
- "repeatingTimeIntervals": [
- "R/2022-05-31T23:30:00+01:00/P1D"
- ],
- "timeZone": "W. Europe Standard Time"
- },
- "taggingCriteria": [
- {
- "isDefault": true,
- "taggingPriority": 99,
- "tagInfo": {
- "id": "Default_",
- "tagName": "Default"
- }
- }
- ]
- }
- },
- {
- "isDefault": true,
- "lifecycles": [
- {
- "deleteAfter": {
- "duration": "P7D",
- "objectType": "AbsoluteDeleteOption"
- },
- "sourceDataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- },
- "targetDataStoreCopySettings": []
- }
- ],
- "name": "Default",
- "objectType": "AzureRetentionRule"
- }
- ]
- }
- }
- ]
- },
- "enableDefaultTelemetry": {
- "value": "Parameter JSON format
-```json
- "backupPolicies": {
- "value": [
- {
- "name": "DefaultPolicy",
- "properties": {
- "policyRules": [
- {
- "backupParameters": {
- "backupType": "Incremental",
- "objectType": "AzureBackupParams"
- },
- "trigger": {
- "schedule": {
- "repeatingTimeIntervals": [
- "R/2022-05-31T23:30:00+01:00/P1D"
- ],
- "timeZone": "W. Europe Standard Time"
- },
- "taggingCriteria": [
- {
- "tagInfo": {
- "tagName": "Default",
- "id": "Default_"
- },
- "taggingPriority": 99,
- "isDefault": true
- }
- ],
- "objectType": "ScheduleBasedTriggerContext"
- },
- "dataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- },
- "name": "BackupDaily",
- "objectType": "AzureBackupRule"
- },
- {
- "lifecycles": [
- {
- "deleteAfter": {
- "objectType": "AbsoluteDeleteOption",
- "duration": "P7D"
- },
- "targetDataStoreCopySettings": [],
- "sourceDataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- }
- }
- ],
- "isDefault": true,
- "name": "Default",
- "objectType": "AzureRetentionRule"
- }
- ],
- "datasourceTypes": [
- "Microsoft.Compute/disks"
- ],
- "objectType": "BackupPolicy"
- }
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-backupPolicies: [
- {
- name: 'DefaultPolicy'
- properties: {
- policyRules: [
- {
- backupParameters: {
- backupType: 'Incremental'
- objectType: 'AzureBackupParams'
- }
- trigger: {
- schedule: {
- repeatingTimeIntervals: [
- 'R/2022-05-31T23:30:00+01:00/P1D'
- ]
- timeZone: 'W. Europe Standard Time'
- }
- taggingCriteria: [
- {
- tagInfo: {
- tagName: 'Default'
- id: 'Default_'
- }
- taggingPriority: 99
- isDefault: true
- }
- ]
- objectType: 'ScheduleBasedTriggerContext'
- }
- dataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- name: 'BackupDaily'
- objectType: 'AzureBackupRule'
- }
- {
- lifecycles: [
- {
- deleteAfter: {
- objectType: 'AbsoluteDeleteOption'
- duration: 'P7D'
- }
- targetDataStoreCopySettings: []
- sourceDataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- }
- ]
- isDefault: true
- name: 'Default'
- objectType: 'AzureRetentionRule'
- }
- ]
- datasourceTypes: [
- 'Microsoft.Compute/disks'
- ]
- objectType: 'BackupPolicy'
- }
- }
-]
-```
-
-Parameter JSON format
-
-```json
- "properties": {
- "value": {
- "policyRules": [
- {
- "backupParameters": {
- "backupType": "Incremental",
- "objectType": "AzureBackupParams"
- },
- "trigger": {
- "schedule": {
- "repeatingTimeIntervals": [
- "R/2022-05-31T23:30:00+01:00/P1D"
- ],
- "timeZone": "W. Europe Standard Time"
- },
- "taggingCriteria": [
- {
- "tagInfo": {
- "tagName": "Default",
- "id": "Default_"
- },
- "taggingPriority": 99,
- "isDefault": true
- }
- ],
- "objectType": "ScheduleBasedTriggerContext"
- },
- "dataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- },
- "name": "BackupDaily",
- "objectType": "AzureBackupRule"
- },
- {
- "lifecycles": [
- {
- "deleteAfter": {
- "objectType": "AbsoluteDeleteOption",
- "duration": "P7D"
- },
- "targetDataStoreCopySettings": [],
- "sourceDataStore": {
- "dataStoreType": "OperationalStore",
- "objectType": "DataStoreInfoBase"
- }
- }
- ],
- "isDefault": true,
- "name": "Default",
- "objectType": "AzureRetentionRule"
- }
- ],
- "datasourceTypes": [
- "Microsoft.Compute/disks"
- ],
- "objectType": "BackupPolicy"
- }
-}
-```
-
-Bicep format
-
-```bicep
-properties: {
- policyRules: [
- {
- backupParameters: {
- backupType: 'Incremental'
- objectType: 'AzureBackupParams'
- }
- trigger: {
- schedule: {
- repeatingTimeIntervals: [
- 'R/2022-05-31T23:30:00+01:00/P1D'
- ]
- timeZone: 'W. Europe Standard Time'
- }
- taggingCriteria: [
- {
- tagInfo: {
- tagName: 'Default'
- id: 'Default_'
- }
- taggingPriority: 99
- isDefault: true
- }
- ]
- objectType: 'ScheduleBasedTriggerContext'
- }
- dataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- name: 'BackupDaily'
- objectType: 'AzureBackupRule'
- }
- {
- lifecycles: [
- {
- deleteAfter: {
- objectType: 'AbsoluteDeleteOption'
- duration: 'P7D'
- }
- targetDataStoreCopySettings: []
- sourceDataStore: {
- dataStoreType: 'OperationalStore'
- objectType: 'DataStoreInfoBase'
- }
- }
- ]
- isDefault: true
- name: 'Default'
- objectType: 'AzureRetentionRule'
- }
- ]
- datasourceTypes: [
- 'Microsoft.Compute/disks'
- ]
- objectType: 'BackupPolicy'
-}
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys an Azure Databricks Access Connector.
+**This module has been evolved into the following AVM module: [avm/res/databricks/access-connector](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/databricks/access-connector).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/databricks/access-connector).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Databricks/accessConnectors` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Databricks/2022-10-01-preview/accessConnectors) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/databricks.access-connector:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dacmin'
- params: {
- // Required parameters
- name: 'dacmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dacmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dacmax'
- params: {
- // Required parameters
- name: 'dacmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dacmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module accessConnector 'br:bicep/modules/databricks.access-connector:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dacwaf'
- params: {
- // Required parameters
- name: 'dacwaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dacwaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Databricks Workspace.
+**This module has been evolved into the following AVM module: [avm/res/databricks/workspace](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/databricks/workspace).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/databricks/workspace).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Databricks/workspaces` | [2023-02-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Databricks/2023-02-01/workspaces) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/databricks.workspace:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dwmin'
- params: {
- // Required parameters
- name: 'dwmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dwmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dwmax'
- params: {
- // Required parameters
- name: 'dwmax001'
- // Non-required parameters
- amlWorkspaceResourceId: '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": "dwmax001"
- },
- // Non-required parameters
- "amlWorkspaceResourceId": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/databricks.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dwwaf'
- params: {
- // Required parameters
- name: 'dwwaf001'
- // Non-required parameters
- amlWorkspaceResourceId: '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": "dwwaf001"
- },
- // Non-required parameters
- "amlWorkspaceResourceId": {
- "value": "Parameter JSON format
-
-```json
-"parameters": {
- "value": {
- "amlWorkspaceId": {
- "value": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.MachineLearningServices/workspaces/xxx"
- },
- "customVirtualNetworkId": {
- "value": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx"
- },
- "customPublicSubnetName": {
- "value": "xxx"
- },
- "customPrivateSubnetName": {
- "value": "xxx"
- },
- "enableNoPublicIp": {
- "value": true
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-parameters: {
- amlWorkspaceId: {
- value: '/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.MachineLearningServices/workspaces/xxx'
- }
- customVirtualNetworkId: {
- value: '/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/virtualNetworks/xxx'
- }
- customPublicSubnetName: {
- value: 'xxx'
- }
- customPrivateSubnetName: {
- value: 'xxx'
- }
- enableNoPublicIp: {
- value: true
- }
-}
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a DBforMySQL Flexible Server.
+**This module has been evolved into the following AVM module: [avm/res/db-for-my-sql/flexible-server](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/db-for-my-sql/flexible-server).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/db-for-my-sql/flexible-server).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DBforMySQL/flexibleServers` | [2022-09-30-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-09-30-preview/flexibleServers) |
-| `Microsoft.DBforMySQL/flexibleServers/administrators` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-01-01/flexibleServers/administrators) |
-| `Microsoft.DBforMySQL/flexibleServers/databases` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-01-01/flexibleServers/databases) |
-| `Microsoft.DBforMySQL/flexibleServers/firewallRules` | [2022-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforMySQL/2022-01-01/flexibleServers/firewallRules) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/db-for-my-sql.flexible-server:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Private](#example-2-private)
-- [Public](#example-3-public)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dfmsfsmin'
- params: {
- // Required parameters
- name: 'dfmsfsmin001'
- skuName: 'Standard_B1ms'
- tier: 'Burstable'
- // Non-required parameters
- administratorLogin: 'adminUserName'
- administratorLoginPassword: '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": "dfmsfsmin001"
- },
- "skuName": {
- "value": "Standard_B1ms"
- },
- "tier": {
- "value": "Burstable"
- },
- // Non-required parameters
- "administratorLogin": {
- "value": "adminUserName"
- },
- "administratorLoginPassword": {
- "value": "via Bicep module
-
-```bicep
-module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dfmsfspvt'
- params: {
- // Required parameters
- name: 'dfmsfspvt001'
- skuName: 'Standard_D2ds_v4'
- tier: 'GeneralPurpose'
- // Non-required parameters
- administratorLogin: 'adminUserName'
- administratorLoginPassword: '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": "dfmsfspvt001"
- },
- "skuName": {
- "value": "Standard_D2ds_v4"
- },
- "tier": {
- "value": "GeneralPurpose"
- },
- // Non-required parameters
- "administratorLogin": {
- "value": "adminUserName"
- },
- "administratorLoginPassword": {
- "value": "via Bicep module
-
-```bicep
-module flexibleServer 'br:bicep/modules/db-for-my-sql.flexible-server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dfmsfsp'
- params: {
- // Required parameters
- name: 'dfmsfsp001'
- skuName: 'Standard_D2ds_v4'
- tier: 'GeneralPurpose'
- // Non-required parameters
- administratorLogin: 'adminUserName'
- administratorLoginPassword: '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": "dfmsfsp001"
- },
- "skuName": {
- "value": "Standard_D2ds_v4"
- },
- "tier": {
- "value": "GeneralPurpose"
- },
- // Non-required parameters
- "administratorLogin": {
- "value": "adminUserName"
- },
- "administratorLoginPassword": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/db-for-postgre-sql/flexible-server](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/db-for-postgre-sql/flexible-server).**
-This module deploys a DBforPostgreSQL Flexible Server.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/db-for-postgre-sql/flexible-server).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DBforPostgreSQL/flexibleServers` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers) |
-| `Microsoft.DBforPostgreSQL/flexibleServers/administrators` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/administrators) |
-| `Microsoft.DBforPostgreSQL/flexibleServers/configurations` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/configurations) |
-| `Microsoft.DBforPostgreSQL/flexibleServers/databases` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/databases) |
-| `Microsoft.DBforPostgreSQL/flexibleServers/firewallRules` | [2022-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DBforPostgreSQL/2022-12-01/flexibleServers/firewallRules) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/db-for-postgre-sql.flexible-server:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Private](#example-2-private)
-- [Public](#example-3-public)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module flexibleServer 'br:bicep/modules/db-for-postgre-sql.flexible-server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dfpsfsmin'
- params: {
- // Required parameters
- name: 'dfpsfsmin001'
- skuName: 'Standard_B2s'
- tier: 'Burstable'
- // Non-required parameters
- administratorLogin: 'adminUserName'
- administratorLoginPassword: '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": "dfpsfsmin001"
- },
- "skuName": {
- "value": "Standard_B2s"
- },
- "tier": {
- "value": "Burstable"
- },
- // Non-required parameters
- "administratorLogin": {
- "value": "adminUserName"
- },
- "administratorLoginPassword": {
- "value": "via Bicep module
-
-```bicep
-module flexibleServer 'br:bicep/modules/db-for-postgre-sql.flexible-server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dfpsfspvt'
- params: {
- // Required parameters
- name: 'dfpsfspvt001'
- skuName: 'Standard_D2s_v3'
- tier: 'GeneralPurpose'
- // Non-required parameters
- administratorLogin: 'adminUserName'
- administratorLoginPassword: '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": "dfpsfspvt001"
- },
- "skuName": {
- "value": "Standard_D2s_v3"
- },
- "tier": {
- "value": "GeneralPurpose"
- },
- // Non-required parameters
- "administratorLogin": {
- "value": "adminUserName"
- },
- "administratorLoginPassword": {
- "value": "via Bicep module
-
-```bicep
-module flexibleServer 'br:bicep/modules/db-for-postgre-sql.flexible-server:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dfpsfsp'
- params: {
- // Required parameters
- name: 'dfpsfsp001'
- skuName: 'Standard_D2s_v3'
- tier: 'GeneralPurpose'
- // Non-required parameters
- administrators: [
- {
- objectId: '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": "dfpsfsp001"
- },
- "skuName": {
- "value": "Standard_D2s_v3"
- },
- "tier": {
- "value": "GeneralPurpose"
- },
- // Non-required parameters
- "administrators": {
- "value": [
- {
- "objectId": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Virtual Desktop (AVD) Application Group.
+**This module has been evolved into the following AVM module: [avm/res/desktop-virtualization/application-group](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/desktop-virtualization/application-group).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/desktop-virtualization/application-group).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DesktopVirtualization/applicationGroups` | [2022-09-09](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DesktopVirtualization/2022-09-09/applicationGroups) |
-| `Microsoft.DesktopVirtualization/applicationGroups/applications` | [2022-09-09](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DesktopVirtualization/2022-09-09/applicationGroups/applications) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/desktop-virtualization.application-group:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module applicationGroup 'br:bicep/modules/desktop-virtualization.application-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvagmin'
- params: {
- // Required parameters
- applicationGroupType: 'RemoteApp'
- hostpoolName: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- // Required parameters
- "applicationGroupType": {
- "value": "RemoteApp"
- },
- "hostpoolName": {
- "value": "via Bicep module
-
-```bicep
-module applicationGroup 'br:bicep/modules/desktop-virtualization.application-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvagmax'
- params: {
- // Required parameters
- applicationGroupType: 'RemoteApp'
- hostpoolName: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- // Required parameters
- "applicationGroupType": {
- "value": "RemoteApp"
- },
- "hostpoolName": {
- "value": "via Bicep module
-
-```bicep
-module applicationGroup 'br:bicep/modules/desktop-virtualization.application-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvagwaf'
- params: {
- // Required parameters
- applicationGroupType: 'RemoteApp'
- hostpoolName: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- // Required parameters
- "applicationGroupType": {
- "value": "RemoteApp"
- },
- "hostpoolName": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Virtual Desktop (AVD) Host Pool.
+**This module has been evolved into the following AVM module: [avm/res/desktop-virtualization/host-pool](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/desktop-virtualization/host-pool).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/desktop-virtualization/host-pool).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DesktopVirtualization/hostPools` | [2022-09-09](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DesktopVirtualization/2022-09-09/hostPools) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/desktop-virtualization.host-pool:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module hostPool 'br:bicep/modules/desktop-virtualization.host-pool:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvhpmin'
- params: {
- // Required parameters
- name: 'dvhpmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dvhpmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module hostPool 'br:bicep/modules/desktop-virtualization.host-pool:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvhpmax'
- params: {
- // Required parameters
- name: 'dvhpmax001'
- // Non-required parameters
- agentUpdate: {
- maintenanceWindows: [
- {
- dayOfWeek: 'Friday'
- hour: 7
- }
- {
- dayOfWeek: 'Saturday'
- hour: 8
- }
- ]
- maintenanceWindowTimeZone: 'Alaskan Standard Time'
- type: 'Scheduled'
- useSessionHostLocalTime: false
- }
- customRdpProperty: 'audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;'
- description: 'My first AVD Host Pool'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "dvhpmax001"
- },
- // Non-required parameters
- "agentUpdate": {
- "value": {
- "maintenanceWindows": [
- {
- "dayOfWeek": "Friday",
- "hour": 7
- },
- {
- "dayOfWeek": "Saturday",
- "hour": 8
- }
- ],
- "maintenanceWindowTimeZone": "Alaskan Standard Time",
- "type": "Scheduled",
- "useSessionHostLocalTime": false
- }
- },
- "customRdpProperty": {
- "value": "audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;"
- },
- "description": {
- "value": "My first AVD Host Pool"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module hostPool 'br:bicep/modules/desktop-virtualization.host-pool:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvhpwaf'
- params: {
- // Required parameters
- name: 'dvhpwaf001'
- // Non-required parameters
- agentUpdate: {
- maintenanceWindows: [
- {
- dayOfWeek: 'Friday'
- hour: 7
- }
- {
- dayOfWeek: 'Saturday'
- hour: 8
- }
- ]
- maintenanceWindowTimeZone: 'Alaskan Standard Time'
- type: 'Scheduled'
- useSessionHostLocalTime: false
- }
- customRdpProperty: 'audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;'
- description: 'My first AVD Host Pool'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "dvhpwaf001"
- },
- // Non-required parameters
- "agentUpdate": {
- "value": {
- "maintenanceWindows": [
- {
- "dayOfWeek": "Friday",
- "hour": 7
- },
- {
- "dayOfWeek": "Saturday",
- "hour": 8
- }
- ],
- "maintenanceWindowTimeZone": "Alaskan Standard Time",
- "type": "Scheduled",
- "useSessionHostLocalTime": false
- }
- },
- "customRdpProperty": {
- "value": "audiocapturemode:i:1;audiomode:i:0;drivestoredirect:s:;redirectclipboard:i:1;redirectcomports:i:1;redirectprinters:i:1;redirectsmartcards:i:1;screen mode id:i:2;"
- },
- "description": {
- "value": "My first AVD Host Pool"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Virtual Desktop (AVD) Scaling Plan.
+**This module has been evolved into the following AVM module: [avm/res/desktop-virtualization/scaling-plan](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/desktop-virtualization/scaling-plan).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/desktop-virtualization/scaling-plan).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DesktopVirtualization/scalingPlans` | [2022-09-09](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DesktopVirtualization/2022-09-09/scalingPlans) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/desktop-virtualization.scaling-plan:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module scalingPlan 'br:bicep/modules/desktop-virtualization.scaling-plan:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvspmin'
- params: {
- // Required parameters
- name: 'dvspmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dvspmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module scalingPlan 'br:bicep/modules/desktop-virtualization.scaling-plan:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvspmax'
- params: {
- // Required parameters
- name: 'dvspmax001'
- // Non-required parameters
- description: 'My Scaling Plan Description'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "dvspmax001"
- },
- // Non-required parameters
- "description": {
- "value": "My Scaling Plan Description"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module scalingPlan 'br:bicep/modules/desktop-virtualization.scaling-plan:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvspwaf'
- params: {
- // Required parameters
- name: 'dvspwaf001'
- // Non-required parameters
- description: 'My Scaling Plan Description'
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "dvspwaf001"
- },
- // Non-required parameters
- "description": {
- "value": "My Scaling Plan Description"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Virtual Desktop (AVD) Workspace.
+**This module has been evolved into the following AVM module: [avm/res/desktop-virtualization/workspace](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/desktop-virtualization/workspace).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/desktop-virtualization/workspace).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DesktopVirtualization/workspaces` | [2022-09-09](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DesktopVirtualization/2022-09-09/workspaces) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/desktop-virtualization.workspace:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/desktop-virtualization.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvwmin'
- params: {
- // Required parameters
- name: 'dvwmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dvwmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/desktop-virtualization.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvwmax'
- params: {
- // Required parameters
- name: 'dvwmax001'
- // Non-required parameters
- appGroupResourceIds: [
- '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": "dvwmax001"
- },
- // Non-required parameters
- "appGroupResourceIds": {
- "value": [
- "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/desktop-virtualization.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dvwwaf'
- params: {
- // Required parameters
- name: 'dvwwaf001'
- // Non-required parameters
- appGroupResourceIds: [
- '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": "dvwwaf001"
- },
- // Non-required parameters
- "appGroupResourceIds": {
- "value": [
- "⚠️ Moved to AVM ⚠️
-This module deploys a DevTest Lab.
+**This module has been evolved into the following AVM module: [avm/res/dev-test-lab/lab](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/dev-test-lab/lab).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/dev-test-lab/lab).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DevTestLab/labs` | [2018-10-15-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/labs) |
-| `Microsoft.DevTestLab/labs/artifactsources` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/artifactsources) |
-| `Microsoft.DevTestLab/labs/costs` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/costs) |
-| `Microsoft.DevTestLab/labs/notificationchannels` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/notificationchannels) |
-| `Microsoft.DevTestLab/labs/policysets/policies` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/policysets/policies) |
-| `Microsoft.DevTestLab/labs/schedules` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/schedules) |
-| `Microsoft.DevTestLab/labs/virtualnetworks` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/virtualnetworks) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/dev-test-lab.lab:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module lab 'br:bicep/modules/dev-test-lab.lab:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dtllmin'
- params: {
- // Required parameters
- name: 'dtllmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dtllmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module lab 'br:bicep/modules/dev-test-lab.lab:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dtllmax'
- params: {
- // Required parameters
- name: 'dtllmax001'
- // Non-required parameters
- announcement: {
- enabled: 'Enabled'
- expirationDate: '2025-12-30T13:00:00Z'
- markdown: 'DevTest Lab announcement text.
New line. It also supports Markdown'
- title: 'DevTest announcement title'
- }
- artifactsources: [
- {
- branchRef: 'master'
- displayName: 'Public Artifact Repo'
- folderPath: '/Artifacts'
- name: 'Public Repo'
- sourceType: 'GitHub'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- }
- {
- armTemplateFolderPath: '/Environments'
- branchRef: 'master'
- displayName: 'Public Environment Repo'
- name: 'Public Environment Repo'
- sourceType: 'GitHub'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- }
- ]
- artifactsStorageAccount: '
New line. It also supports Markdown'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- labName: 'dtllmax001'
- resourceType: 'DevTest Lab'
- }
- virtualnetworks: [
- {
- allowedSubnets: [
- {
- allowPublicIp: 'Allow'
- labSubnetName: '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": "dtllmax001"
- },
- // Non-required parameters
- "announcement": {
- "value": {
- "enabled": "Enabled",
- "expirationDate": "2025-12-30T13:00:00Z",
- "markdown": "DevTest Lab announcement text.
New line. It also supports Markdown",
- "title": "DevTest announcement title"
- }
- },
- "artifactsources": {
- "value": [
- {
- "branchRef": "master",
- "displayName": "Public Artifact Repo",
- "folderPath": "/Artifacts",
- "name": "Public Repo",
- "sourceType": "GitHub",
- "status": "Disabled",
- "uri": "https://github.com/Azure/azure-devtestlab.git"
- },
- {
- "armTemplateFolderPath": "/Environments",
- "branchRef": "master",
- "displayName": "Public Environment Repo",
- "name": "Public Environment Repo",
- "sourceType": "GitHub",
- "status": "Disabled",
- "uri": "https://github.com/Azure/azure-devtestlab.git"
- }
- ]
- },
- "artifactsStorageAccount": {
- "value": "
New line. It also supports Markdown"
- }
- },
- "tags": {
- "value": {
- "hidden-title": "This is visible in the resource name",
- "labName": "dtllmax001",
- "resourceType": "DevTest Lab"
- }
- },
- "virtualnetworks": {
- "value": [
- {
- "allowedSubnets": [
- {
- "allowPublicIp": "Allow",
- "labSubnetName": "via Bicep module
-
-```bicep
-module lab 'br:bicep/modules/dev-test-lab.lab:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dtllwaf'
- params: {
- // Required parameters
- name: 'dtllwaf001'
- // Non-required parameters
- announcement: {
- enabled: 'Enabled'
- expirationDate: '2025-12-30T13:00:00Z'
- markdown: 'DevTest Lab announcement text.
New line. It also supports Markdown'
- title: 'DevTest announcement title'
- }
- artifactsources: [
- {
- branchRef: 'master'
- displayName: 'Public Artifact Repo'
- folderPath: '/Artifacts'
- name: 'Public Repo'
- sourceType: 'GitHub'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- }
- {
- armTemplateFolderPath: '/Environments'
- branchRef: 'master'
- displayName: 'Public Environment Repo'
- name: 'Public Environment Repo'
- sourceType: 'GitHub'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- }
- ]
- artifactsStorageAccount: '
New line. It also supports Markdown'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- labName: 'dtllwaf001'
- resourceType: 'DevTest Lab'
- }
- virtualnetworks: [
- {
- allowedSubnets: [
- {
- allowPublicIp: 'Allow'
- labSubnetName: '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": "dtllwaf001"
- },
- // Non-required parameters
- "announcement": {
- "value": {
- "enabled": "Enabled",
- "expirationDate": "2025-12-30T13:00:00Z",
- "markdown": "DevTest Lab announcement text.
New line. It also supports Markdown",
- "title": "DevTest announcement title"
- }
- },
- "artifactsources": {
- "value": [
- {
- "branchRef": "master",
- "displayName": "Public Artifact Repo",
- "folderPath": "/Artifacts",
- "name": "Public Repo",
- "sourceType": "GitHub",
- "status": "Disabled",
- "uri": "https://github.com/Azure/azure-devtestlab.git"
- },
- {
- "armTemplateFolderPath": "/Environments",
- "branchRef": "master",
- "displayName": "Public Environment Repo",
- "name": "Public Environment Repo",
- "sourceType": "GitHub",
- "status": "Disabled",
- "uri": "https://github.com/Azure/azure-devtestlab.git"
- }
- ]
- },
- "artifactsStorageAccount": {
- "value": "
New line. It also supports Markdown"
- }
- },
- "tags": {
- "value": {
- "hidden-title": "This is visible in the resource name",
- "labName": "dtllwaf001",
- "resourceType": "DevTest Lab"
- }
- },
- "virtualnetworks": {
- "value": [
- {
- "allowedSubnets": [
- {
- "allowPublicIp": "Allow",
- "labSubnetName": "
New line. It also supports Markdown'
- title: 'DevTest announcement title'
- }
- environmentPermission: 'Contributor'
- extendedProperties: {
- RdpConnectionType: '7'
- }
- labStorageType: 'Premium'
- artifactsStorageAccount: nestedDependencies.outputs.storageAccountResourceId
- premiumDataDisks: 'Enabled'
- support: {
- enabled: 'Enabled'
- markdown: 'DevTest Lab support text.
New line. It also supports Markdown'
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- managementIdentitiesResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- vmCreationResourceGroupId: resourceGroup.id
- browserConnect: 'Enabled'
- disableAutoUpgradeCseMinorVersion: true
- isolateLabResources: 'Enabled'
- encryptionType: 'EncryptionAtRestWithCustomerKey'
- encryptionDiskEncryptionSetId: nestedDependencies.outputs.diskEncryptionSetResourceId
- virtualnetworks: [
- {
- name: nestedDependencies.outputs.virtualNetworkName
- externalProviderResourceId: nestedDependencies.outputs.virtualNetworkResourceId
- description: 'lab virtual network description'
- allowedSubnets: [
- {
- labSubnetName: nestedDependencies.outputs.subnetName
- resourceId: nestedDependencies.outputs.subnetResourceId
- allowPublicIp: 'Allow'
- }
- ]
- subnetOverrides: [
- {
- labSubnetName: nestedDependencies.outputs.subnetName
- resourceId: nestedDependencies.outputs.subnetResourceId
- useInVmCreationPermission: 'Allow'
- usePublicIpAddressPermission: 'Allow'
- sharedPublicIpAddressConfiguration: {
- allowedPorts: [
- {
- transportProtocol: 'Tcp'
- backendPort: 3389
- }
- {
- transportProtocol: 'Tcp'
- backendPort: 22
- }
- ]
- }
- }
- ]
- }
- ]
- policies: [
- {
- name: nestedDependencies.outputs.subnetName
- evaluatorType: 'MaxValuePolicy'
- factData: nestedDependencies.outputs.subnetResourceId
- factName: 'UserOwnedLabVmCountInSubnet'
- threshold: '1'
- }
- {
- name: 'MaxVmsAllowedPerUser'
- evaluatorType: 'MaxValuePolicy'
- factName: 'UserOwnedLabVmCount'
- threshold: '2'
- }
- {
- name: 'MaxPremiumVmsAllowedPerUser'
- evaluatorType: 'MaxValuePolicy'
- factName: 'UserOwnedLabPremiumVmCount'
- status: 'Disabled'
- threshold: '1'
- }
- {
- name: 'MaxVmsAllowedPerLab'
- evaluatorType: 'MaxValuePolicy'
- factName: 'LabVmCount'
- threshold: '3'
- }
- {
- name: 'MaxPremiumVmsAllowedPerLab'
- evaluatorType: 'MaxValuePolicy'
- factName: 'LabPremiumVmCount'
- threshold: '2'
- }
- {
- name: 'AllowedVmSizesInLab'
- evaluatorType: 'AllowedValuesPolicy'
- factData: ''
- factName: 'LabVmSize'
- threshold: ' ${string('["Basic_A0","Basic_A1"]')}'
- status: 'Enabled'
- }
- {
- name: 'ScheduleEditPermission'
- evaluatorType: 'AllowedValuesPolicy'
- factName: 'ScheduleEditPermission'
- threshold: ' ${string('["None","Modify"]')}'
- }
- {
- name: 'GalleryImage'
- evaluatorType: 'AllowedValuesPolicy'
- factName: 'GalleryImage'
- threshold: ' ${string('["{\\"offer\\":\\"WindowsServer\\",\\"publisher\\":\\"MicrosoftWindowsServer\\",\\"sku\\":\\"2019-Datacenter-smalldisk\\",\\"osType\\":\\"Windows\\",\\"version\\":\\"latest\\"}","{\\"offer\\":\\"WindowsServer\\",\\"publisher\\":\\"MicrosoftWindowsServer\\",\\"sku\\":\\"2022-datacenter-smalldisk\\",\\"osType\\":\\"Windows\\",\\"version\\":\\"latest\\"}"]')}'
- }
- {
- name: 'EnvironmentTemplate'
- description: 'Public Environment Policy'
- evaluatorType: 'AllowedValuesPolicy'
- factName: 'EnvironmentTemplate'
- threshold: ' ${string('[""]')}'
- }
- ]
- schedules: [
- {
- name: 'LabVmsShutdown'
- taskType: 'LabVmsShutdownTask'
- status: 'Enabled'
- timeZoneId: 'AUS Eastern Standard Time'
- dailyRecurrence: {
- time: '0000'
- }
- notificationSettingsStatus: 'Enabled'
- notificationSettingsTimeInMinutes: 30
- }
- {
- name: 'LabVmAutoStart'
- taskType: 'LabVmsStartupTask'
- status: 'Enabled'
- timeZoneId: 'AUS Eastern Standard Time'
- weeklyRecurrence: {
- time: '0700'
- weekdays: [
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- ]
- }
- }
- ]
- notificationchannels: [
- {
- name: 'autoShutdown'
- description: 'Integration configured for auto-shutdown'
- events: [
- {
- eventName: 'AutoShutdown'
- }
- ]
- emailRecipient: 'mail@contosodtlmail.com'
- webHookUrl: 'https://webhook.contosotest.com'
- notificationLocale: 'en'
- }
- {
- name: 'costThreshold'
- events: [
- {
- eventName: 'Cost'
- }
- ]
- webHookUrl: 'https://webhook.contosotest.com'
- }
- ]
- artifactsources: [
- {
- name: 'Public Repo'
- displayName: 'Public Artifact Repo'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- sourceType: 'GitHub'
- branchRef: 'master'
- folderPath: '/Artifacts'
- }
- {
- name: 'Public Environment Repo'
- displayName: 'Public Environment Repo'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- sourceType: 'GitHub'
- branchRef: 'master'
- armTemplateFolderPath: '/Environments'
- }
- ]
- costs: {
- status: 'Enabled'
- cycleType: 'CalendarMonth'
- target: 450
- thresholdValue100DisplayOnChart: 'Enabled'
- thresholdValue100SendNotificationWhenExceeded: 'Enabled'
- }
- }
-}]
diff --git a/modules/dev-test-lab/lab/tests/e2e/waf-aligned/dependencies.bicep b/modules/dev-test-lab/lab/tests/e2e/waf-aligned/dependencies.bicep
deleted file mode 100644
index 10d28c8ae6..0000000000
--- a/modules/dev-test-lab/lab/tests/e2e/waf-aligned/dependencies.bicep
+++ /dev/null
@@ -1,134 +0,0 @@
-@description('Optional. The location to deploy resources to.')
-param location string = resourceGroup().location
-
-@description('Required. The name of the Managed Identity to create.')
-param managedIdentityName string
-
-@description('Required. The name of the Disk Encryption Set to create.')
-param diskEncryptionSetName string
-
-@description('Required. The name of the Key Vault to create.')
-param keyVaultName string
-
-@description('Required. The name of the Storage Account to create.')
-param storageAccountName string
-
-@description('Required. The name of the Virtual Network to create.')
-param virtualNetworkName string
-
-var addressPrefix = '10.0.0.0/16'
-
-resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
- name: managedIdentityName
- location: location
-}
-
-resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
- name: keyVaultName
- location: location
- properties: {
- sku: {
- family: 'A'
- name: 'standard'
- }
- tenantId: tenant().tenantId
- enablePurgeProtection: true // Required for encrption to work
- softDeleteRetentionInDays: 7
- enabledForTemplateDeployment: true
- enabledForDiskEncryption: true
- enabledForDeployment: true
- enableRbacAuthorization: true
- accessPolicies: []
- }
-
- resource key 'keys@2022-07-01' = {
- name: 'encryptionKey'
- properties: {
- kty: 'RSA'
- }
- }
-}
-
-resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@2021-04-01' = {
- name: diskEncryptionSetName
- location: location
- identity: {
- type: 'SystemAssigned'
- }
- properties: {
- activeKey: {
- sourceVault: {
- id: keyVault.id
- }
- keyUrl: keyVault::key.properties.keyUriWithVersion
- }
- encryptionType: 'EncryptionAtRestWithCustomerKey'
- }
-}
-
-resource keyPermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
- name: guid('msi-${keyVault.id}-${location}-${diskEncryptionSet.id}-KeyVault-Key-Read-RoleAssignment')
- scope: keyVault
- properties: {
- principalId: diskEncryptionSet.identity.principalId
- roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') // Key Vault Crypto Service Encryption User
- principalType: 'ServicePrincipal'
- }
-}
-
-resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
- name: storageAccountName
- location: location
- kind: 'StorageV2'
- sku: {
- name: 'Standard_LRS'
- }
- properties: {
- allowBlobPublicAccess: false
- publicNetworkAccess: 'Disabled'
- }
-}
-
-resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = {
- name: virtualNetworkName
- location: location
- properties: {
- addressSpace: {
- addressPrefixes: [
- addressPrefix
- ]
- }
- subnets: [
- {
- name: 'defaultSubnet'
- properties: {
- addressPrefix: cidrSubnet(addressPrefix, 16, 0)
- }
- }
- ]
- }
-}
-
-@description('The name of the created Virtual Network.')
-output virtualNetworkName string = virtualNetwork.name
-
-@description('The resource ID of the created Virtual Network.')
-output virtualNetworkResourceId string = virtualNetwork.id
-
-@description('The name of the created Virtual Network Subnet.')
-output subnetName string = virtualNetwork.properties.subnets[0].name
-
-@description('The resource ID of the created Virtual Network Subnet.')
-output subnetResourceId string = virtualNetwork.properties.subnets[0].id
-
-@description('The principal ID of the created Managed Identity.')
-output managedIdentityPrincipalId string = managedIdentity.properties.principalId
-
-@description('The resource ID of the created Managed Identity.')
-output managedIdentityResourceId string = managedIdentity.id
-
-@description('The resource ID of the created Disk Encryption Set.')
-output diskEncryptionSetResourceId string = diskEncryptionSet.id
-
-@description('The resource ID of the created Storage Account.')
-output storageAccountResourceId string = storageAccount.id
diff --git a/modules/dev-test-lab/lab/tests/e2e/waf-aligned/main.test.bicep b/modules/dev-test-lab/lab/tests/e2e/waf-aligned/main.test.bicep
deleted file mode 100644
index fb32ba4ed3..0000000000
--- a/modules/dev-test-lab/lab/tests/e2e/waf-aligned/main.test.bicep
+++ /dev/null
@@ -1,280 +0,0 @@
-targetScope = 'subscription'
-
-metadata name = 'WAF-aligned'
-metadata description = 'This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'
-
-// ========== //
-// Parameters //
-// ========== //
-
-@description('Optional. The name of the resource group to deploy for testing purposes.')
-@maxLength(90)
-param resourceGroupName string = 'dep-${namePrefix}-devtestlab.labs-${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 = 'dtllwaf'
-
-@description('Generated. Used as a basis for unique resource names.')
-param baseTime string = utcNow('u')
-
-@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-@description('Optional. A token to inject into the name of each resource.')
-param namePrefix string = '[[namePrefix]]'
-
-// ============ //
-// Dependencies //
-// ============ //
-
-// General resources
-// =================
-resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
- name: resourceGroupName
- location: location
-}
-
-module nestedDependencies 'dependencies.bicep' = {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-nestedDependencies'
- params: {
- managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}'
- // Adding base time to make the name unique as purge protection must be enabled (but may not be longer than 24 characters total)
- keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}'
- diskEncryptionSetName: 'dep-${namePrefix}-des-${serviceShort}'
- storageAccountName: 'dep${namePrefix}sa${serviceShort}'
- virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}'
- }
-}
-
-// ============== //
-// Test Execution //
-// ============== //
-
-@batchSize(1)
-module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
- scope: resourceGroup
- name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
- params: {
- enableDefaultTelemetry: enableDefaultTelemetry
- name: '${namePrefix}${serviceShort}001'
- location: resourceGroup.location
- lock: {
- kind: 'CanNotDelete'
- name: 'myCustomLockName'
- }
- tags: {
- 'hidden-title': 'This is visible in the resource name'
- resourceType: 'DevTest Lab'
- labName: '${namePrefix}${serviceShort}001'
- }
- announcement: {
- enabled: 'Enabled'
- expirationDate: '2025-12-30T13:00:00.000Z'
- markdown: 'DevTest Lab announcement text.
New line. It also supports Markdown'
- title: 'DevTest announcement title'
- }
- environmentPermission: 'Contributor'
- extendedProperties: {
- RdpConnectionType: '7'
- }
- labStorageType: 'Premium'
- artifactsStorageAccount: nestedDependencies.outputs.storageAccountResourceId
- premiumDataDisks: 'Enabled'
- support: {
- enabled: 'Enabled'
- markdown: 'DevTest Lab support text.
New line. It also supports Markdown'
- }
- managedIdentities: {
- userAssignedResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- }
- managementIdentitiesResourceIds: [
- nestedDependencies.outputs.managedIdentityResourceId
- ]
- vmCreationResourceGroupId: resourceGroup.id
- browserConnect: 'Enabled'
- disableAutoUpgradeCseMinorVersion: true
- isolateLabResources: 'Enabled'
- encryptionType: 'EncryptionAtRestWithCustomerKey'
- encryptionDiskEncryptionSetId: nestedDependencies.outputs.diskEncryptionSetResourceId
- virtualnetworks: [
- {
- name: nestedDependencies.outputs.virtualNetworkName
- externalProviderResourceId: nestedDependencies.outputs.virtualNetworkResourceId
- description: 'lab virtual network description'
- allowedSubnets: [
- {
- labSubnetName: nestedDependencies.outputs.subnetName
- resourceId: nestedDependencies.outputs.subnetResourceId
- allowPublicIp: 'Allow'
- }
- ]
- subnetOverrides: [
- {
- labSubnetName: nestedDependencies.outputs.subnetName
- resourceId: nestedDependencies.outputs.subnetResourceId
- useInVmCreationPermission: 'Allow'
- usePublicIpAddressPermission: 'Allow'
- sharedPublicIpAddressConfiguration: {
- allowedPorts: [
- {
- transportProtocol: 'Tcp'
- backendPort: 3389
- }
- {
- transportProtocol: 'Tcp'
- backendPort: 22
- }
- ]
- }
- }
- ]
- }
- ]
- policies: [
- {
- name: nestedDependencies.outputs.subnetName
- evaluatorType: 'MaxValuePolicy'
- factData: nestedDependencies.outputs.subnetResourceId
- factName: 'UserOwnedLabVmCountInSubnet'
- threshold: '1'
- }
- {
- name: 'MaxVmsAllowedPerUser'
- evaluatorType: 'MaxValuePolicy'
- factName: 'UserOwnedLabVmCount'
- threshold: '2'
- }
- {
- name: 'MaxPremiumVmsAllowedPerUser'
- evaluatorType: 'MaxValuePolicy'
- factName: 'UserOwnedLabPremiumVmCount'
- status: 'Disabled'
- threshold: '1'
- }
- {
- name: 'MaxVmsAllowedPerLab'
- evaluatorType: 'MaxValuePolicy'
- factName: 'LabVmCount'
- threshold: '3'
- }
- {
- name: 'MaxPremiumVmsAllowedPerLab'
- evaluatorType: 'MaxValuePolicy'
- factName: 'LabPremiumVmCount'
- threshold: '2'
- }
- {
- name: 'AllowedVmSizesInLab'
- evaluatorType: 'AllowedValuesPolicy'
- factData: ''
- factName: 'LabVmSize'
- threshold: ' ${string('["Basic_A0","Basic_A1"]')}'
- status: 'Enabled'
- }
- {
- name: 'ScheduleEditPermission'
- evaluatorType: 'AllowedValuesPolicy'
- factName: 'ScheduleEditPermission'
- threshold: ' ${string('["None","Modify"]')}'
- }
- {
- name: 'GalleryImage'
- evaluatorType: 'AllowedValuesPolicy'
- factName: 'GalleryImage'
- threshold: ' ${string('["{\\"offer\\":\\"WindowsServer\\",\\"publisher\\":\\"MicrosoftWindowsServer\\",\\"sku\\":\\"2019-Datacenter-smalldisk\\",\\"osType\\":\\"Windows\\",\\"version\\":\\"latest\\"}","{\\"offer\\":\\"WindowsServer\\",\\"publisher\\":\\"MicrosoftWindowsServer\\",\\"sku\\":\\"2022-datacenter-smalldisk\\",\\"osType\\":\\"Windows\\",\\"version\\":\\"latest\\"}"]')}'
- }
- {
- name: 'EnvironmentTemplate'
- description: 'Public Environment Policy'
- evaluatorType: 'AllowedValuesPolicy'
- factName: 'EnvironmentTemplate'
- threshold: ' ${string('[""]')}'
- }
- ]
- schedules: [
- {
- name: 'LabVmsShutdown'
- taskType: 'LabVmsShutdownTask'
- status: 'Enabled'
- timeZoneId: 'AUS Eastern Standard Time'
- dailyRecurrence: {
- time: '0000'
- }
- notificationSettingsStatus: 'Enabled'
- notificationSettingsTimeInMinutes: 30
- }
- {
- name: 'LabVmAutoStart'
- taskType: 'LabVmsStartupTask'
- status: 'Enabled'
- timeZoneId: 'AUS Eastern Standard Time'
- weeklyRecurrence: {
- time: '0700'
- weekdays: [
- 'Monday'
- 'Tuesday'
- 'Wednesday'
- 'Thursday'
- 'Friday'
- ]
- }
- }
- ]
- notificationchannels: [
- {
- name: 'autoShutdown'
- description: 'Integration configured for auto-shutdown'
- events: [
- {
- eventName: 'AutoShutdown'
- }
- ]
- emailRecipient: 'mail@contosodtlmail.com'
- webHookUrl: 'https://webhook.contosotest.com'
- notificationLocale: 'en'
- }
- {
- name: 'costThreshold'
- events: [
- {
- eventName: 'Cost'
- }
- ]
- webHookUrl: 'https://webhook.contosotest.com'
- }
- ]
- artifactsources: [
- {
- name: 'Public Repo'
- displayName: 'Public Artifact Repo'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- sourceType: 'GitHub'
- branchRef: 'master'
- folderPath: '/Artifacts'
- }
- {
- name: 'Public Environment Repo'
- displayName: 'Public Environment Repo'
- status: 'Disabled'
- uri: 'https://github.com/Azure/azure-devtestlab.git'
- sourceType: 'GitHub'
- branchRef: 'master'
- armTemplateFolderPath: '/Environments'
- }
- ]
- costs: {
- status: 'Enabled'
- cycleType: 'CalendarMonth'
- target: 450
- thresholdValue100DisplayOnChart: 'Enabled'
- thresholdValue100SendNotificationWhenExceeded: 'Enabled'
- }
- }
-}]
diff --git a/modules/dev-test-lab/lab/version.json b/modules/dev-test-lab/lab/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/dev-test-lab/lab/virtualnetwork/README.md b/modules/dev-test-lab/lab/virtualnetwork/README.md
deleted file mode 100644
index 365a071731..0000000000
--- a/modules/dev-test-lab/lab/virtualnetwork/README.md
+++ /dev/null
@@ -1,116 +0,0 @@
-# DevTest Lab Virtual Networks `[Microsoft.DevTestLab/labs/virtualnetworks]`
-
-This module deploys a DevTest Lab Virtual Network.
-
-Lab virtual machines must be deployed into a virtual network. This resource type allows configuring the virtual network and subnet settings used for the lab virtual machines.
-
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.DevTestLab/labs/virtualnetworks` | [2018-09-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DevTestLab/2018-09-15/labs/virtualnetworks) |
-
-## Parameters
-
-**Required parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`externalProviderResourceId`](#parameter-externalproviderresourceid) | string | The resource ID of the virtual network. |
-| [`name`](#parameter-name) | string | The name of the virtual network. |
-
-**Conditional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`labName`](#parameter-labname) | string | The name of the parent lab. Required if the template is used in a standalone deployment. |
-
-**Optional parameters**
-
-| Parameter | Type | Description |
-| :-- | :-- | :-- |
-| [`allowedSubnets`](#parameter-allowedsubnets) | array | The allowed subnets of the virtual network. |
-| [`description`](#parameter-description) | string | The description of the virtual network. |
-| [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
-| [`subnetOverrides`](#parameter-subnetoverrides) | array | The subnet overrides of the virtual network. |
-| [`tags`](#parameter-tags) | object | Tags of the resource. |
-
-### Parameter: `externalProviderResourceId`
-
-The resource ID of the virtual network.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `name`
-
-The name of the virtual network.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `labName`
-
-The name of the parent lab. Required if the template is used in a standalone deployment.
-
-- Required: Yes
-- Type: string
-
-### Parameter: `allowedSubnets`
-
-The allowed subnets of the virtual network.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `description`
-
-The description of the virtual network.
-
-- Required: No
-- Type: string
-- Default: `''`
-
-### Parameter: `enableDefaultTelemetry`
-
-Enable telemetry via a Globally Unique Identifier (GUID).
-
-- Required: No
-- Type: bool
-- Default: `True`
-
-### Parameter: `subnetOverrides`
-
-The subnet overrides of the virtual network.
-
-- Required: No
-- Type: array
-- Default: `[]`
-
-### Parameter: `tags`
-
-Tags of the resource.
-
-- Required: No
-- Type: object
-
-
-## Outputs
-
-| Output | Type | Description |
-| :-- | :-- | :-- |
-| `name` | string | The name of the lab virtual network. |
-| `resourceGroupName` | string | The name of the resource group the lab virtual network was created in. |
-| `resourceId` | string | The resource ID of the lab virtual network. |
-
-## Cross-referenced modules
-
-_None_
diff --git a/modules/dev-test-lab/lab/virtualnetwork/main.bicep b/modules/dev-test-lab/lab/virtualnetwork/main.bicep
deleted file mode 100644
index c4076627d9..0000000000
--- a/modules/dev-test-lab/lab/virtualnetwork/main.bicep
+++ /dev/null
@@ -1,66 +0,0 @@
-metadata name = 'DevTest Lab Virtual Networks'
-metadata description = '''This module deploys a DevTest Lab Virtual Network.
-
-Lab virtual machines must be deployed into a virtual network. This resource type allows configuring the virtual network and subnet settings used for the lab virtual machines.'''
-metadata owner = 'Azure/module-maintainers'
-
-@sys.description('Conditional. The name of the parent lab. Required if the template is used in a standalone deployment.')
-param labName string
-
-@sys.description('Required. The name of the virtual network.')
-param name string
-
-@sys.description('Required. The resource ID of the virtual network.')
-param externalProviderResourceId string
-
-@sys.description('Optional. Tags of the resource.')
-param tags object?
-
-@sys.description('Optional. The description of the virtual network.')
-param description string = ''
-
-@sys.description('Optional. The allowed subnets of the virtual network.')
-param allowedSubnets array = []
-
-@sys.description('Optional. The subnet overrides of the virtual network.')
-param subnetOverrides array = []
-
-@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
-param enableDefaultTelemetry bool = true
-
-resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
- name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}'
- properties: {
- mode: 'Incremental'
- template: {
- '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#'
- contentVersion: '1.0.0.0'
- resources: []
- }
- }
-}
-
-resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
- name: labName
-}
-
-resource virtualNetwork 'Microsoft.DevTestLab/labs/virtualnetworks@2018-09-15' = {
- name: name
- parent: lab
- tags: tags
- properties: {
- description: description
- externalProviderResourceId: externalProviderResourceId
- allowedSubnets: allowedSubnets
- subnetOverrides: subnetOverrides
- }
-}
-
-@sys.description('The name of the lab virtual network.')
-output name string = virtualNetwork.name
-
-@sys.description('The resource ID of the lab virtual network.')
-output resourceId string = virtualNetwork.id
-
-@sys.description('The name of the resource group the lab virtual network was created in.')
-output resourceGroupName string = resourceGroup().name
diff --git a/modules/dev-test-lab/lab/virtualnetwork/main.json b/modules/dev-test-lab/lab/virtualnetwork/main.json
deleted file mode 100644
index 0f32f00fd3..0000000000
--- a/modules/dev-test-lab/lab/virtualnetwork/main.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "languageVersion": "2.0",
- "contentVersion": "1.0.0.0",
- "metadata": {
- "_generator": {
- "name": "bicep",
- "version": "0.22.6.54827",
- "templateHash": "8382075673072622254"
- },
- "name": "DevTest Lab Virtual Networks",
- "description": "This module deploys a DevTest Lab Virtual Network.\r\n\r\nLab virtual machines must be deployed into a virtual network. This resource type allows configuring the virtual network and subnet settings used for the lab virtual machines.",
- "owner": "Azure/module-maintainers"
- },
- "parameters": {
- "labName": {
- "type": "string",
- "metadata": {
- "description": "Conditional. The name of the parent lab. Required if the template is used in a standalone deployment."
- }
- },
- "name": {
- "type": "string",
- "metadata": {
- "description": "Required. The name of the virtual network."
- }
- },
- "externalProviderResourceId": {
- "type": "string",
- "metadata": {
- "description": "Required. The resource ID of the virtual network."
- }
- },
- "tags": {
- "type": "object",
- "nullable": true,
- "metadata": {
- "description": "Optional. Tags of the resource."
- }
- },
- "description": {
- "type": "string",
- "defaultValue": "",
- "metadata": {
- "description": "Optional. The description of the virtual network."
- }
- },
- "allowedSubnets": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The allowed subnets of the virtual network."
- }
- },
- "subnetOverrides": {
- "type": "array",
- "defaultValue": [],
- "metadata": {
- "description": "Optional. The subnet overrides of the virtual network."
- }
- },
- "enableDefaultTelemetry": {
- "type": "bool",
- "defaultValue": true,
- "metadata": {
- "description": "Optional. Enable telemetry via a Globally Unique Identifier (GUID)."
- }
- }
- },
- "resources": {
- "defaultTelemetry": {
- "condition": "[parameters('enableDefaultTelemetry')]",
- "type": "Microsoft.Resources/deployments",
- "apiVersion": "2021-04-01",
- "name": "[format('pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-{0}', uniqueString(deployment().name))]",
- "properties": {
- "mode": "Incremental",
- "template": {
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "resources": []
- }
- }
- },
- "lab": {
- "existing": true,
- "type": "Microsoft.DevTestLab/labs",
- "apiVersion": "2018-09-15",
- "name": "[parameters('labName')]"
- },
- "virtualNetwork": {
- "type": "Microsoft.DevTestLab/labs/virtualnetworks",
- "apiVersion": "2018-09-15",
- "name": "[format('{0}/{1}', parameters('labName'), parameters('name'))]",
- "tags": "[parameters('tags')]",
- "properties": {
- "description": "[parameters('description')]",
- "externalProviderResourceId": "[parameters('externalProviderResourceId')]",
- "allowedSubnets": "[parameters('allowedSubnets')]",
- "subnetOverrides": "[parameters('subnetOverrides')]"
- },
- "dependsOn": [
- "lab"
- ]
- }
- },
- "outputs": {
- "name": {
- "type": "string",
- "metadata": {
- "description": "The name of the lab virtual network."
- },
- "value": "[parameters('name')]"
- },
- "resourceId": {
- "type": "string",
- "metadata": {
- "description": "The resource ID of the lab virtual network."
- },
- "value": "[resourceId('Microsoft.DevTestLab/labs/virtualnetworks', parameters('labName'), parameters('name'))]"
- },
- "resourceGroupName": {
- "type": "string",
- "metadata": {
- "description": "The name of the resource group the lab virtual network was created in."
- },
- "value": "[resourceGroup().name]"
- }
- }
-}
\ No newline at end of file
diff --git a/modules/dev-test-lab/lab/virtualnetwork/version.json b/modules/dev-test-lab/lab/virtualnetwork/version.json
deleted file mode 100644
index 96236a61ba..0000000000
--- a/modules/dev-test-lab/lab/virtualnetwork/version.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
- "version": "0.4",
- "pathFilters": [
- "./main.json"
- ]
-}
diff --git a/modules/digital-twins/digital-twins-instance/README.md b/modules/digital-twins/digital-twins-instance/README.md
index 6e6d82d64a..ff98ac6161 100644
--- a/modules/digital-twins/digital-twins-instance/README.md
+++ b/modules/digital-twins/digital-twins-instance/README.md
@@ -1,1077 +1,7 @@
-# Digital Twins Instances `[Microsoft.DigitalTwins/digitalTwinsInstances]`
+⚠️ Moved to AVM ⚠️
-This module deploys an Azure Digital Twins Instance.
+**This module has been evolved into the following AVM module: [avm/res/digital-twins/digital-twins-instance](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/digital-twins/digital-twins-instance).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/digital-twins/digital-twins-instance).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DigitalTwins/digitalTwinsInstances` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DigitalTwins/2023-01-31/digitalTwinsInstances) |
-| `Microsoft.DigitalTwins/digitalTwinsInstances/endpoints` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DigitalTwins/2023-01-31/digitalTwinsInstances/endpoints) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/digital-twins.digital-twins-instance:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module digitalTwinsInstance 'br:bicep/modules/digital-twins.digital-twins-instance:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dtdtimin'
- params: {
- // Required parameters
- name: 'dtdtimin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "dtdtimin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module digitalTwinsInstance 'br:bicep/modules/digital-twins.digital-twins-instance:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dtdtimax'
- params: {
- // Required parameters
- name: 'dtdtimax001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "dtdtimax001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module digitalTwinsInstance 'br:bicep/modules/digital-twins.digital-twins-instance:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dtdtiwaf'
- params: {
- // Required parameters
- name: 'dtdtiwaf001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "dtdtiwaf001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/document-db/database-account](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/document-db/database-account).**
-This module deploys a DocumentDB Database Account.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/document-db/database-account).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.DocumentDB/databaseAccounts` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts) |
-| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/gremlinDatabases) |
-| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/gremlinDatabases/graphs) |
-| `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/mongodbDatabases) |
-| `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/mongodbDatabases/collections) |
-| `Microsoft.DocumentDB/databaseAccounts/sqlDatabases` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/sqlDatabases) |
-| `Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers` | [2023-04-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2023-04-15/databaseAccounts/sqlDatabases/containers) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/document-db.database-account:1.0.0`.
-
-- [Gremlindb](#example-1-gremlindb)
-- [Mongodb](#example-2-mongodb)
-- [Plain](#example-3-plain)
-- [Sqldb](#example-4-sqldb)
-
-### Example 1: _Gremlindb_
-
-via Bicep module
-
-```bicep
-module databaseAccount 'br:bicep/modules/document-db.database-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dddagrm'
- params: {
- // Required parameters
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: '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
- "locations": {
- "value": [
- {
- "failoverPriority": 0,
- "isZoneRedundant": false,
- "locationName": "via Bicep module
-
-```bicep
-module databaseAccount 'br:bicep/modules/document-db.database-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dddamng'
- params: {
- // Required parameters
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: '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
- "locations": {
- "value": [
- {
- "failoverPriority": 0,
- "isZoneRedundant": false,
- "locationName": "via Bicep module
-
-```bicep
-module databaseAccount 'br:bicep/modules/document-db.database-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dddapln'
- params: {
- // Required parameters
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: '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
- "locations": {
- "value": [
- {
- "failoverPriority": 0,
- "isZoneRedundant": false,
- "locationName": "via Bicep module
-
-```bicep
-module databaseAccount 'br:bicep/modules/document-db.database-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-dddasql'
- params: {
- // Required parameters
- locations: [
- {
- failoverPriority: 0
- isZoneRedundant: false
- locationName: '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
- "locations": {
- "value": [
- {
- "failoverPriority": 0,
- "isZoneRedundant": false,
- "locationName": "Parameter JSON format
-
-```json
-"graphs": {
- "value": [
- {
- "name": "graph01",
- "automaticIndexing": true,
- "partitionKeyPaths": [
- "/name"
- ]
- },
- {
- "name": "graph02",
- "automaticIndexing": true,
- "partitionKeyPaths": [
- "/name"
- ]
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-graphs: [
- {
- name: 'graph01'
- automaticIndexing: true
- partitionKeyPaths: [
- '/name'
- ]
- }
- {
- name: 'graph02'
- automaticIndexing: true
- partitionKeyPaths: [
- '/name'
- ]
- }
-]
-```
-
-Bicep format
-
-```bicep
-graphs: [
- {
- name: 'graph01'
- automaticIndexing: true
- partitionKeyPaths: [
- '/name'
- ],
-
- }
- {
- name: 'graph02'
- automaticIndexing: true
- partitionKeyPaths: [
- '/address'
- ]
- }
-]
-```
-
-Parameter JSON format
-
-```json
-"indexes": {
- "value": [
- {
- "key": {
- "keys": [
- "_id"
- ]
- }
- },
- {
- "key": {
- "keys": [
- "$**"
- ]
- }
- },
- {
- "key": {
- "keys": [
- "estate_id",
- "estate_address"
- ]
- },
- "options": {
- "unique": true
- }
- },
- {
- "key": {
- "keys": [
- "_ts"
- ]
- },
- "options": {
- "expireAfterSeconds": 2629746
- }
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-indexes: [
- {
- key: {
- keys: [
- '_id'
- ]
- }
- }
- {
- key: {
- keys: [
- '$**'
- ]
- }
- }
- {
- key: {
- keys: [
- 'estate_id'
- 'estate_address'
- ]
- }
- options: {
- unique: true
- }
- }
- {
- key: {
- keys: [
- '_ts'
- ]
- }
- options: {
- expireAfterSeconds: 2629746
- }
- }
-]
-```
-
-Parameter JSON format
-
-```json
-"shardKey": {
- "value": {
- "estate_id": "Hash"
- }
-}
-```
-
-Bicep format
-
-```bicep
-shardKey: {
- estate_id: 'Hash'
-}
-```
-
-Parameter JSON format
-
-```json
-"indexingPolicy": {
- "indexingMode": "consistent",
- "includedPaths": [
- {
- "path": "/*"
- }
- ],
- "excludedPaths": [
- ]
-}
-```
-
-Bicep format
-
-```bicep
-indexingPolicy: {
- indexingMode: 'consistent'
- includedPaths: [
- {
- path: '/*'
- }
- ]
- excludedPaths: []
-}
-```
-
-⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/event-grid/domain](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/event-grid/domain).**
-This module deploys an Event Grid Domain.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/event-grid/domain).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.EventGrid/domains` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/domains) |
-| `Microsoft.EventGrid/domains/topics` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/domains/topics) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/event-grid.domain:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [Pe](#example-3-pe)
-- [WAF-aligned](#example-4-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module domain 'br:bicep/modules/event-grid.domain:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egdmin'
- params: {
- // Required parameters
- name: 'egdmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "egdmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module domain 'br:bicep/modules/event-grid.domain:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egdmax'
- params: {
- // Required parameters
- name: 'egdmax001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "egdmax001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module domain 'br:bicep/modules/event-grid.domain:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egdpe'
- params: {
- // Required parameters
- name: 'egdpe001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "egdpe001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module domain 'br:bicep/modules/event-grid.domain:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egdwaf'
- params: {
- // Required parameters
- name: 'egdwaf001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "egdwaf001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/event-grid/system-topic](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/event-grid/system-topic).**
-This module deploys an Event Grid System Topic.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/event-grid/system-topic).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.EventGrid/systemTopics` | [2021-12-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2021-12-01/systemTopics) |
-| `Microsoft.EventGrid/systemTopics/eventSubscriptions` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/systemTopics/eventSubscriptions) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/event-grid.system-topic:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module systemTopic 'br:bicep/modules/event-grid.system-topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egstmin'
- params: {
- // Required parameters
- name: 'egstmin001'
- source: '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": "egstmin001"
- },
- "source": {
- "value": "via Bicep module
-
-```bicep
-module systemTopic 'br:bicep/modules/event-grid.system-topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egstmax'
- params: {
- // Required parameters
- name: 'egstmax001'
- source: '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": "egstmax001"
- },
- "source": {
- "value": "via Bicep module
-
-```bicep
-module systemTopic 'br:bicep/modules/event-grid.system-topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egstwaf'
- params: {
- // Required parameters
- name: 'egstwaf001'
- source: '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": "egstwaf001"
- },
- "source": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/event-grid/topic](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/event-grid/topic).**
-This module deploys an Event Grid Topic.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/event-grid/topic).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.EventGrid/topics` | [2020-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2020-06-01/topics) |
-| `Microsoft.EventGrid/topics/eventSubscriptions` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventGrid/2022-06-15/topics/eventSubscriptions) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/event-grid.topic:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [Pe](#example-3-pe)
-- [WAF-aligned](#example-4-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module topic 'br:bicep/modules/event-grid.topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egtmin'
- params: {
- // Required parameters
- name: 'egtmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "egtmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module topic 'br:bicep/modules/event-grid.topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egtmax'
- params: {
- // Required parameters
- name: 'egtmax001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "egtmax001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module topic 'br:bicep/modules/event-grid.topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egtpe'
- params: {
- // Required parameters
- name: 'egtpe001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "egtpe001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module topic 'br:bicep/modules/event-grid.topic:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-egtwaf'
- params: {
- // Required parameters
- name: 'egtwaf001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "egtwaf001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys an Event Hub Namespace.
+**This module has been evolved into the following AVM module: [avm/res/event-hub/namespace](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/event-hub/namespace).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/event-hub/namespace).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.EventHub/namespaces` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces) |
-| `Microsoft.EventHub/namespaces/authorizationRules` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/authorizationRules) |
-| `Microsoft.EventHub/namespaces/disasterRecoveryConfigs` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/disasterRecoveryConfigs) |
-| `Microsoft.EventHub/namespaces/eventhubs` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs) |
-| `Microsoft.EventHub/namespaces/eventhubs/authorizationRules` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs/authorizationRules) |
-| `Microsoft.EventHub/namespaces/eventhubs/consumergroups` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/eventhubs/consumergroups) |
-| `Microsoft.EventHub/namespaces/networkRuleSets` | [2022-10-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.EventHub/2022-10-01-preview/namespaces/networkRuleSets) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/event-hub.namespace:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [Pe](#example-4-pe)
-- [WAF-aligned](#example-5-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module namespace 'br:bicep/modules/event-hub.namespace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ehnmin'
- params: {
- // Required parameters
- name: 'ehnmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "ehnmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module namespace 'br:bicep/modules/event-hub.namespace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ehnenc'
- params: {
- // Required parameters
- name: 'ehnenc001'
- // Non-required parameters
- customerManagedKey: {
- keyName: '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": "ehnenc001"
- },
- // Non-required parameters
- "customerManagedKey": {
- "value": {
- "keyName": "via Bicep module
-
-```bicep
-module namespace 'br:bicep/modules/event-hub.namespace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ehnmax'
- params: {
- // Required parameters
- name: 'ehnmax001'
- // Non-required parameters
- authorizationRules: [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- {
- name: 'SendListenAccess'
- rights: [
- 'Listen'
- 'Send'
- ]
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "ehnmax001"
- },
- // Non-required parameters
- "authorizationRules": {
- "value": [
- {
- "name": "RootManageSharedAccessKey",
- "rights": [
- "Listen",
- "Manage",
- "Send"
- ]
- },
- {
- "name": "SendListenAccess",
- "rights": [
- "Listen",
- "Send"
- ]
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module namespace 'br:bicep/modules/event-hub.namespace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ehnpe'
- params: {
- // Required parameters
- name: 'ehnpe001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "ehnpe001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module namespace 'br:bicep/modules/event-hub.namespace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ehnwaf'
- params: {
- // Required parameters
- name: 'ehnwaf001'
- // Non-required parameters
- authorizationRules: [
- {
- name: 'RootManageSharedAccessKey'
- rights: [
- 'Listen'
- 'Manage'
- 'Send'
- ]
- }
- {
- name: 'SendListenAccess'
- rights: [
- 'Listen'
- 'Send'
- ]
- }
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "ehnwaf001"
- },
- // Non-required parameters
- "authorizationRules": {
- "value": [
- {
- "name": "RootManageSharedAccessKey",
- "rights": [
- "Listen",
- "Manage",
- "Send"
- ]
- },
- {
- "name": "SendListenAccess",
- "rights": [
- "Listen",
- "Send"
- ]
- }
- ]
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Health Bot.
+**This module has been evolved into the following AVM module: [avm/res/health-bot/health-bot](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/health-bot/health-bot).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/health-bot/health-bot).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.HealthBot/healthBots` | [2022-08-08](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthBot/2022-08-08/healthBots) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/health-bot.health-bot:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-hbhbmin'
- params: {
- // Required parameters
- name: 'hbhbmin001'
- sku: 'F0'
- // Non-required parameters
- enableDefaultTelemetry: '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": "hbhbmin001"
- },
- "sku": {
- "value": "F0"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-hbhbmax'
- params: {
- // Required parameters
- name: 'hbhbmax001'
- sku: 'F0'
- // Non-required parameters
- enableDefaultTelemetry: '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": "hbhbmax001"
- },
- "sku": {
- "value": "F0"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module healthBot 'br:bicep/modules/health-bot.health-bot:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-hbhbwaf'
- params: {
- // Required parameters
- name: 'hbhbwaf001'
- sku: 'F0'
- // Non-required parameters
- enableDefaultTelemetry: '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": "hbhbwaf001"
- },
- "sku": {
- "value": "F0"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Healthcare API Workspace.
+**This module has been evolved into the following AVM module: [avm/res/healthcare-apis/workspace](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/healthcare-apis/workspace).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/healthcare-apis/workspace).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.HealthcareApis/workspaces` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates) |
-| `Microsoft.HealthcareApis/workspaces/dicomservices` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.HealthcareApis/workspaces/fhirservices` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.HealthcareApis/workspaces/iotconnectors` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.HealthcareApis/workspaces/iotconnectors/fhirdestinations` | [2022-06-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.HealthcareApis/workspaces) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/healthcare-apis.workspace:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/healthcare-apis.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-hawmin'
- params: {
- // Required parameters
- name: 'hawmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "hawmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/healthcare-apis.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-hawmax'
- params: {
- // Required parameters
- name: 'hawmax001'
- // Non-required parameters
- dicomservices: [
- {
- corsAllowCredentials: false
- corsHeaders: [
- '*'
- ]
- corsMaxAge: 600
- corsMethods: [
- 'GET'
- ]
- corsOrigins: [
- '*'
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "hawmax001"
- },
- // Non-required parameters
- "dicomservices": {
- "value": [
- {
- "corsAllowCredentials": false,
- "corsHeaders": [
- "*"
- ],
- "corsMaxAge": 600,
- "corsMethods": [
- "GET"
- ],
- "corsOrigins": [
- "*"
- ],
- "diagnosticSettings": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/healthcare-apis.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-hawwaf'
- params: {
- // Required parameters
- name: 'hawwaf001'
- // Non-required parameters
- dicomservices: [
- {
- corsAllowCredentials: false
- corsHeaders: [
- '*'
- ]
- corsMaxAge: 600
- corsMethods: [
- 'GET'
- ]
- corsOrigins: [
- '*'
- ]
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "hawwaf001"
- },
- // Non-required parameters
- "dicomservices": {
- "value": [
- {
- "corsAllowCredentials": false,
- "corsHeaders": [
- "*"
- ],
- "corsMaxAge": 600,
- "corsMethods": [
- "GET"
- ],
- "corsOrigins": [
- "*"
- ],
- "diagnosticSettings": [
- {
- "eventHubAuthorizationRuleResourceId": "Parameter JSON format
-
-```json
-"iotConnectors": {
- "value": [
- {
- "name": "[[namePrefix]]-az-iomt-x-001",
- "workspaceName": "[[namePrefix]]001",
- "corsOrigins": [ "*" ],
- "corsHeaders": [ "*" ],
- "corsMethods": [ "GET" ],
- "corsMaxAge": 600,
- "corsAllowCredentials": false,
- "location": "[[location]]",
- "diagnosticStorageAccountId": "[[storageAccountResourceId]]",
- "diagnosticWorkspaceId": "[[logAnalyticsWorkspaceResourceId]]",
- "diagnosticEventHubAuthorizationRuleId": "[[eventHubAuthorizationRuleId]]",
- "diagnosticEventHubName": "[[eventHubNamespaceEventHubName]]",
- "publicNetworkAccess": "Enabled",
- "enableDefaultTelemetry": false,
- "systemAssignedIdentity": true,
- "userAssignedIdentities": {
- "[[managedIdentityResourceId]]": {}
- },
- "eventHubName": "[[eventHubName]]",
- "consumerGroup": "[[consumerGroup]]",
- "eventHubNamespaceName": "[[eventHubNamespaceName]]",
- "deviceMapping": "[[deviceMapping]]",
- "destinationMapping": "[[destinationMapping]]",
- "fhirServiceResourceId": "[[fhirServiceResourceId]]",
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-iotConnectors: [
- {
- name: '[[namePrefix]]-az-iomt-x-001'
- workspaceName: '[[namePrefix]]001'
- corsOrigins: [ '*' ]
- corsHeaders: [ '*' ]
- corsMethods: [ 'GET' ]
- corsMaxAge: 600
- corsAllowCredentials: false
- location: location
- diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId
- diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId
- diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId
- diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName
- publicNetworkAccess: 'Enabled'
- enableDefaultTelemetry: enableDefaultTelemetry
- systemAssignedIdentity: true
- userAssignedIdentities: {
- '${resourceGroupResources.outputs.managedIdentityResourceId}': {}
- }
- eventHubName: '[[eventHubName]]'
- consumerGroup: '[[consumerGroup]]'
- eventHubNamespaceName: '[[eventHubNamespaceName]]'
- deviceMapping: '[[deviceMapping]]'
- destinationMapping: '[[destinationMapping]]'
- fhirServiceResourceId: '[[fhirServiceResourceId]]'
- }
-]
-```
-
-Parameter JSON format
-
-```json
-"acrOciArtifacts": {
- "value": {
- [{
- "digest": "sha256:0a2e01852872580b2c2fea9380ff8d7b637d3928783c55beb3f21a6e58d5d108",
- "imageName": "myimage:v1",
- "loginServer": "myregistry.azurecr.io"
- }]
- }
-}
-```
-
-Bicep format
-
-```bicep
-acrOciArtifacts: [
- {
- digest: 'sha256:0a2e01852872580b2c2fea9380ff8d7b637d3928783c55beb3f21a6e58d5d108'
- imageName: 'myimage:v1'
- loginServer: 'myregistry.azurecr.io'
- }
-]
-```
-
-Parameter JSON format
-
-```json
-"deviceMapping": {
- "value": {
- "templateType": "CollectionContent",
- "template": [
- {
- "templateType": "JsonPathContent",
- "template": {
- "typeName": "heartrate",
- "typeMatchExpression": "$..[?(@heartRate)]",
- "deviceIdExpression": "$.deviceId",
- "timestampExpression": "$.endDate",
- "values": [
- {
- "required": "true",
- "valueExpression": "$.heartRate",
- "valueName": "hr"
- }
- ]
- }
- }
- ]
- }
-}
-```
-
-Bicep format
-
-```bicep
-deviceMapping: {
- templateType: 'CollectionContent'
- template: [
- {
- templateType: 'JsonPathContent'
- template: {
- typeName: 'heartrate'
- typeMatchExpression: '$..[?(@heartRate)]'
- deviceIdExpression: '$.deviceId'
- timestampExpression: '$.endDate'
- values: [
- {
- required: 'true'
- valueExpression: '$.heartRat'
- valueName: 'hr'
- }
- ]
- }
- }]
-}
-```
-
-Parameter JSON format
-
-```json
-"destinationMapping": {
- "value": {
- "templateType": "CodeValueFhir",
- "template": {
- "codes": [
- {
- "code": "8867-4",
- "system": "http://loinc.org",
- "display": "Heart rate"
- }
- ],
- "periodInterval": 60,
- "typeName": "heartrate",
- "value": {
- "defaultPeriod": 5000,
- "unit": "count/min",
- "valueName": "hr",
- "valueType": "SampledData"
- }
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-destinationMapping: {
- templateType: 'CodeValueFhir'
- template: {
- codes: [
- {
- code: '8867-4'
- system: 'http://loinc.org'
- display: 'Heart rate'
- }
- ],
- periodInterval: 60,
- typeName: 'heartrate'
- value: {
- defaultPeriod: 5000
- unit: 'count/min'
- valueName: 'hr'
- valueType: 'SampledData'
- }
- }
-}
-```
-
-Parameter JSON format
-
-```json
-"destinationMapping": {
- "value": {
- "templateType": "CodeValueFhir",
- "template": {
- "codes": [
- {
- "code": "8867-4",
- "system": "http://loinc.org",
- "display": "Heart rate"
- }
- ],
- "periodInterval": 60,
- "typeName": "heartrate",
- "value": {
- "defaultPeriod": 5000,
- "unit": "count/min",
- "valueName": "hr",
- "valueType": "SampledData"
- }
- }
- }
-}
-```
-
-Bicep format
-
-```bicep
-destinationMapping: {
- templateType: 'CodeValueFhir'
- template: {
- codes: [
- {
- code: '8867-4'
- system: 'http://loinc.org'
- display: 'Heart rate'
- }
- ],
- periodInterval: 60,
- typeName: 'heartrate'
- value: {
- defaultPeriod: 5000
- unit: 'count/min'
- valueName: 'hr'
- valueType: 'SampledData'
- }
- }
-}
-```
-
-⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/insights/action-group](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/action-group).**
-This module deploys an Action Group.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/action-group).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/actionGroups` | [2023-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2023-01-01/actionGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.action-group:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module actionGroup 'br:bicep/modules/insights.action-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-iagmin'
- params: {
- // Required parameters
- groupShortName: 'agiagmin001'
- name: 'iagmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "groupShortName": {
- "value": "agiagmin001"
- },
- "name": {
- "value": "iagmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module actionGroup 'br:bicep/modules/insights.action-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-iagmax'
- params: {
- // Required parameters
- groupShortName: 'agiagmax001'
- name: 'iagmax001'
- // Non-required parameters
- emailReceivers: [
- {
- emailAddress: 'test.user@testcompany.com'
- name: 'TestUser_-EmailAction-'
- useCommonAlertSchema: true
- }
- {
- emailAddress: 'test.user2@testcompany.com'
- name: 'TestUser2'
- useCommonAlertSchema: true
- }
- ]
- enableDefaultTelemetry: '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
- "groupShortName": {
- "value": "agiagmax001"
- },
- "name": {
- "value": "iagmax001"
- },
- // Non-required parameters
- "emailReceivers": {
- "value": [
- {
- "emailAddress": "test.user@testcompany.com",
- "name": "TestUser_-EmailAction-",
- "useCommonAlertSchema": true
- },
- {
- "emailAddress": "test.user2@testcompany.com",
- "name": "TestUser2",
- "useCommonAlertSchema": true
- }
- ]
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module actionGroup 'br:bicep/modules/insights.action-group:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-iagwaf'
- params: {
- // Required parameters
- groupShortName: 'agiagwaf001'
- name: 'iagwaf001'
- // Non-required parameters
- emailReceivers: [
- {
- emailAddress: 'test.user@testcompany.com'
- name: 'TestUser_-EmailAction-'
- useCommonAlertSchema: true
- }
- {
- emailAddress: 'test.user2@testcompany.com'
- name: 'TestUser2'
- useCommonAlertSchema: true
- }
- ]
- enableDefaultTelemetry: '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
- "groupShortName": {
- "value": "agiagwaf001"
- },
- "name": {
- "value": "iagwaf001"
- },
- // Non-required parameters
- "emailReceivers": {
- "value": [
- {
- "emailAddress": "test.user@testcompany.com",
- "name": "TestUser_-EmailAction-",
- "useCommonAlertSchema": true
- },
- {
- "emailAddress": "test.user2@testcompany.com",
- "name": "TestUser2",
- "useCommonAlertSchema": true
- }
- ]
- },
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys an Activity Log Alert.
+**This module has been evolved into the following AVM module: [avm/res/insights/activity-log-alert](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/activity-log-alert).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/activity-log-alert).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/activityLogAlerts` | [2020-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2020-10-01/activityLogAlerts) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.activity-log-alert:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module activityLogAlert 'br:bicep/modules/insights.activity-log-alert:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ialamax'
- params: {
- // Required parameters
- conditions: [
- {
- equals: 'ServiceHealth'
- field: 'category'
- }
- {
- anyOf: [
- {
- equals: 'Incident'
- field: 'properties.incidentType'
- }
- {
- equals: 'Maintenance'
- field: 'properties.incidentType'
- }
- ]
- }
- {
- containsAny: [
- 'Action Groups'
- 'Activity Logs & Alerts'
- ]
- field: 'properties.impactedServices[*].ServiceName'
- }
- {
- containsAny: [
- 'Global'
- 'West Europe'
- ]
- field: 'properties.impactedServices[*].ImpactedRegions[*].RegionName'
- }
- ]
- name: 'ialamax001'
- // Non-required parameters
- actions: [
- {
- actionGroupId: '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
- "conditions": {
- "value": [
- {
- "equals": "ServiceHealth",
- "field": "category"
- },
- {
- "anyOf": [
- {
- "equals": "Incident",
- "field": "properties.incidentType"
- },
- {
- "equals": "Maintenance",
- "field": "properties.incidentType"
- }
- ]
- },
- {
- "containsAny": [
- "Action Groups",
- "Activity Logs & Alerts"
- ],
- "field": "properties.impactedServices[*].ServiceName"
- },
- {
- "containsAny": [
- "Global",
- "West Europe"
- ],
- "field": "properties.impactedServices[*].ImpactedRegions[*].RegionName"
- }
- ]
- },
- "name": {
- "value": "ialamax001"
- },
- // Non-required parameters
- "actions": {
- "value": [
- {
- "actionGroupId": "via Bicep module
-
-```bicep
-module activityLogAlert 'br:bicep/modules/insights.activity-log-alert:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-ialawaf'
- params: {
- // Required parameters
- conditions: [
- {
- equals: 'ServiceHealth'
- field: 'category'
- }
- {
- anyOf: [
- {
- equals: 'Incident'
- field: 'properties.incidentType'
- }
- {
- equals: 'Maintenance'
- field: 'properties.incidentType'
- }
- ]
- }
- {
- containsAny: [
- 'Action Groups'
- 'Activity Logs & Alerts'
- ]
- field: 'properties.impactedServices[*].ServiceName'
- }
- {
- containsAny: [
- 'Global'
- 'West Europe'
- ]
- field: 'properties.impactedServices[*].ImpactedRegions[*].RegionName'
- }
- ]
- name: 'ialawaf001'
- // Non-required parameters
- actions: [
- {
- actionGroupId: '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
- "conditions": {
- "value": [
- {
- "equals": "ServiceHealth",
- "field": "category"
- },
- {
- "anyOf": [
- {
- "equals": "Incident",
- "field": "properties.incidentType"
- },
- {
- "equals": "Maintenance",
- "field": "properties.incidentType"
- }
- ]
- },
- {
- "containsAny": [
- "Action Groups",
- "Activity Logs & Alerts"
- ],
- "field": "properties.impactedServices[*].ServiceName"
- },
- {
- "containsAny": [
- "Global",
- "West Europe"
- ],
- "field": "properties.impactedServices[*].ImpactedRegions[*].RegionName"
- }
- ]
- },
- "name": {
- "value": "ialawaf001"
- },
- // Non-required parameters
- "actions": {
- "value": [
- {
- "actionGroupId": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/insights/component](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/component).**
-This component deploys an Application Insights instance.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/component).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/components` | [2020-02-02](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2020-02-02/components) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.component:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module component 'br:bicep/modules/insights.component:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-icmin'
- params: {
- // Required parameters
- name: 'icmin001'
- workspaceResourceId: '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": "icmin001"
- },
- "workspaceResourceId": {
- "value": "via Bicep module
-
-```bicep
-module component 'br:bicep/modules/insights.component:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-icmax'
- params: {
- // Required parameters
- name: 'icmax001'
- workspaceResourceId: '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": "icmax001"
- },
- "workspaceResourceId": {
- "value": "via Bicep module
-
-```bicep
-module component 'br:bicep/modules/insights.component:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-icwaf'
- params: {
- // Required parameters
- name: 'icwaf001'
- workspaceResourceId: '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": "icwaf001"
- },
- "workspaceResourceId": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/insights/data-collection-endpoint](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/data-collection-endpoint).**
-This module deploys a Data Collection Endpoint.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/data-collection-endpoint).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/dataCollectionEndpoints` | [2021-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-04-01/dataCollectionEndpoints) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.data-collection-endpoint:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module dataCollectionEndpoint 'br:bicep/modules/insights.data-collection-endpoint:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcemin'
- params: {
- // Required parameters
- name: 'idcemin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "idcemin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module dataCollectionEndpoint 'br:bicep/modules/insights.data-collection-endpoint:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcemax'
- params: {
- // Required parameters
- name: 'idcemax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "idcemax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module dataCollectionEndpoint 'br:bicep/modules/insights.data-collection-endpoint:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcewaf'
- params: {
- // Required parameters
- name: 'idcewaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "idcewaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Data Collection Rule.
+**This module has been evolved into the following AVM module: [avm/res/insights/data-collection-rule](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/data-collection-rule).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/data-collection-rule).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/dataCollectionRules` | [2021-09-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-09-01-preview/dataCollectionRules) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.data-collection-rule:1.0.0`.
-
-- [Customadv](#example-1-customadv)
-- [Custombasic](#example-2-custombasic)
-- [Customiis](#example-3-customiis)
-- [Using only defaults](#example-4-using-only-defaults)
-- [Linux](#example-5-linux)
-- [Windows](#example-6-windows)
-
-### Example 1: _Customadv_
-
-via Bicep module
-
-```bicep
-module dataCollectionRule 'br:bicep/modules/insights.data-collection-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcrcusadv'
- params: {
- // Required parameters
- dataFlows: [
- {
- destinations: [
- '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
- "dataFlows": {
- "value": [
- {
- "destinations": [
- "via Bicep module
-
-```bicep
-module dataCollectionRule 'br:bicep/modules/insights.data-collection-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcrcusbas'
- params: {
- // Required parameters
- dataFlows: [
- {
- destinations: [
- '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
- "dataFlows": {
- "value": [
- {
- "destinations": [
- "via Bicep module
-
-```bicep
-module dataCollectionRule 'br:bicep/modules/insights.data-collection-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcrcusiis'
- params: {
- // Required parameters
- dataFlows: [
- {
- destinations: [
- '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
- "dataFlows": {
- "value": [
- {
- "destinations": [
- "via Bicep module
-
-```bicep
-module dataCollectionRule 'br:bicep/modules/insights.data-collection-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcrmin'
- params: {
- // Required parameters
- dataFlows: [
- {
- destinations: [
- 'azureMonitorMetrics-default'
- ]
- streams: [
- 'Microsoft-InsightsMetrics'
- ]
- }
- ]
- dataSources: {
- performanceCounters: [
- {
- counterSpecifiers: [
- '\\Process(_Total)\\Handle Count'
- '\\Process(_Total)\\Thread Count'
- '\\Processor Information(_Total)\\% Privileged Time'
- '\\Processor Information(_Total)\\% Processor Time'
- '\\Processor Information(_Total)\\% User Time'
- '\\Processor Information(_Total)\\Processor Frequency'
- '\\System\\Context Switches/sec'
- '\\System\\Processes'
- '\\System\\Processor Queue Length'
- '\\System\\System Up Time'
- ]
- name: 'perfCounterDataSource60'
- samplingFrequencyInSeconds: 60
- streams: [
- 'Microsoft-InsightsMetrics'
- ]
- }
- ]
- }
- destinations: {
- azureMonitorMetrics: {
- name: 'azureMonitorMetrics-default'
- }
- }
- name: 'idcrmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "dataFlows": {
- "value": [
- {
- "destinations": [
- "azureMonitorMetrics-default"
- ],
- "streams": [
- "Microsoft-InsightsMetrics"
- ]
- }
- ]
- },
- "dataSources": {
- "value": {
- "performanceCounters": [
- {
- "counterSpecifiers": [
- "\\Process(_Total)\\Handle Count",
- "\\Process(_Total)\\Thread Count",
- "\\Processor Information(_Total)\\% Privileged Time",
- "\\Processor Information(_Total)\\% Processor Time",
- "\\Processor Information(_Total)\\% User Time",
- "\\Processor Information(_Total)\\Processor Frequency",
- "\\System\\Context Switches/sec",
- "\\System\\Processes",
- "\\System\\Processor Queue Length",
- "\\System\\System Up Time"
- ],
- "name": "perfCounterDataSource60",
- "samplingFrequencyInSeconds": 60,
- "streams": [
- "Microsoft-InsightsMetrics"
- ]
- }
- ]
- }
- },
- "destinations": {
- "value": {
- "azureMonitorMetrics": {
- "name": "azureMonitorMetrics-default"
- }
- }
- },
- "name": {
- "value": "idcrmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module dataCollectionRule 'br:bicep/modules/insights.data-collection-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcrlin'
- params: {
- // Required parameters
- dataFlows: [
- {
- destinations: [
- 'azureMonitorMetrics-default'
- ]
- streams: [
- 'Microsoft-InsightsMetrics'
- ]
- }
- {
- destinations: [
- '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
- "dataFlows": {
- "value": [
- {
- "destinations": [
- "azureMonitorMetrics-default"
- ],
- "streams": [
- "Microsoft-InsightsMetrics"
- ]
- },
- {
- "destinations": [
- "via Bicep module
-
-```bicep
-module dataCollectionRule 'br:bicep/modules/insights.data-collection-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idcrwin'
- params: {
- // Required parameters
- dataFlows: [
- {
- destinations: [
- 'azureMonitorMetrics-default'
- ]
- streams: [
- 'Microsoft-InsightsMetrics'
- ]
- }
- {
- destinations: [
- '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
- "dataFlows": {
- "value": [
- {
- "destinations": [
- "azureMonitorMetrics-default"
- ],
- "streams": [
- "Microsoft-InsightsMetrics"
- ]
- },
- {
- "destinations": [
- "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/insights/diagnostic-setting](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/diagnostic-setting).**
-This module deploys a Subscription wide export of the Activity Log.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/diagnostic-setting).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.diagnostic-setting:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module diagnosticSetting 'br:bicep/modules/insights.diagnostic-setting:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idsmax'
- params: {
- enableDefaultTelemetry: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module diagnosticSetting 'br:bicep/modules/insights.diagnostic-setting:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-idswaf'
- params: {
- enableDefaultTelemetry: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Metric Alert.
+**This module has been evolved into the following AVM module: [avm/res/insights/metric-alert](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/metric-alert).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/metric-alert).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/metricAlerts` | [2018-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2018-03-01/metricAlerts) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.metric-alert:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module metricAlert 'br:bicep/modules/insights.metric-alert:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-imamax'
- params: {
- // Required parameters
- criterias: [
- {
- criterionType: 'StaticThresholdCriterion'
- metricName: 'Percentage CPU'
- metricNamespace: 'microsoft.compute/virtualmachines'
- name: 'HighCPU'
- operator: 'GreaterThan'
- threshold: '90'
- timeAggregation: 'Average'
- }
- ]
- name: 'imamax001'
- // Non-required parameters
- actions: [
- '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
- "criterias": {
- "value": [
- {
- "criterionType": "StaticThresholdCriterion",
- "metricName": "Percentage CPU",
- "metricNamespace": "microsoft.compute/virtualmachines",
- "name": "HighCPU",
- "operator": "GreaterThan",
- "threshold": "90",
- "timeAggregation": "Average"
- }
- ]
- },
- "name": {
- "value": "imamax001"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "via Bicep module
-
-```bicep
-module metricAlert 'br:bicep/modules/insights.metric-alert:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-imawaf'
- params: {
- // Required parameters
- criterias: [
- {
- criterionType: 'StaticThresholdCriterion'
- metricName: 'Percentage CPU'
- metricNamespace: 'microsoft.compute/virtualmachines'
- name: 'HighCPU'
- operator: 'GreaterThan'
- threshold: '90'
- timeAggregation: 'Average'
- }
- ]
- name: 'imawaf001'
- // Non-required parameters
- actions: [
- '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
- "criterias": {
- "value": [
- {
- "criterionType": "StaticThresholdCriterion",
- "metricName": "Percentage CPU",
- "metricNamespace": "microsoft.compute/virtualmachines",
- "name": "HighCPU",
- "operator": "GreaterThan",
- "threshold": "90",
- "timeAggregation": "Average"
- }
- ]
- },
- "name": {
- "value": "imawaf001"
- },
- // Non-required parameters
- "actions": {
- "value": [
- "⚠️ Moved to AVM ⚠️
-This module deploys an Azure Monitor Private Link Scope.
+**This module has been evolved into the following AVM module: [avm/res/insights/private-link-scope](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/private-link-scope).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/private-link-scope).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `microsoft.insights/privateLinkScopes` | [2019-10-17-preview](https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/2019-10-17-preview/privateLinkScopes) |
-| `Microsoft.Insights/privateLinkScopes/scopedResources` | [2021-07-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-07-01-preview/privateLinkScopes/scopedResources) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.private-link-scope:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
- name: '${uniqueString(deployment().name, location)}-test-iplsmin'
- params: {
- // Required parameters
- name: 'iplsmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "iplsmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
- name: '${uniqueString(deployment().name, location)}-test-iplsmax'
- params: {
- // Required parameters
- name: 'iplsmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "iplsmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
- name: '${uniqueString(deployment().name, location)}-test-iplswaf'
- params: {
- // Required parameters
- name: 'iplswaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "iplswaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Scheduled Query Rule.
+**This module has been evolved into the following AVM module: [avm/res/insights/scheduled-query-rule](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/scheduled-query-rule).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/scheduled-query-rule).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/scheduledQueryRules` | [2021-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-02-01-preview/scheduledQueryRules) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.scheduled-query-rule:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module scheduledQueryRule 'br:bicep/modules/insights.scheduled-query-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-isqrmax'
- params: {
- // Required parameters
- criterias: {
- allOf: [
- {
- dimensions: [
- {
- name: 'Computer'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- {
- name: 'InstanceName'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- ]
- metricMeasureColumn: 'AggregatedValue'
- operator: 'GreaterThan'
- query: 'Perf | where ObjectName == \'LogicalDisk\' | where CounterName == \'% Free Space\' | where InstanceName <> \'HarddiskVolume1\' and InstanceName <> \'_Total\' | summarize AggregatedValue = min(CounterValue) by Computer InstanceName bin(TimeGenerated5m)'
- threshold: 0
- timeAggregation: 'Average'
- }
- ]
- }
- name: 'isqrmax001'
- scopes: [
- '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
- "criterias": {
- "value": {
- "allOf": [
- {
- "dimensions": [
- {
- "name": "Computer",
- "operator": "Include",
- "values": [
- "*"
- ]
- },
- {
- "name": "InstanceName",
- "operator": "Include",
- "values": [
- "*"
- ]
- }
- ],
- "metricMeasureColumn": "AggregatedValue",
- "operator": "GreaterThan",
- "query": "Perf | where ObjectName == \"LogicalDisk\" | where CounterName == \"% Free Space\" | where InstanceName <> \"HarddiskVolume1\" and InstanceName <> \"_Total\" | summarize AggregatedValue = min(CounterValue) by Computer, InstanceName, bin(TimeGenerated,5m)",
- "threshold": 0,
- "timeAggregation": "Average"
- }
- ]
- }
- },
- "name": {
- "value": "isqrmax001"
- },
- "scopes": {
- "value": [
- "via Bicep module
-
-```bicep
-module scheduledQueryRule 'br:bicep/modules/insights.scheduled-query-rule:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-isqrwaf'
- params: {
- // Required parameters
- criterias: {
- allOf: [
- {
- dimensions: [
- {
- name: 'Computer'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- {
- name: 'InstanceName'
- operator: 'Include'
- values: [
- '*'
- ]
- }
- ]
- metricMeasureColumn: 'AggregatedValue'
- operator: 'GreaterThan'
- query: 'Perf | where ObjectName == \'LogicalDisk\' | where CounterName == \'% Free Space\' | where InstanceName <> \'HarddiskVolume1\' and InstanceName <> \'_Total\' | summarize AggregatedValue = min(CounterValue) by Computer InstanceName bin(TimeGenerated5m)'
- threshold: 0
- timeAggregation: 'Average'
- }
- ]
- }
- name: 'isqrwaf001'
- scopes: [
- '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
- "criterias": {
- "value": {
- "allOf": [
- {
- "dimensions": [
- {
- "name": "Computer",
- "operator": "Include",
- "values": [
- "*"
- ]
- },
- {
- "name": "InstanceName",
- "operator": "Include",
- "values": [
- "*"
- ]
- }
- ],
- "metricMeasureColumn": "AggregatedValue",
- "operator": "GreaterThan",
- "query": "Perf | where ObjectName == \"LogicalDisk\" | where CounterName == \"% Free Space\" | where InstanceName <> \"HarddiskVolume1\" and InstanceName <> \"_Total\" | summarize AggregatedValue = min(CounterValue) by Computer, InstanceName, bin(TimeGenerated,5m)",
- "threshold": 0,
- "timeAggregation": "Average"
- }
- ]
- }
- },
- "name": {
- "value": "isqrwaf001"
- },
- "scopes": {
- "value": [
- "⚠️ Moved to AVM ⚠️
-This module deploys a Web Test.
+**This module has been evolved into the following AVM module: [avm/res/insights/webtest](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/insights/webtest).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/insights/webtest).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/webtests` | [2022-06-15](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2022-06-15/webtests) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/insights.webtest:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module webtest 'br:bicep/modules/insights.webtest:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-iwtmin'
- params: {
- // Required parameters
- name: 'iwtmin001'
- request: {
- HttpVerb: 'GET'
- RequestUrl: 'https://learn.microsoft.com/en-us/'
- }
- tags: {
- 'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
- 'hidden-title': 'This is visible in the resource name'
- }
- webTestName: 'wt$iwtmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "iwtmin001"
- },
- "request": {
- "value": {
- "HttpVerb": "GET",
- "RequestUrl": "https://learn.microsoft.com/en-us/"
- }
- },
- "tags": {
- "value": {
- "hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource",
- "hidden-title": "This is visible in the resource name"
- }
- },
- "webTestName": {
- "value": "wt$iwtmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module webtest 'br:bicep/modules/insights.webtest:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-iwtmax'
- params: {
- // Required parameters
- name: 'iwtmax001'
- request: {
- HttpVerb: 'GET'
- RequestUrl: 'https://learn.microsoft.com/en-us/'
- }
- tags: {
- 'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
- 'hidden-title': 'This is visible in the resource name'
- }
- webTestName: 'wt$iwtmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "iwtmax001"
- },
- "request": {
- "value": {
- "HttpVerb": "GET",
- "RequestUrl": "https://learn.microsoft.com/en-us/"
- }
- },
- "tags": {
- "value": {
- "hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource",
- "hidden-title": "This is visible in the resource name"
- }
- },
- "webTestName": {
- "value": "wt$iwtmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module webtest 'br:bicep/modules/insights.webtest:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-iwtwaf'
- params: {
- // Required parameters
- name: 'iwtwaf001'
- request: {
- HttpVerb: 'GET'
- RequestUrl: 'https://learn.microsoft.com/en-us/'
- }
- tags: {
- 'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
- 'hidden-title': 'This is visible in the resource name'
- }
- webTestName: 'wt$iwtwaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "iwtwaf001"
- },
- "request": {
- "value": {
- "HttpVerb": "GET",
- "RequestUrl": "https://learn.microsoft.com/en-us/"
- }
- },
- "tags": {
- "value": {
- "hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource",
- "hidden-title": "This is visible in the resource name"
- }
- },
- "webTestName": {
- "value": "wt$iwtwaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/key-vault/vault](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/key-vault/vault).**
-This module deploys a Key Vault.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/key-vault/vault).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.KeyVault/vaults` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults) |
-| `Microsoft.KeyVault/vaults/accessPolicies` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults/accessPolicies) |
-| `Microsoft.KeyVault/vaults/keys` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults/keys) |
-| `Microsoft.KeyVault/vaults/secrets` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KeyVault/2022-07-01/vaults/secrets) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/key-vault.vault:1.0.0`.
-
-- [Accesspolicies](#example-1-accesspolicies)
-- [Using only defaults](#example-2-using-only-defaults)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [Pe](#example-4-pe)
-- [WAF-aligned](#example-5-waf-aligned)
-
-### Example 1: _Accesspolicies_
-
-via Bicep module
-
-```bicep
-module vault 'br:bicep/modules/key-vault.vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kvvap'
- params: {
- // Required parameters
- name: 'kvvap002'
- // Non-required parameters
- accessPolicies: [
- {
- objectId: '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": "kvvap002"
- },
- // Non-required parameters
- "accessPolicies": {
- "value": [
- {
- "objectId": "via Bicep module
-
-```bicep
-module vault 'br:bicep/modules/key-vault.vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kvvmin'
- params: {
- // Required parameters
- name: 'kvvmin002'
- // Non-required parameters
- enableDefaultTelemetry: '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": "kvvmin002"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module vault 'br:bicep/modules/key-vault.vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kvvmax'
- params: {
- // Required parameters
- name: 'kvvmax002'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "name": {
- "value": "kvvmax002"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module vault 'br:bicep/modules/key-vault.vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kvvpe'
- params: {
- // Required parameters
- name: 'kvvpe001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "kvvpe001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module vault 'br:bicep/modules/key-vault.vault:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kvvwaf'
- params: {
- // Required parameters
- name: 'kvvwaf002'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "name": {
- "value": "kvvwaf002"
- },
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "Parameter JSON format
-
-```json
-"rotationPolicy": {
- "value": {
- "attributes": {
- "expiryTime": "P2Y"
- },
- "lifetimeActions": [
- {
- "trigger": {
- "timeBeforeExpiry": "P2M"
- },
- "action": {
- "type": "Rotate"
- }
- },
- {
- "trigger": {
- "timeBeforeExpiry": "P30D"
- },
- "action": {
- "type": "Notify"
- }
- }
- ]
- }
-}
-```
-
-Bicep format
-
-```bicep
-rotationPolicy: {
- attributes: {
- expiryTime: 'P2Y'
- }
- lifetimeActions: [
- {
- trigger: {
- timeBeforeExpiry: 'P2M'
- }
- action: {
- type: 'Rotate'
- }
- }
- {
- trigger: {
- timeBeforeExpiry: 'P30D'
- }
- action: {
- type: 'Notify'
- }
- }
- ]
-}
-```
-
-⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/kubernetes-configuration/extension](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/kubernetes-configuration/extension).**
-This module deploys a Kubernetes Configuration Extension.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/kubernetes-configuration/extension).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.KubernetesConfiguration/extensions` | [2022-03-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/2022-03-01/extensions) |
-| `Microsoft.KubernetesConfiguration/fluxConfigurations` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/fluxConfigurations) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/kubernetes-configuration.extension:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module extension 'br:bicep/modules/kubernetes-configuration.extension:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kcemin'
- params: {
- // Required parameters
- clusterName: '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
- "clusterName": {
- "value": "via Bicep module
-
-```bicep
-module extension 'br:bicep/modules/kubernetes-configuration.extension:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kcemax'
- params: {
- // Required parameters
- clusterName: '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
- "clusterName": {
- "value": "via Bicep module
-
-```bicep
-module extension 'br:bicep/modules/kubernetes-configuration.extension:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kcewaf'
- params: {
- // Required parameters
- clusterName: '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
- "clusterName": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/kubernetes-configuration/flux-configuration](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/kubernetes-configuration/flux-configuration).**
-This module deploys a Kubernetes Configuration Flux Configuration.
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/kubernetes-configuration/flux-configuration).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.KubernetesConfiguration/fluxConfigurations` | [2023-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.KubernetesConfiguration/fluxConfigurations) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/kubernetes-configuration.flux-configuration:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module fluxConfiguration 'br:bicep/modules/kubernetes-configuration.flux-configuration:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kcfcmin'
- params: {
- // Required parameters
- clusterName: '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
- "clusterName": {
- "value": "via Bicep module
-
-```bicep
-module fluxConfiguration 'br:bicep/modules/kubernetes-configuration.flux-configuration:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kcfcmax'
- params: {
- // Required parameters
- clusterName: '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
- "clusterName": {
- "value": "via Bicep module
-
-```bicep
-module fluxConfiguration 'br:bicep/modules/kubernetes-configuration.flux-configuration:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-kcfcwaf'
- params: {
- // Required parameters
- clusterName: '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
- "clusterName": {
- "value": "⚠️ Moved to AVM ⚠️
-> This module has already been migrated to [AVM](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res). Only the AVM version is expected to receive updates / new features. Please do not work on improving this module in [CARML](https://aka.ms/carml).
+**This module has been evolved into the following AVM module: [avm/res/logic/workflow](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/logic/workflow).**
-This module deploys a Logic App (Workflow).
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/logic/workflow).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Logic/workflows` | [2019-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Logic/2019-05-01/workflows) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/logic.workflow:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module workflow 'br:bicep/modules/logic.workflow:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-lwmax'
- params: {
- // Required parameters
- name: 'lwmax001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "lwmax001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "via Bicep module
-
-```bicep
-module workflow 'br:bicep/modules/logic.workflow:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-lwwaf'
- params: {
- // Required parameters
- name: 'lwwaf001'
- // Non-required parameters
- diagnosticSettings: [
- {
- eventHubAuthorizationRuleResourceId: '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": "lwwaf001"
- },
- // Non-required parameters
- "diagnosticSettings": {
- "value": [
- {
- "eventHubAuthorizationRuleResourceId": "Parameter JSON format
-
-```json
-"Bicep format
-
-```bicep
-'Parameter JSON format
-
-```json
-"Bicep format
-
-```bicep
-'⚠️ Moved to AVM ⚠️
-This module deploys a Machine Learning Services Workspace.
+**This module has been evolved into the following AVM module: [avm/res/machine-learning-services/workspace](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/machine-learning-services/workspace).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/machine-learning-services/workspace).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.MachineLearningServices/workspaces` | [2022-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-10-01/workspaces) |
-| `Microsoft.MachineLearningServices/workspaces/computes` | [2022-10-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.MachineLearningServices/2022-10-01/workspaces/computes) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/machine-learning-services.workspace:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Encr](#example-2-encr)
-- [Using large parameter set](#example-3-using-large-parameter-set)
-- [WAF-aligned](#example-4-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/machine-learning-services.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mlswmin'
- params: {
- // Required parameters
- associatedApplicationInsightsResourceId: '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
- "associatedApplicationInsightsResourceId": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/machine-learning-services.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mlswecr'
- params: {
- // Required parameters
- associatedApplicationInsightsResourceId: '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
- "associatedApplicationInsightsResourceId": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/machine-learning-services.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mlswmax'
- params: {
- // Required parameters
- associatedApplicationInsightsResourceId: '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
- "associatedApplicationInsightsResourceId": {
- "value": "via Bicep module
-
-```bicep
-module workspace 'br:bicep/modules/machine-learning-services.workspace:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mlswwaf'
- params: {
- // Required parameters
- associatedApplicationInsightsResourceId: '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
- "associatedApplicationInsightsResourceId": {
- "value": "Parameter JSON format
-
-```json
-"computes": {
- "value": [
- // Attach existing resources
- {
- "name": "DefaultAKS",
- "location": "westeurope",
- "description": "Default AKS Cluster",
- "disableLocalAuth": false,
- "deployCompute": true,
- "computeType": "AKS",
- "resourceId": "/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.ContainerService/managedClusters/xxx"
- },
- // Create new compute resource
- {
- "name": "DefaultCPU",
- "location": "westeurope",
- "computeLocation": "westeurope",
- "sku": "Basic",
- "systemAssignedIdentity": true,
- "userAssignedIdentities": {
- "/subscriptions/[[subscriptionId]]/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-[[namePrefix]]-az-msi-x-001": {}
- },
- "description": "Default CPU Cluster",
- "disableLocalAuth": false,
- "computeType": "AmlCompute",
- "properties": {
- "enableNodePublicIp": true,
- "isolatedNetwork": false,
- "osType": "Linux",
- "remoteLoginPortPublicAccess": "Disabled",
- "scaleSettings": {
- "maxNodeCount": 3,
- "minNodeCount": 0,
- "nodeIdleTimeBeforeScaleDown": "PT5M"
- },
- "vmPriority": "Dedicated",
- "vmSize": "STANDARD_DS11_V2"
- }
- }
- ]
-}
-```
-
-Bicep format
-
-```bicep
-computes: [
- // Attach existing resources
- {
- name: 'DefaultAKS'
- location: 'westeurope'
- description: 'Default AKS Cluster'
- disableLocalAuth: false
- deployCompute: true
- computeType: 'AKS'
- resourceId: '/subscriptions/[[subscriptionId]]/resourceGroups/validation-rg/providers/Microsoft.ContainerService/managedClusters/xxx'
- }
- // Create new compute resource
- {
- name: 'DefaultCPU'
- location: 'westeurope'
- computeLocation: 'westeurope'
- sku: 'Basic'
- systemAssignedIdentity: true
- userAssignedIdentities: {
- '/subscriptions/[[subscriptionId]]/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-[[namePrefix]]-az-msi-x-001': {}
- }
- description: 'Default CPU Cluster'
- disableLocalAuth: false
- computeType: 'AmlCompute'
- properties: {
- enableNodePublicIp: true
- isolatedNetwork: false
- osType: 'Linux'
- remoteLoginPortPublicAccess: 'Disabled'
- scaleSettings: {
- maxNodeCount: 3
- minNodeCount: 0
- nodeIdleTimeBeforeScaleDown: 'PT5M'
- }
- vmPriority: 'Dedicated'
- vmSize: 'STANDARD_DS11_V2'
- }
- }
-]
-```
-
-⚠️ Moved to AVM ⚠️
-This module deploys a Maintenance Configuration.
+**This module has been evolved into the following AVM module: [avm/res/maintenance/maintenance-configuration](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/maintenance/maintenance-configuration).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/maintenance/maintenance-configuration).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Maintenance/maintenanceConfigurations` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Maintenance/2023-04-01/maintenanceConfigurations) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/maintenance.maintenance-configuration:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module maintenanceConfiguration 'br:bicep/modules/maintenance.maintenance-configuration:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mmcmin'
- params: {
- // Required parameters
- name: 'mmcmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "mmcmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module maintenanceConfiguration 'br:bicep/modules/maintenance.maintenance-configuration:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mmcmax'
- params: {
- // Required parameters
- name: 'mmcmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "mmcmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module maintenanceConfiguration 'br:bicep/modules/maintenance.maintenance-configuration:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-mmcwaf'
- params: {
- // Required parameters
- name: 'mmcwaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "mmcwaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a User Assigned Identity.
+**This module has been evolved into the following AVM module: [avm/res/managed-identity/user-assigned-identity](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/managed-identity/user-assigned-identity).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/managed-identity/user-assigned-identity).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.ManagedIdentity/userAssignedIdentities` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ManagedIdentity/2023-01-31/userAssignedIdentities) |
-| `Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials` | [2023-01-31](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ManagedIdentity/2023-01-31/userAssignedIdentities/federatedIdentityCredentials) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/managed-identity.user-assigned-identity:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module userAssignedIdentity 'br:bicep/modules/managed-identity.user-assigned-identity:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-miuaimin'
- params: {
- enableDefaultTelemetry: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module userAssignedIdentity 'br:bicep/modules/managed-identity.user-assigned-identity:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-miuaimax'
- params: {
- enableDefaultTelemetry: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module userAssignedIdentity 'br:bicep/modules/managed-identity.user-assigned-identity:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-miuaiwaf'
- params: {
- enableDefaultTelemetry: 'via JSON Parameter file
-
-```json
-{
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a `Registration Definition` and a `Registration Assignment` (often referred to as 'Lighthouse' or 'resource delegation')
-on subscription or resource group scopes. This type of delegation is very similar to role assignments but here the principal that is
-assigned a role is in a remote/managing Azure Active Directory tenant. The templates are run towards the tenant where
-the Azure resources you want to delegate access to are, providing 'authorizations' (aka. access delegation) to principals in a
-remote/managing tenant.
+**This module has been evolved into the following AVM module: [avm/res/managed-services/registration-definition](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/managed-services/registration-definition).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/managed-services/registration-definition).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.ManagedServices/registrationAssignments` | [2019-09-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ManagedServices/2019-09-01/registrationAssignments) |
-| `Microsoft.ManagedServices/registrationDefinitions` | [2019-09-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.ManagedServices/2019-09-01/registrationDefinitions) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/managed-services.registration-definition:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [Rg](#example-2-rg)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module registrationDefinition 'br:bicep/modules/managed-services.registration-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-msrdmax'
- params: {
- // Required parameters
- authorizations: [
- {
- principalId: '<< SET YOUR PRINCIPAL ID 1 HERE >>'
- principalIdDisplayName: 'ResourceModules-Reader'
- roleDefinitionId: 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
- }
- {
- principalId: '<< SET YOUR PRINCIPAL ID 2 HERE >>'
- principalIdDisplayName: 'ResourceModules-Contributor'
- roleDefinitionId: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- }
- {
- principalId: '<< SET YOUR PRINCIPAL ID 3 HERE >>'
- principalIdDisplayName: 'ResourceModules-LHManagement'
- roleDefinitionId: '91c1777a-f3dc-4fae-b103-61d183457e46'
- }
- ]
- managedByTenantId: '<< SET YOUR TENANT ID HERE >>'
- name: 'Component Validation - msrdmax Subscription assignment'
- registrationDescription: 'Managed by Lighthouse'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "authorizations": {
- "value": [
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 1 HERE >>",
- "principalIdDisplayName": "ResourceModules-Reader",
- "roleDefinitionId": "acdd72a7-3385-48ef-bd42-f606fba81ae7"
- },
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 2 HERE >>",
- "principalIdDisplayName": "ResourceModules-Contributor",
- "roleDefinitionId": "b24988ac-6180-42a0-ab88-20f7382dd24c"
- },
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 3 HERE >>",
- "principalIdDisplayName": "ResourceModules-LHManagement",
- "roleDefinitionId": "91c1777a-f3dc-4fae-b103-61d183457e46"
- }
- ]
- },
- "managedByTenantId": {
- "value": "<< SET YOUR TENANT ID HERE >>"
- },
- "name": {
- "value": "Component Validation - msrdmax Subscription assignment"
- },
- "registrationDescription": {
- "value": "Managed by Lighthouse"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module registrationDefinition 'br:bicep/modules/managed-services.registration-definition:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-msrdrg'
- params: {
- // Required parameters
- authorizations: [
- {
- principalId: '<< SET YOUR PRINCIPAL ID 1 HERE >>'
- principalIdDisplayName: 'ResourceModules-Reader'
- roleDefinitionId: 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
- }
- {
- principalId: '<< SET YOUR PRINCIPAL ID 2 HERE >>'
- principalIdDisplayName: 'ResourceModules-Contributor'
- roleDefinitionId: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- }
- {
- principalId: '<< SET YOUR PRINCIPAL ID 3 HERE >>'
- principalIdDisplayName: 'ResourceModules-LHManagement'
- roleDefinitionId: '91c1777a-f3dc-4fae-b103-61d183457e46'
- }
- ]
- managedByTenantId: '<< SET YOUR TENANT ID HERE >>'
- name: 'Component Validation - msrdrg Resource group assignment'
- registrationDescription: 'Managed by Lighthouse'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "authorizations": {
- "value": [
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 1 HERE >>",
- "principalIdDisplayName": "ResourceModules-Reader",
- "roleDefinitionId": "acdd72a7-3385-48ef-bd42-f606fba81ae7"
- },
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 2 HERE >>",
- "principalIdDisplayName": "ResourceModules-Contributor",
- "roleDefinitionId": "b24988ac-6180-42a0-ab88-20f7382dd24c"
- },
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 3 HERE >>",
- "principalIdDisplayName": "ResourceModules-LHManagement",
- "roleDefinitionId": "91c1777a-f3dc-4fae-b103-61d183457e46"
- }
- ]
- },
- "managedByTenantId": {
- "value": "<< SET YOUR TENANT ID HERE >>"
- },
- "name": {
- "value": "Component Validation - msrdrg Resource group assignment"
- },
- "registrationDescription": {
- "value": "Managed by Lighthouse"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module registrationDefinition 'br:bicep/modules/managed-services.registration-definition:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-msrdwaf'
- params: {
- // Required parameters
- authorizations: [
- {
- principalId: '<< SET YOUR PRINCIPAL ID 1 HERE >>'
- principalIdDisplayName: 'ResourceModules-Reader'
- roleDefinitionId: 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
- }
- {
- principalId: '<< SET YOUR PRINCIPAL ID 2 HERE >>'
- principalIdDisplayName: 'ResourceModules-Contributor'
- roleDefinitionId: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
- }
- {
- principalId: '<< SET YOUR PRINCIPAL ID 3 HERE >>'
- principalIdDisplayName: 'ResourceModules-LHManagement'
- roleDefinitionId: '91c1777a-f3dc-4fae-b103-61d183457e46'
- }
- ]
- managedByTenantId: '<< SET YOUR TENANT ID HERE >>'
- name: 'Component Validation - msrdwaf Subscription assignment'
- registrationDescription: 'Managed by Lighthouse'
- // Non-required parameters
- enableDefaultTelemetry: '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
- "authorizations": {
- "value": [
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 1 HERE >>",
- "principalIdDisplayName": "ResourceModules-Reader",
- "roleDefinitionId": "acdd72a7-3385-48ef-bd42-f606fba81ae7"
- },
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 2 HERE >>",
- "principalIdDisplayName": "ResourceModules-Contributor",
- "roleDefinitionId": "b24988ac-6180-42a0-ab88-20f7382dd24c"
- },
- {
- "principalId": "<< SET YOUR PRINCIPAL ID 3 HERE >>",
- "principalIdDisplayName": "ResourceModules-LHManagement",
- "roleDefinitionId": "91c1777a-f3dc-4fae-b103-61d183457e46"
- }
- ]
- },
- "managedByTenantId": {
- "value": "<< SET YOUR TENANT ID HERE >>"
- },
- "name": {
- "value": "Component Validation - msrdwaf Subscription assignment"
- },
- "registrationDescription": {
- "value": "Managed by Lighthouse"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This template will prepare the management group structure based on the provided parameter.
+**This module has been evolved into the following AVM module: [avm/res/management/management-group](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/management/management-group).**
-This module has some known **limitations**:
-- It's not possible to change the display name of the root management group (the one that has the tenant GUID as ID)
-- It can't manage the Root (/) management group
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/management/management-group).
-## Navigation
-
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-- [Notes](#Notes)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Management/managementGroups` | [2021-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Management/2021-04-01/managementGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/management.management-group:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Using large parameter set](#example-2-using-large-parameter-set)
-- [WAF-aligned](#example-3-waf-aligned)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module managementGroup 'br:bicep/modules/management.management-group:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-mmgmin'
- params: {
- // Required parameters
- name: 'mmgmin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "mmgmin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module managementGroup 'br:bicep/modules/management.management-group:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-mmgmax'
- params: {
- // Required parameters
- name: 'mmgmax001'
- // Non-required parameters
- displayName: 'Test MG'
- enableDefaultTelemetry: '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": "mmgmax001"
- },
- // Non-required parameters
- "displayName": {
- "value": "Test MG"
- },
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module managementGroup 'br:bicep/modules/management.management-group:1.0.0' = {
- name: '${uniqueString(deployment().name)}-test-mmgwaf'
- params: {
- // Required parameters
- name: 'mmgwaf001'
- // Non-required parameters
- displayName: 'Test MG'
- enableDefaultTelemetry: '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": "mmgwaf001"
- },
- // Non-required parameters
- "displayName": {
- "value": "Test MG"
- },
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys an Azure NetApp File.
+**This module has been evolved into the following AVM module: [avm/res/net-app/net-app-account](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/net-app/net-app-account).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/net-app/net-app-account).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.NetApp/netAppAccounts` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts) |
-| `Microsoft.NetApp/netAppAccounts/capacityPools` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools) |
-| `Microsoft.NetApp/netAppAccounts/capacityPools/volumes` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.NetApp/netAppAccounts/capacityPools/volumes) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/net-app.net-app-account:1.0.0`.
-
-- [Using only defaults](#example-1-using-only-defaults)
-- [Nfs3](#example-2-nfs3)
-- [Nfs41](#example-3-nfs41)
-
-### Example 1: _Using only defaults_
-
-This instance deploys the module with the minimum set of required parameters.
-
-
-via Bicep module
-
-```bicep
-module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-nanaamin'
- params: {
- // Required parameters
- name: 'nanaamin001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "nanaamin001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-nanaanfs3'
- params: {
- // Required parameters
- name: 'nanaanfs3001'
- // Non-required parameters
- capacityPools: [
- {
- name: 'nanaanfs3-cp-001'
- roleAssignments: [
- {
- principalId: '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": "nanaanfs3001"
- },
- // Non-required parameters
- "capacityPools": {
- "value": [
- {
- "name": "nanaanfs3-cp-001",
- "roleAssignments": [
- {
- "principalId": "via Bicep module
-
-```bicep
-module netAppAccount 'br:bicep/modules/net-app.net-app-account:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-nanaanfs41'
- params: {
- // Required parameters
- name: 'nanaanfs41001'
- // Non-required parameters
- capacityPools: [
- {
- name: 'nanaanfs41-cp-001'
- roleAssignments: [
- {
- principalId: '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": "nanaanfs41001"
- },
- // Non-required parameters
- "capacityPools": {
- "value": [
- {
- "name": "nanaanfs41-cp-001",
- "roleAssignments": [
- {
- "principalId": "⚠️ Moved to AVM ⚠️
-This module deploys an Application Gateway Web Application Firewall (WAF) Policy.
+**This module has been evolved into the following AVM module: [avm/res/network/application-gateway-web-application-firewall-policy](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/network/application-gateway-web-application-firewall-policy).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/network/application-gateway-web-application-firewall-policy).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` | [2022-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-11-01/ApplicationGatewayWebApplicationFirewallPolicies) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/network.application-gateway-web-application-firewall-policy:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module applicationGatewayWebApplicationFirewallPolicy 'br:bicep/modules/network.application-gateway-web-application-firewall-policy:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-nagwafpmax'
- params: {
- // Required parameters
- name: 'nagwafpmax001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "nagwafpmax001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "via Bicep module
-
-```bicep
-module applicationGatewayWebApplicationFirewallPolicy 'br:bicep/modules/network.application-gateway-web-application-firewall-policy:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-nagwafpwaf'
- params: {
- // Required parameters
- name: 'nagwafpwaf001'
- // Non-required parameters
- enableDefaultTelemetry: '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": "nagwafpwaf001"
- },
- // Non-required parameters
- "enableDefaultTelemetry": {
- "value": "⚠️ Moved to AVM ⚠️
-This module deploys a Network Application Gateway.
+**This module has been evolved into the following AVM module: [avm/res/network/application-gateway](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/network/application-gateway).**
-## Navigation
+The source code of this module has been removed from the main branch of this repository. If for any reason, you still need to access the CARML version of the module, you can find it [here](https://github.com/Azure/ResourceModules/tree/module-archive/modules/network/application-gateway).
-- [Resource Types](#Resource-Types)
-- [Usage examples](#Usage-examples)
-- [Parameters](#Parameters)
-- [Outputs](#Outputs)
-- [Cross-referenced modules](#Cross-referenced-modules)
-
-## Resource Types
-
-| Resource Type | API Version |
-| :-- | :-- |
-| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
-| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
-| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
-| `Microsoft.Network/applicationGateways` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/applicationGateways) |
-| `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) |
-| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) |
-
-## Usage examples
-
-The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
-
->**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
-
->**Note**: To reference the module, please use the following syntax `br:bicep/modules/network.application-gateway:1.0.0`.
-
-- [Using large parameter set](#example-1-using-large-parameter-set)
-- [WAF-aligned](#example-2-waf-aligned)
-
-### Example 1: _Using large parameter set_
-
-This instance deploys the module with most of its features enabled.
-
-
-via Bicep module
-
-```bicep
-module applicationGateway 'br:bicep/modules/network.application-gateway:1.0.0' = {
- name: '${uniqueString(deployment().name, location)}-test-nagmax'
- params: {
- // Required parameters
- name: '