diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a3c49294c5..ac3027914e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -25,6 +25,7 @@ "features": { "azure-cli": "latest", "dotnet": "7.0", - "ghcr.io/devcontainers/features/node:1": "none" + "ghcr.io/devcontainers/features/node:1": {}, + "ghcr.io/devcontainers/features/powershell:1": {} } } diff --git a/.github/ISSUE_TEMPLATE/avm_module_issue.yml b/.github/ISSUE_TEMPLATE/avm_module_issue.yml index 1bd0db172f..292255cd2f 100644 --- a/.github/ISSUE_TEMPLATE/avm_module_issue.yml +++ b/.github/ISSUE_TEMPLATE/avm_module_issue.yml @@ -39,12 +39,17 @@ body: description: Which existing AVM module is this issue related to? options: - "Other, as defined below..." + # - "avm/ptn/avd-lza/insights" + # - "avm/ptn/avd-lza/management-plane" + # - "avm/ptn/avd-lza/networking" + # - "avm/ptn/avd-lza/session-hosts" + # - "avm/ptn/security/security-center" # - "avm/res/aad/domain-service" - "avm/res/analysis-services/server" - "avm/res/api-management/service" + # - "avm/res/app-configuration/configuration-store" # - "avm/res/app/container-app" - "avm/res/app/managed-environment" - # - "avm/res/app-configuration/configuration-store" - "avm/res/automation/automation-account" - "avm/res/batch/batch-account" - "avm/res/cache/redis" @@ -63,10 +68,10 @@ body: # - "avm/res/container-instance/container-group" - "avm/res/container-registry/registry" - "avm/res/container-service/managed-cluster" - - "avm/res/databricks/access-connector" - - "avm/res/databricks/workspace" - "avm/res/data-factory/factory" - "avm/res/data-protection/backup-vault" + - "avm/res/databricks/access-connector" + - "avm/res/databricks/workspace" - "avm/res/db-for-my-sql/flexible-server" - "avm/res/db-for-postgre-sql/flexible-server" # - "avm/res/desktop-virtualization/application-group" @@ -168,11 +173,7 @@ body: - "avm/res/web/serverfarm" - "avm/res/web/site" - "avm/res/web/static-site" - # - "avm/ptn/avd-lza/insights" - # - "avm/ptn/avd-lza/management-plane" - # - "avm/ptn/avd-lza/networking" - # - "avm/ptn/avd-lza/session-hosts" - # - "avm/ptn/security/security-center" + validations: required: true - type: input @@ -201,6 +202,6 @@ body: id: correlation-id attributes: label: (Optional) Correlation Id - description: Please provide a correlation id f available and appropriate. + description: Please provide a correlation id if available and appropriate. validations: required: false diff --git a/.github/actions/templates/avm-validateModuleDeployment/action.yml b/.github/actions/templates/avm-validateModuleDeployment/action.yml index 1ecac1373b..7fec4c6374 100644 --- a/.github/actions/templates/avm-validateModuleDeployment/action.yml +++ b/.github/actions/templates/avm-validateModuleDeployment/action.yml @@ -11,16 +11,17 @@ ## ACTION PARAMETERS ## ##-------------------------------------------## ## -## |=====================================================================================================================================================================================| -## | Parameter | Required | Default | Description | Example | -## |---------------------------|----------|---------|-------------------------------------------------------|----------------------------------------------------------------------------| -## | templateFilePath | true | '' | The path to the template file to use for deployment | 'modules/api-management/service/main.bicep' | -## | location | true | '' | The location to use for deployment | 'WestEurope' | -## | subscriptionId | false | '' | The subscriptionId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | -## | managementGroupId | false | '' | The managementGroupId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | -## | customTokens | false | '' | Additional token pairs in json format. | '{"tokenName":"tokenValue"}' | -## | removeDeployment | false | 'true' | Set "true" to set module up for removal | 'true' | -## |=====================================================================================================================================================================================| +## |======================================================================================================================================================================================| +## | Parameter | Required | Default | Description | Example | +## |----------------------------|----------|---------|-------------------------------------------------------|----------------------------------------------------------------------------| +## | modulePath | true | '' | The path to the module file directory | 'modules/api-management/service/main.bicep' +## | templateFilePath | true | '' | The path to the template file to use for deployment | 'modules/api-management/service/tests/e2e/maix/main.test.bicep' | +## | deploymentMetadataLocation | true | '' | The location to store the deployment metadata | 'WestEurope' | +## | subscriptionId | false | '' | The subscriptionId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | +## | managementGroupId | false | '' | The managementGroupId to deploy to | '1a97b80a-4dda-4f50-ab53-349e29344654' | +## | customTokens | false | '' | Additional token pairs in json format. | '{"tokenName":"tokenValue"}' | +## | removeDeployment | false | 'true' | Set "true" to set module up for removal | 'true' | +## |======================================================================================================================================================================================| ## ######################################################### @@ -28,11 +29,14 @@ name: "Deploy module" description: "Deploy module" inputs: + modulePath: + descriptio: "The path to the module file directory used to determine the resource location" + required: true templateFilePath: description: "The path to the template file to use for deployment" required: true - location: - description: "The location to use for deployment" + deploymentMetadataLocation: + description: "The location to store the deployment metadata" required: true subscriptionId: description: "The subscription ID to deploy to" @@ -59,8 +63,8 @@ runs: # [Set Deployment Location] task(s) # --------------------------- - - name: "Get Deployment Location" - id: get-deployment-location + - name: "Get Resource Location" + id: get-resource-location uses: azure/powershell@v1 with: azPSVersion: "latest" @@ -69,22 +73,22 @@ runs: Write-Output '::group::Get Recommended Regions' # Load used functions - . (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'pipelines' 'e2eValidation' 'regionSelector' 'Get-AzDeploymentRegion.ps1') + . (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'pipelines' 'e2eValidation' 'regionSelector' 'Get-AzAvailableResourceLocation.ps1') # Set fucntion input parameters $functionInput = @{ - usePairedRegionsOnly = $true - useKnownRegionsOnly = $true + ModuleRoot = '${{ inputs.modulePath }}' + GlobalResourceGroupLocation = '${{ inputs.deploymentMetadataLocation }}' } Write-Verbose "Invoke function with" -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose - $location = Get-AzDeploymentRegion @functionInput + $resourceLocation = Get-AzAvailableResourceLocation @functionInput -Verbose $deploymentLocation = @{} - Write-Verbose ('{0}-{1}' -f 'deploymentLocation', $location) -Verbose - Write-Output ('{0}={1}' -f 'deploymentLocation', $location) >> $env:GITHUB_OUTPUT + Write-Verbose ('{0}-{1}' -f 'resourceLocation', $resourceLocation) -Verbose + Write-Output ('{0}={1}' -f 'resourceLocation', $resourceLocation) >> $env:GITHUB_OUTPUT Write-Output '::endgroup::' @@ -170,7 +174,6 @@ runs: # Prepare general parameters # -------------------------- # Fetching parameters - $location = '${{ steps.get-deployment-location.outputs.deploymentLocation }}' $subscriptionId = '${{ inputs.subscriptionId }}' $managementGroupId = '${{ inputs.managementGroupId }}' @@ -189,12 +192,14 @@ runs: # Invoke validation # # ----------------- # $functionInput = @{ - TemplateFilePath = $moduleTestFilePath - Location = $location - SubscriptionId = $subscriptionId - ManagementGroupId = $managementGroupId - AdditionalParameters = @{} - RepoRoot = $env:GITHUB_WORKSPACE + TemplateFilePath = $moduleTestFilePath + DeploymentMetadataLocation = '${{ inputs.deploymentMetadataLocation }}' + SubscriptionId = $subscriptionId + ManagementGroupId = $managementGroupId + RepoRoot = $env:GITHUB_WORKSPACE + AdditionalParameters = @{ + resourceLocation = '${{ steps.get-resource-location.outputs.resourceLocation }}' + } } Write-Verbose 'Invoke task with' -Verbose @@ -220,7 +225,6 @@ runs: # Prepare general parameters # -------------------------- - $location ='${{ steps.get-deployment-location.outputs.deploymentLocation }}' $subscriptionId = '${{ inputs.subscriptionId }}' $managementGroupId = '${{ inputs.managementGroupId }}' @@ -239,16 +243,17 @@ runs: # Invoke deployment # # ----------------- # $functionInput = @{ - TemplateFilePath = $moduleTestFilePath - Location = $location - SubscriptionId = $subscriptionId - ManagementGroupId = $managementGroupId - DoNotThrow = $true - RepoRoot = $env:GITHUB_WORKSPACE - AdditionalParameters = @{} + TemplateFilePath = $moduleTestFilePath + DeploymentMetadataLocation = '${{ inputs.deploymentMetadataLocation }}' + SubscriptionId = $subscriptionId + ManagementGroupId = $managementGroupId + DoNotThrow = $true + RepoRoot = $env:GITHUB_WORKSPACE + AdditionalParameters = @{ + resourceLocation = '${{ steps.get-resource-location.outputs.resourceLocation }}' + } } - Write-Verbose 'Invoke task with' -Verbose Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 61f89f36a7..5d7a0cb627 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ If you haven't already, read the full [contribution guide](https://github.com/Azure/bicep-registry-modules/blob/main/CONTRIBUTING.md). The guide may have changed since the last time you read it, so please double-check. Once you are done and ready to submit your PR, edit the PR description and run through the relevant checklist below. -Enable GitHub Worksflows in your fork to enable auto-generation of assets with our [GitHub Action](/.github/workflows/push-auto-generate.yml). +Enable GitHub Workflows in your fork to enable auto-generation of assets with our [GitHub Action](/.github/workflows/push-auto-generate.yml). To trigger GitHub Actions after auto-generation, [add a GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) as a secret in your forked repository called `PAT`. ## Adding a new module diff --git a/.github/workflows/avm.template.module.yml b/.github/workflows/avm.template.module.yml index 100eea27c4..8629d675fe 100644 --- a/.github/workflows/avm.template.module.yml +++ b/.github/workflows/avm.template.module.yml @@ -101,7 +101,9 @@ jobs: - name: "Run deployment validation with test file [${{ matrix.testCases.path }}]" uses: ./.github/actions/templates/avm-validateModuleDeployment with: + modulePath: "${{ inputs.modulePath }}" templateFilePath: "${{ inputs.modulePath }}/${{ matrix.testCases.path }}" + deploymentMetadataLocation: "WestEurope" subscriptionId: "${{ secrets.ARM_SUBSCRIPTION_ID }}" managementGroupId: "${{ secrets.ARM_MGMTGROUP_ID }}" removeDeployment: "${{ fromJson(inputs.workflowInput).removeDeployment }}" diff --git a/.gitignore b/.gitignore index 81efe3426e..813cba8c38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .netrc -moduleIndex.json \ No newline at end of file +moduleIndex.json +.DS_Store diff --git a/avm/res/analysis-services/server/README.md b/avm/res/analysis-services/server/README.md index 1da4fb9e61..9e0a19293c 100644 --- a/avm/res/analysis-services/server/README.md +++ b/avm/res/analysis-services/server/README.md @@ -48,7 +48,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module server 'br/public:avm/res/analysis-services/server:' = { - name: '${uniqueString(deployment().name, location)}-test-assmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-assmin' params: { // Required parameters name: 'assmin' @@ -96,7 +96,7 @@ This instance deploys the module with most of its features enabled. ```bicep module server 'br/public:avm/res/analysis-services/server:' = { - name: '${uniqueString(deployment().name, location)}-test-assmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-assmax' params: { // Required parameters name: 'assmax' @@ -278,7 +278,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module server 'br/public:avm/res/analysis-services/server:' = { - name: '${uniqueString(deployment().name, location)}-test-asswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-asswaf' params: { // Required parameters name: 'asswaf' diff --git a/avm/res/analysis-services/server/tests/e2e/defaults/main.test.bicep b/avm/res/analysis-services/server/tests/e2e/defaults/main.test.bicep index 99d1c84aca..9eff12c840 100644 --- a/avm/res/analysis-services/server/tests/e2e/defaults/main.test.bicep +++ b/avm/res/analysis-services/server/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = 'northeurope' +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}' - location: location + location: resourceLocation } }] diff --git a/avm/res/analysis-services/server/tests/e2e/max/main.test.bicep b/avm/res/analysis-services/server/tests/e2e/max/main.test.bicep index 57b6a42068..d923580264 100644 --- a/avm/res/analysis-services/server/tests/e2e/max/main.test.bicep +++ b/avm/res/analysis-services/server/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = 'northeurope' +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,10 +61,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep b/avm/res/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep index 5a88fb64d3..75ad3cab00 100644 --- a/avm/res/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/analysis-services/server/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-analysisservices.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = 'northeurope' +param resourceLocation 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' @@ -28,20 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -52,10 +52,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/api-management/service/README.md b/avm/res/api-management/service/README.md index 40b74afc6b..44cf2cd6a4 100644 --- a/avm/res/api-management/service/README.md +++ b/avm/res/api-management/service/README.md @@ -63,7 +63,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module service 'br/public:avm/res/api-management/service:' = { - name: '${uniqueString(deployment().name, location)}-test-apismin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-apismin' params: { // Required parameters name: 'apismin001' @@ -119,7 +119,7 @@ This instance deploys the module with most of its features enabled. ```bicep module service 'br/public:avm/res/api-management/service:' = { - name: '${uniqueString(deployment().name, location)}-test-apismax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-apismax' params: { // Required parameters name: 'apismax001' @@ -523,7 +523,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module service 'br/public:avm/res/api-management/service:' = { - name: '${uniqueString(deployment().name, location)}-test-apiswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-apiswaf' params: { // Required parameters name: 'apiswaf001' diff --git a/avm/res/api-management/service/main.bicep b/avm/res/api-management/service/main.bicep index 5f97a1ce71..230e363a04 100644 --- a/avm/res/api-management/service/main.bicep +++ b/avm/res/api-management/service/main.bicep @@ -438,7 +438,7 @@ output resourceId string = service.id output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(service.identity, 'principalId') ? service.identity.principalId : '' +output systemAssignedMIPrincipalId string = service.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = service.location diff --git a/avm/res/api-management/service/main.json b/avm/res/api-management/service/main.json index ad93a1bc6c..0657083967 100644 --- a/avm/res/api-management/service/main.json +++ b/avm/res/api-management/service/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "2230233908165104812" + "templateHash": "12440563688380406844" }, "name": "API Management Services", "description": "This module deploys an API Management Service.", @@ -2854,7 +2854,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('service', '2021-08-01', 'full').identity, 'principalId')), reference('service', '2021-08-01', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('service', '2021-08-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/api-management/service/tests/e2e/defaults/main.test.bicep b/avm/res/api-management/service/tests/e2e/defaults/main.test.bicep index b394e9dde9..4b757bf9b6 100644 --- a/avm/res/api-management/service/tests/e2e/defaults/main.test.bicep +++ b/avm/res/api-management/service/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-apimanagement.service-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' publisherName: '${namePrefix}-az-amorg-x-001' } diff --git a/avm/res/api-management/service/tests/e2e/max/main.test.bicep b/avm/res/api-management/service/tests/e2e/max/main.test.bicep index 57ec18764e..697082c2f7 100644 --- a/avm/res/api-management/service/tests/e2e/max/main.test.bicep +++ b/avm/res/api-management/service/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-apimanagement.service-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -32,15 +32,15 @@ param customSecret string = newGuid() // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,13 +48,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -65,10 +65,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' publisherName: '${namePrefix}-az-amorg-x-001' apis: [ diff --git a/avm/res/api-management/service/tests/e2e/waf-aligned/main.test.bicep b/avm/res/api-management/service/tests/e2e/waf-aligned/main.test.bicep index 6ee7e13fdd..86657082ad 100644 --- a/avm/res/api-management/service/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/api-management/service/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-apimanagement.service-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'apiswaf' @@ -32,20 +32,20 @@ param customSecret string = newGuid() // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -56,10 +56,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation publisherEmail: 'apimgmt-noreply@mail.windowsazure.com' publisherName: '${namePrefix}-az-amorg-x-001' customProperties: { diff --git a/avm/res/app/managed-environment/README.md b/avm/res/app/managed-environment/README.md index 953e3ddc15..5fb9b4973f 100644 --- a/avm/res/app/managed-environment/README.md +++ b/avm/res/app/managed-environment/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module managedEnvironment 'br/public:avm/res/app/managed-environment:' = { - name: '${uniqueString(deployment().name, location)}-test-amemin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-amemin' params: { // Required parameters logAnalyticsWorkspaceResourceId: '' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module managedEnvironment 'br/public:avm/res/app/managed-environment:' = { - name: '${uniqueString(deployment().name, location)}-test-amemax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-amemax' params: { // Required parameters logAnalyticsWorkspaceResourceId: '' @@ -244,7 +244,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module managedEnvironment 'br/public:avm/res/app/managed-environment:' = { - name: '${uniqueString(deployment().name, location)}-test-amewaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-amewaf' params: { // Required parameters logAnalyticsWorkspaceResourceId: '' diff --git a/avm/res/app/managed-environment/tests/e2e/defaults/main.test.bicep b/avm/res/app/managed-environment/tests/e2e/defaults/main.test.bicep index f179249367..9e20f04425 100644 --- a/avm/res/app/managed-environment/tests/e2e/defaults/main.test.bicep +++ b/avm/res/app/managed-environment/tests/e2e/defaults/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-app.managedenvironments-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,14 +27,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-paramNested' + name: '${uniqueString(deployment().name, resourceLocation)}-paramNested' params: { - location: location + location: resourceLocation logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId } }] diff --git a/avm/res/app/managed-environment/tests/e2e/max/main.test.bicep b/avm/res/app/managed-environment/tests/e2e/max/main.test.bicep index 185e91544b..2a8d2857d4 100644 --- a/avm/res/app/managed-environment/tests/e2e/max/main.test.bicep +++ b/avm/res/app/managed-environment/tests/e2e/max/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-app.managedenvironments-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,16 +27,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-paramNested' + name: '${uniqueString(deployment().name, resourceLocation)}-paramNested' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -48,11 +48,11 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId - location: location + location: resourceLocation workloadProfiles: [ { workloadProfileType: 'D4' diff --git a/avm/res/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep b/avm/res/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep index 011da928e4..6713bae3a9 100644 --- a/avm/res/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/app/managed-environment/tests/e2e/waf-aligned/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-app.managedenvironments-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,16 +27,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-paramNested' + name: '${uniqueString(deployment().name, resourceLocation)}-paramNested' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -48,11 +48,11 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId - location: location + location: resourceLocation workloadProfiles: [ { workloadProfileType: 'D4' diff --git a/avm/res/automation/automation-account/README.md b/avm/res/automation/automation-account/README.md index 0fcf8d72fc..df7d038227 100644 --- a/avm/res/automation/automation-account/README.md +++ b/avm/res/automation/automation-account/README.md @@ -54,7 +54,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module automationAccount 'br/public:avm/res/automation/automation-account:' = { - name: '${uniqueString(deployment().name, location)}-test-aamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-aamin' params: { // Required parameters name: 'aamin001' @@ -102,7 +102,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign ```bicep module automationAccount 'br/public:avm/res/automation/automation-account:' = { - name: '${uniqueString(deployment().name, location)}-test-aaencr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-aaencr' params: { // Required parameters name: 'aaencr001' @@ -174,7 +174,7 @@ This instance deploys the module with most of its features enabled. ```bicep module automationAccount 'br/public:avm/res/automation/automation-account:' = { - name: '${uniqueString(deployment().name, location)}-test-aamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-aamax' params: { // Required parameters name: 'aamax001' @@ -638,7 +638,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module automationAccount 'br/public:avm/res/automation/automation-account:' = { - name: '${uniqueString(deployment().name, location)}-test-aawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-aawaf' params: { // Required parameters name: 'aawaf001' diff --git a/avm/res/automation/automation-account/main.bicep b/avm/res/automation/automation-account/main.bicep index e5eba3d587..707228ec86 100644 --- a/avm/res/automation/automation-account/main.bicep +++ b/avm/res/automation/automation-account/main.bicep @@ -386,7 +386,7 @@ output resourceId string = automationAccount.id 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 : '' +output systemAssignedMIPrincipalId string = automationAccount.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = automationAccount.location diff --git a/avm/res/automation/automation-account/main.json b/avm/res/automation/automation-account/main.json index 06a49c3331..b2b552d244 100644 --- a/avm/res/automation/automation-account/main.json +++ b/avm/res/automation/automation-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "16375809366957188835" + "templateHash": "5485541427531214967" }, "name": "Automation Accounts", "description": "This module deploys an Azure Automation Account.", @@ -2960,7 +2960,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('automationAccount', '2022-08-08', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/automation/automation-account/tests/e2e/defaults/main.test.bicep b/avm/res/automation/automation-account/tests/e2e/defaults/main.test.bicep index 2059e33b55..5f0a8e6212 100644 --- a/avm/res/automation/automation-account/tests/e2e/defaults/main.test.bicep +++ b/avm/res/automation/automation-account/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-automation.account-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/automation/automation-account/tests/e2e/encr/main.test.bicep b/avm/res/automation/automation-account/tests/e2e/encr/main.test.bicep index 060aa9cb62..305f49b2e2 100644 --- a/avm/res/automation/automation-account/tests/e2e/encr/main.test.bicep +++ b/avm/res/automation/automation-account/tests/e2e/encr/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-automation.account-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -52,7 +52,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' customerManagedKey: { @@ -65,6 +65,6 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' nestedDependencies.outputs.managedIdentityResourceId ] } - location: location + location: resourceLocation } }] diff --git a/avm/res/automation/automation-account/tests/e2e/max/main.test.bicep b/avm/res/automation/automation-account/tests/e2e/max/main.test.bicep index d34b802262..8067995a67 100644 --- a/avm/res/automation/automation-account/tests/e2e/max/main.test.bicep +++ b/avm/res/automation/automation-account/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-automation.account-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -20,21 +20,20 @@ param serviceShort string = 'aamax' @description('Optional. A token to inject into the name of each resource.') param namePrefix string = '#_namePrefix_#' - // General resources // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -42,13 +41,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -59,7 +58,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' diagnosticSettings: [ @@ -85,7 +84,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ] disableLocalAuth: true linkedWorkspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep index 5a812d2c57..fbaee4ef11 100644 --- a/avm/res/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/automation/automation-account/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-automation.account-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,16 +62,16 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' diagnosticSettings: [ - { - eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName - eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId - storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId - workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - } + { + eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + eventHubAuthorizationRuleResourceId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + storageAccountResourceId: diagnosticDependencies.outputs.storageAccountResourceId + workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + } ] gallerySolutions: [ { @@ -88,7 +88,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ] disableLocalAuth: true linkedWorkspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/batch/batch-account/README.md b/avm/res/batch/batch-account/README.md index 69e65a34cc..bc2a940025 100644 --- a/avm/res/batch/batch-account/README.md +++ b/avm/res/batch/batch-account/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module batchAccount 'br/public:avm/res/batch/batch-account:' = { - name: '${uniqueString(deployment().name, location)}-test-bbamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-bbamin' params: { // Required parameters name: 'bbamin001' @@ -98,7 +98,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign ```bicep module batchAccount 'br/public:avm/res/batch/batch-account:' = { - name: '${uniqueString(deployment().name, location)}-test-bbaencr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-bbaencr' params: { // Required parameters name: 'bbaencr001' @@ -188,7 +188,7 @@ This instance deploys the module with most of its features enabled. ```bicep module batchAccount 'br/public:avm/res/batch/batch-account:' = { - name: '${uniqueString(deployment().name, location)}-test-bbamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-bbamax' params: { // Required parameters name: 'bbamax001' @@ -454,7 +454,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module batchAccount 'br/public:avm/res/batch/batch-account:' = { - name: '${uniqueString(deployment().name, location)}-test-bbawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-bbawaf' params: { // Required parameters name: 'bbawaf001' diff --git a/avm/res/batch/batch-account/main.bicep b/avm/res/batch/batch-account/main.bicep index 8ff46a48b7..1d5176205e 100644 --- a/avm/res/batch/batch-account/main.bicep +++ b/avm/res/batch/batch-account/main.bicep @@ -262,7 +262,7 @@ output resourceGroupName string = resourceGroup().name 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 : '' +output systemAssignedMIPrincipalId string = batchAccount.?identity.?principalId ?? '' // ================ // // Definitions // diff --git a/avm/res/batch/batch-account/main.json b/avm/res/batch/batch-account/main.json index fe9ce38a52..9bb8fd3a6f 100644 --- a/avm/res/batch/batch-account/main.json +++ b/avm/res/batch/batch-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "13789875989566239903" + "templateHash": "12017185166479854402" }, "name": "Batch Accounts", "description": "This module deploys a Batch Account.", @@ -1483,7 +1483,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('batchAccount', '2022-06-01', 'full'), 'identity'), 'principalId'), '')]" } } -} \ No newline at end of file +} diff --git a/avm/res/batch/batch-account/tests/e2e/defaults/main.test.bicep b/avm/res/batch/batch-account/tests/e2e/defaults/main.test.bicep index 53caff787a..766c224b42 100644 --- a/avm/res/batch/batch-account/tests/e2e/defaults/main.test.bicep +++ b/avm/res/batch/batch-account/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation storageAccountId: nestedDependencies.outputs.storageAccountResourceId } }] diff --git a/avm/res/batch/batch-account/tests/e2e/encr/main.test.bicep b/avm/res/batch/batch-account/tests/e2e/encr/main.test.bicep index b9e8a66ce0..5793e4d0a6 100644 --- a/avm/res/batch/batch-account/tests/e2e/encr/main.test.bicep +++ b/avm/res/batch/batch-account/tests/e2e/encr/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,19 +31,19 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -54,10 +54,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation storageAccountId: nestedDependencies.outputs.storageAccountResourceId customerManagedKey: { keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName diff --git a/avm/res/batch/batch-account/tests/e2e/max/main.test.bicep b/avm/res/batch/batch-account/tests/e2e/max/main.test.bicep index a9ff31f549..1a31a13cce 100644 --- a/avm/res/batch/batch-account/tests/e2e/max/main.test.bicep +++ b/avm/res/batch/batch-account/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { storageAccountName: 'dep${namePrefix}st${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -63,10 +63,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation storageAccountId: nestedDependencies.outputs.storageAccountResourceId diagnosticSettings: [ { diff --git a/avm/res/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep index 701d8bd5e1..f66d2bac7a 100644 --- a/avm/res/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/batch/batch-account/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-batch.batchaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { storageAccountName: 'dep${namePrefix}st${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -63,10 +63,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation storageAccountId: nestedDependencies.outputs.storageAccountResourceId diagnosticSettings: [ { diff --git a/avm/res/cache/redis/ORPHANED.md b/avm/res/cache/redis/ORPHANED.md deleted file mode 100644 index ef8fa911d2..0000000000 --- a/avm/res/cache/redis/ORPHANED.md +++ /dev/null @@ -1,4 +0,0 @@ -⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ - -- Only security and bug fixes are being handled by the AVM core team at present. -- If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! \ No newline at end of file diff --git a/avm/res/cache/redis/README.md b/avm/res/cache/redis/README.md index e68f6ac84b..0991dd9ae4 100644 --- a/avm/res/cache/redis/README.md +++ b/avm/res/cache/redis/README.md @@ -1,10 +1,5 @@ # Redis Cache `[Microsoft.Cache/redis]` -> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> -> - Only security and bug fixes are being handled by the AVM core team at present. -> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! - This module deploys a Redis Cache. ## Navigation @@ -51,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module redis 'br/public:avm/res/cache/redis:' = { - name: '${uniqueString(deployment().name, location)}-test-crmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crmin' params: { // Required parameters name: 'crmin001' @@ -99,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module redis 'br/public:avm/res/cache/redis:' = { - name: '${uniqueString(deployment().name, location)}-test-crmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crmax' params: { // Required parameters name: 'crmax001' @@ -347,7 +342,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module redis 'br/public:avm/res/cache/redis:' = { - name: '${uniqueString(deployment().name, location)}-test-crwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crwaf' params: { // Required parameters name: 'crwaf001' diff --git a/avm/res/cache/redis/tests/e2e/defaults/main.test.bicep b/avm/res/cache/redis/tests/e2e/defaults/main.test.bicep index 434bfd9737..8813298de2 100644 --- a/avm/res/cache/redis/tests/e2e/defaults/main.test.bicep +++ b/avm/res/cache/redis/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-cache.redis-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/cache/redis/tests/e2e/max/main.test.bicep b/avm/res/cache/redis/tests/e2e/max/main.test.bicep index e709f9c6b8..5ba333465d 100644 --- a/avm/res/cache/redis/tests/e2e/max/main.test.bicep +++ b/avm/res/cache/redis/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-cache.redis-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation capacity: 2 diagnosticSettings: [ { diff --git a/avm/res/cache/redis/tests/e2e/waf-aligned/main.test.bicep b/avm/res/cache/redis/tests/e2e/waf-aligned/main.test.bicep index c6a97b6f0a..337a88e772 100644 --- a/avm/res/cache/redis/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/cache/redis/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-cache.redis-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,10 +61,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation capacity: 2 diagnosticSettings: [ { diff --git a/avm/res/cognitive-services/account/README.md b/avm/res/cognitive-services/account/README.md index d0b41bb556..b729ea0521 100644 --- a/avm/res/cognitive-services/account/README.md +++ b/avm/res/cognitive-services/account/README.md @@ -48,7 +48,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module account 'br/public:avm/res/cognitive-services/account:' = { - name: '${uniqueString(deployment().name, location)}-test-csamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csamin' params: { // Required parameters kind: 'SpeechServices' @@ -100,7 +100,7 @@ This instance deploys the module with most of its features enabled. ```bicep module account 'br/public:avm/res/cognitive-services/account:' = { - name: '${uniqueString(deployment().name, location)}-test-csamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csamax' params: { // Required parameters kind: 'Face' @@ -388,7 +388,7 @@ This instance deploys the module as a Speech Service. ```bicep module account 'br/public:avm/res/cognitive-services/account:' = { - name: '${uniqueString(deployment().name, location)}-test-csaspeech' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csaspeech' params: { // Required parameters kind: 'SpeechServices' @@ -502,7 +502,7 @@ This instance deploys the module using Customer-Managed-Keys using a System-Assi ```bicep module account 'br/public:avm/res/cognitive-services/account:' = { - name: '${uniqueString(deployment().name, location)}-test-csaecrs' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csaecrs' params: { // Required parameters kind: 'SpeechServices' @@ -584,7 +584,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign ```bicep module account 'br/public:avm/res/cognitive-services/account:' = { - name: '${uniqueString(deployment().name, location)}-test-csaencr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csaencr' params: { // Required parameters kind: 'SpeechServices' @@ -672,7 +672,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module account 'br/public:avm/res/cognitive-services/account:' = { - name: '${uniqueString(deployment().name, location)}-test-csawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csawaf' params: { // Required parameters kind: 'Face' diff --git a/avm/res/cognitive-services/account/main.bicep b/avm/res/cognitive-services/account/main.bicep index 4531d03300..0f81a209c5 100644 --- a/avm/res/cognitive-services/account/main.bicep +++ b/avm/res/cognitive-services/account/main.bicep @@ -319,7 +319,7 @@ output resourceGroupName string = resourceGroup().name output endpoint string = cognitiveService.properties.endpoint @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(cognitiveService.identity, 'principalId') ? cognitiveService.identity.principalId : '' +output systemAssignedMIPrincipalId string = cognitiveService.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = cognitiveService.location diff --git a/avm/res/cognitive-services/account/main.json b/avm/res/cognitive-services/account/main.json index ed75583c6a..6595a1a7b1 100644 --- a/avm/res/cognitive-services/account/main.json +++ b/avm/res/cognitive-services/account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "900552806279578658" + "templateHash": "13697179912910947708" }, "name": "Cognitive Services", "description": "This module deploys a Cognitive Service.", @@ -1523,7 +1523,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('cognitiveService', '2022-12-01', 'full').identity, 'principalId')), reference('cognitiveService', '2022-12-01', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('cognitiveService', '2022-12-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/cognitive-services/account/tests/e2e/defaults/main.test.bicep b/avm/res/cognitive-services/account/tests/e2e/defaults/main.test.bicep index c619a55051..37a7e34a26 100644 --- a/avm/res/cognitive-services/account/tests/e2e/defaults/main.test.bicep +++ b/avm/res/cognitive-services/account/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' kind: 'SpeechServices' - location: location + location: resourceLocation } }] diff --git a/avm/res/cognitive-services/account/tests/e2e/max/main.test.bicep b/avm/res/cognitive-services/account/tests/e2e/max/main.test.bicep index ac011a2766..df8752851e 100644 --- a/avm/res/cognitive-services/account/tests/e2e/max/main.test.bicep +++ b/avm/res/cognitive-services/account/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,12 +61,12 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' kind: 'Face' customSubDomainName: '${namePrefix}x${serviceShort}' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/cognitive-services/account/tests/e2e/speech/main.test.bicep b/avm/res/cognitive-services/account/tests/e2e/speech/main.test.bicep index 81dfeffc2b..e349981b03 100644 --- a/avm/res/cognitive-services/account/tests/e2e/speech/main.test.bicep +++ b/avm/res/cognitive-services/account/tests/e2e/speech/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module as a Speech Service.' param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } // ============== // @@ -47,11 +47,11 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' kind: 'SpeechServices' - location: location + location: resourceLocation customSubDomainName: '${namePrefix}speechdomain' privateEndpoints: [ { diff --git a/avm/res/cognitive-services/account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep b/avm/res/cognitive-services/account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep index 66e388d874..e657ba486b 100644 --- a/avm/res/cognitive-services/account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep +++ b/avm/res/cognitive-services/account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'csaecrs' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { cognitiveServiceName: '${namePrefix}${serviceShort}001' // 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)}' - location: location + location: resourceLocation } } @@ -52,11 +52,11 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: nestedDependencies.outputs.cognitiveServiceName kind: 'SpeechServices' - location: location + location: resourceLocation customerManagedKey: { keyName: nestedDependencies.outputs.keyVaultKeyName keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId diff --git a/avm/res/cognitive-services/account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep b/avm/res/cognitive-services/account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep index 945d40593a..241ca59ae4 100644 --- a/avm/res/cognitive-services/account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep +++ b/avm/res/cognitive-services/account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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)}' - location: location + location: resourceLocation } } @@ -52,11 +52,11 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' kind: 'SpeechServices' - location: location + location: resourceLocation customerManagedKey: { keyName: nestedDependencies.outputs.keyVaultKeyName keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId diff --git a/avm/res/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep index 35fdbab8ea..41d53958ca 100644 --- a/avm/res/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/cognitive-services/account/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-cognitiveservices.accounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,11 +61,11 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' kind: 'Face' - location: location + location: resourceLocation customSubDomainName: '${namePrefix}x${serviceShort}' diagnosticSettings: [ { diff --git a/avm/res/compute/disk-encryption-set/README.md b/avm/res/compute/disk-encryption-set/README.md index 0d52b2da62..3ebad4632b 100644 --- a/avm/res/compute/disk-encryption-set/README.md +++ b/avm/res/compute/disk-encryption-set/README.md @@ -44,7 +44,7 @@ This instance uses a Key Vault with the Access Policy permission model. If no pe ```bicep module diskEncryptionSet 'br/public:avm/res/compute/disk-encryption-set:' = { - name: '${uniqueString(deployment().name, location)}-test-cdesap' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdesap' params: { // Required parameters keyName: '' @@ -162,7 +162,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module diskEncryptionSet 'br/public:avm/res/compute/disk-encryption-set:' = { - name: '${uniqueString(deployment().name, location)}-test-cdesmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdesmin' params: { // Required parameters keyName: '' @@ -218,7 +218,7 @@ This instance deploys the module with most of its features enabled. ```bicep module diskEncryptionSet 'br/public:avm/res/compute/disk-encryption-set:' = { - name: '${uniqueString(deployment().name, location)}-test-cdesmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdesmax' params: { // Required parameters keyName: '' @@ -344,7 +344,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module diskEncryptionSet 'br/public:avm/res/compute/disk-encryption-set:' = { - name: '${uniqueString(deployment().name, location)}-test-cdeswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdeswaf' params: { // Required parameters keyName: '' diff --git a/avm/res/compute/disk-encryption-set/main.bicep b/avm/res/compute/disk-encryption-set/main.bicep index 7040ad754a..18113c865c 100644 --- a/avm/res/compute/disk-encryption-set/main.bicep +++ b/avm/res/compute/disk-encryption-set/main.bicep @@ -162,7 +162,7 @@ output name string = diskEncryptionSet.name 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 : '' +output systemAssignedMIPrincipalId string = diskEncryptionSet.?identity.?principalId ?? '' @description('The idenities of the disk encryption set.') output identities object = diskEncryptionSet.identity diff --git a/avm/res/compute/disk-encryption-set/main.json b/avm/res/compute/disk-encryption-set/main.json index 6912994035..a29e0f7ce5 100644 --- a/avm/res/compute/disk-encryption-set/main.json +++ b/avm/res/compute/disk-encryption-set/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "8898450237590542842" + "version": "0.24.24.22086", + "templateHash": "231465906721977114" }, "name": "Disk Encryption Sets", "description": "This module deploys a Disk Encryption Set. The module will attempt to set permissions on the provided Key Vault for any used user-assigned identity.", @@ -374,8 +374,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "3415943548000075516" + "version": "0.24.24.22086", + "templateHash": "18116549045396353747" } }, "parameters": { @@ -462,8 +462,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.23.1.45101", - "templateHash": "3185669298547069044" + "version": "0.24.24.22086", + "templateHash": "11258728276348640403" }, "name": "Key Vault Access Policies", "description": "This module deploys a Key Vault Access Policy.", @@ -711,7 +711,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('diskEncryptionSet', '2022-07-02', 'full'), 'identity'), 'principalId'), '')]" }, "identities": { "type": "object", diff --git a/avm/res/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep b/avm/res/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep index 467a612a95..85abf44934 100644 --- a/avm/res/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep +++ b/avm/res/compute/disk-encryption-set/tests/e2e/accessPolicies/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance uses a Key Vault with the Access Policy pe param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -52,10 +52,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation keyName: nestedDependencies.outputs.keyName keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId roleAssignments: [ diff --git a/avm/res/compute/disk-encryption-set/tests/e2e/defaults/main.test.bicep b/avm/res/compute/disk-encryption-set/tests/e2e/defaults/main.test.bicep index e412b1a6b1..31e8671288 100644 --- a/avm/res/compute/disk-encryption-set/tests/e2e/defaults/main.test.bicep +++ b/avm/res/compute/disk-encryption-set/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'cdesmin' @@ -31,16 +31,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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)}' - location: location + location: resourceLocation } } @@ -51,11 +51,11 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' keyName: nestedDependencies.outputs.keyName keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId - location: location + location: resourceLocation } }] diff --git a/avm/res/compute/disk-encryption-set/tests/e2e/max/main.test.bicep b/avm/res/compute/disk-encryption-set/tests/e2e/max/main.test.bicep index 463a300683..e7ce5eed26 100644 --- a/avm/res/compute/disk-encryption-set/tests/e2e/max/main.test.bicep +++ b/avm/res/compute/disk-encryption-set/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -52,10 +52,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep index a269813c1d..b39433525b 100644 --- a/avm/res/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/disk-encryption-set/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-compute.diskencryptionsets-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -52,10 +52,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation keyName: nestedDependencies.outputs.keyName keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId managedIdentities: { diff --git a/avm/res/compute/disk/README.md b/avm/res/compute/disk/README.md index 1ceb237340..59deb4cd0b 100644 --- a/avm/res/compute/disk/README.md +++ b/avm/res/compute/disk/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module disk 'br/public:avm/res/compute/disk:' = { - name: '${uniqueString(deployment().name, location)}-test-cdmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdmin' params: { // Required parameters name: 'cdmin001' @@ -100,7 +100,7 @@ This instance deploys the module with an image reference. ```bicep module disk 'br/public:avm/res/compute/disk:' = { - name: '${uniqueString(deployment().name, location)}-test-cdimg' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdimg' params: { // Required parameters name: 'cdimg001' @@ -160,7 +160,7 @@ This instance deploys the module with a custom image that is imported from a VHD ```bicep module disk 'br/public:avm/res/compute/disk:' = { - name: '${uniqueString(deployment().name, location)}-test-cdimp' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdimp' params: { // Required parameters name: 'cdimp001' @@ -224,7 +224,7 @@ This instance deploys the module with most of its features enabled. ```bicep module disk 'br/public:avm/res/compute/disk:' = { - name: '${uniqueString(deployment().name, location)}-test-cdmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdmax' params: { // Required parameters name: 'cdmax001' @@ -358,7 +358,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module disk 'br/public:avm/res/compute/disk:' = { - name: '${uniqueString(deployment().name, location)}-test-cdwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cdwaf' params: { // Required parameters name: 'cdwaf001' diff --git a/avm/res/compute/disk/tests/e2e/defaults/main.test.bicep b/avm/res/compute/disk/tests/e2e/defaults/main.test.bicep index cb89afcd7a..97e32b8ad4 100644 --- a/avm/res/compute/disk/tests/e2e/defaults/main.test.bicep +++ b/avm/res/compute/disk/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.disk-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}-${serviceShort}001' - location: location + location: resourceLocation sku: 'Standard_LRS' diskSizeGB: 1 } diff --git a/avm/res/compute/disk/tests/e2e/image/main.test.bicep b/avm/res/compute/disk/tests/e2e/image/main.test.bicep index 5ad6af75e7..3ebbb0e17d 100644 --- a/avm/res/compute/disk/tests/e2e/image/main.test.bicep +++ b/avm/res/compute/disk/tests/e2e/image/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with an image reference param resourceGroupName string = 'dep-${namePrefix}-compute.disks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}-${serviceShort}001' - location: location + location: resourceLocation 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' diff --git a/avm/res/compute/disk/tests/e2e/import/main.test.bicep b/avm/res/compute/disk/tests/e2e/import/main.test.bicep index 1b0783ff7b..66553f7301 100644 --- a/avm/res/compute/disk/tests/e2e/import/main.test.bicep +++ b/avm/res/compute/disk/tests/e2e/import/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a custom image tha param resourceGroupName string = 'dep-${namePrefix}-compute.disks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,15 +31,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation storageAccountName: 'dep${namePrefix}sa${serviceShort}01' imageTemplateName: 'dep-${namePrefix}-imgt-${serviceShort}-${baseTime}' triggerImageDeploymentScriptName: 'dep-${namePrefix}-ds-${serviceShort}-triggerImageTemplate' @@ -53,10 +53,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}-${serviceShort}001' - location: location + location: resourceLocation sku: 'Standard_LRS' createOption: 'Import' sourceUri: nestedDependencies.outputs.vhdUri diff --git a/avm/res/compute/disk/tests/e2e/max/main.test.bicep b/avm/res/compute/disk/tests/e2e/max/main.test.bicep index 523619915c..9052419c5e 100644 --- a/avm/res/compute/disk/tests/e2e/max/main.test.bicep +++ b/avm/res/compute/disk/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.disks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}-${serviceShort}001' - location: location + location: resourceLocation sku: 'UltraSSD_LRS' diskIOPSReadWrite: 500 diskMBpsReadWrite: 60 diff --git a/avm/res/compute/disk/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/disk/tests/e2e/waf-aligned/main.test.bicep index df88b86a47..d1b92bda7a 100644 --- a/avm/res/compute/disk/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/disk/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-compute.disks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}-${serviceShort}001' - location: location + location: resourceLocation sku: 'UltraSSD_LRS' diskIOPSReadWrite: 500 diskMBpsReadWrite: 60 diff --git a/avm/res/compute/gallery/README.md b/avm/res/compute/gallery/README.md index a5bbfe0a1b..532d815ad8 100644 --- a/avm/res/compute/gallery/README.md +++ b/avm/res/compute/gallery/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module gallery 'br/public:avm/res/compute/gallery:' = { - name: '${uniqueString(deployment().name, location)}-test-cgmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cgmin' params: { // Required parameters name: 'cgmin001' @@ -92,7 +92,7 @@ This instance deploys the module with most of its features enabled. ```bicep module gallery 'br/public:avm/res/compute/gallery:' = { - name: '${uniqueString(deployment().name, location)}-test-cgmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cgmax' params: { // Required parameters name: 'cgmax001' @@ -380,7 +380,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module gallery 'br/public:avm/res/compute/gallery:' = { - name: '${uniqueString(deployment().name, location)}-test-cgwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cgwaf' params: { // Required parameters name: 'cgwaf001' diff --git a/avm/res/compute/gallery/tests/e2e/defaults/main.test.bicep b/avm/res/compute/gallery/tests/e2e/defaults/main.test.bicep index 756e5b1b97..56716b94c4 100644 --- a/avm/res/compute/gallery/tests/e2e/defaults/main.test.bicep +++ b/avm/res/compute/gallery/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.galleries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/compute/gallery/tests/e2e/max/main.test.bicep b/avm/res/compute/gallery/tests/e2e/max/main.test.bicep index f9de331bd7..c44883e5c9 100644 --- a/avm/res/compute/gallery/tests/e2e/max/main.test.bicep +++ b/avm/res/compute/gallery/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.galleries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -47,9 +47,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' lock: { kind: 'CanNotDelete' diff --git a/avm/res/compute/gallery/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/gallery/tests/e2e/waf-aligned/main.test.bicep index 2484672428..e31da2c17f 100644 --- a/avm/res/compute/gallery/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/gallery/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-compute.galleries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' applications: [ { diff --git a/avm/res/compute/image/README.md b/avm/res/compute/image/README.md index b141503a35..825b5a0608 100644 --- a/avm/res/compute/image/README.md +++ b/avm/res/compute/image/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module image 'br/public:avm/res/compute/image:' = { - name: '${uniqueString(deployment().name, location)}-test-cimin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cimin' params: { // Required parameters name: 'cimin001' @@ -110,7 +110,7 @@ This instance deploys the module with most of its features enabled. ```bicep module image 'br/public:avm/res/compute/image:' = { - name: '${uniqueString(deployment().name, tempLocation)}-test-cimax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cimax' params: { // Required parameters name: 'cimax001' @@ -242,7 +242,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module image 'br/public:avm/res/compute/image:' = { - name: '${uniqueString(deployment().name, tempLocation)}-test-ciwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ciwaf' params: { // Required parameters name: 'ciwaf001' diff --git a/avm/res/compute/image/tests/e2e/defaults/main.test.bicep b/avm/res/compute/image/tests/e2e/defaults/main.test.bicep index 127f94239e..bf0969b73f 100644 --- a/avm/res/compute/image/tests/e2e/defaults/main.test.bicep +++ b/avm/res/compute/image/tests/e2e/defaults/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.images-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -36,12 +36,12 @@ var tempLocation = 'eastus' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: tempLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, tempLocation)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' location: tempLocation @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/compute/image/tests/e2e/max/main.test.bicep b/avm/res/compute/image/tests/e2e/max/main.test.bicep index fb5bf71068..e22579d7d5 100644 --- a/avm/res/compute/image/tests/e2e/max/main.test.bicep +++ b/avm/res/compute/image/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.images-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -34,12 +34,12 @@ var tempLocation = 'eastus' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: tempLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, tempLocation)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' location: tempLocation @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, tempLocation)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/compute/image/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/image/tests/e2e/waf-aligned/main.test.bicep index fac31a5e80..343a0ae462 100644 --- a/avm/res/compute/image/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/image/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-compute.images-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -34,12 +34,12 @@ var tempLocation = 'eastus' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: tempLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, tempLocation)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' location: tempLocation @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, tempLocation)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/compute/proximity-placement-group/README.md b/avm/res/compute/proximity-placement-group/README.md index e4ba606bfb..355d7cba0d 100644 --- a/avm/res/compute/proximity-placement-group/README.md +++ b/avm/res/compute/proximity-placement-group/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module proximityPlacementGroup 'br/public:avm/res/compute/proximity-placement-group:' = { - name: '${uniqueString(deployment().name, location)}-test-cppgmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cppgmin' params: { // Required parameters name: 'cppgmin001' @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module proximityPlacementGroup 'br/public:avm/res/compute/proximity-placement-group:' = { - name: '${uniqueString(deployment().name, location)}-test-cppgmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cppgmax' params: { // Required parameters name: 'cppgmax001' @@ -236,7 +236,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module proximityPlacementGroup 'br/public:avm/res/compute/proximity-placement-group:' = { - name: '${uniqueString(deployment().name, location)}-test-cppgwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cppgwaf' params: { // Required parameters name: 'cppgwaf001' diff --git a/avm/res/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep b/avm/res/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep index e790370c7d..4ec0e48342 100644 --- a/avm/res/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep +++ b/avm/res/compute/proximity-placement-group/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.proximityplacementgroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/compute/proximity-placement-group/tests/e2e/max/main.test.bicep b/avm/res/compute/proximity-placement-group/tests/e2e/max/main.test.bicep index 14ae7a0067..71760632e6 100644 --- a/avm/res/compute/proximity-placement-group/tests/e2e/max/main.test.bicep +++ b/avm/res/compute/proximity-placement-group/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.proximityplacementgroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep index 4bcef68fb0..38aece098e 100644 --- a/avm/res/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/proximity-placement-group/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-compute.proximityplacementgroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation zones: [ '1' ] diff --git a/avm/res/compute/ssh-public-key/README.md b/avm/res/compute/ssh-public-key/README.md index 6f71b01603..e37c459b3c 100644 --- a/avm/res/compute/ssh-public-key/README.md +++ b/avm/res/compute/ssh-public-key/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module sshPublicKey 'br/public:avm/res/compute/ssh-public-key:' = { - name: '${uniqueString(deployment().name, location)}-test-cspkmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cspkmin' params: { // Required parameters name: 'cspkmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module sshPublicKey 'br/public:avm/res/compute/ssh-public-key:' = { - name: '${uniqueString(deployment().name, location)}-test-cspkmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cspkmax' params: { // Required parameters name: 'sshkey-cspkmax001' @@ -208,7 +208,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module sshPublicKey 'br/public:avm/res/compute/ssh-public-key:' = { - name: '${uniqueString(deployment().name, location)}-test-cspkwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cspkwaf' params: { // Required parameters name: 'sshkey-cspkwaf001' diff --git a/avm/res/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep b/avm/res/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep index a0aa5bb9c3..88812321a3 100644 --- a/avm/res/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep +++ b/avm/res/compute/ssh-public-key/tests/e2e/defaults/main.test.bicep @@ -14,7 +14,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-network.sshPublicKeys-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -30,7 +30,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { // ============== // module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}001' - location: location + location: resourceLocation } } diff --git a/avm/res/compute/ssh-public-key/tests/e2e/max/main.test.bicep b/avm/res/compute/ssh-public-key/tests/e2e/max/main.test.bicep index f53a3e2e68..41e4e6d25e 100644 --- a/avm/res/compute/ssh-public-key/tests/e2e/max/main.test.bicep +++ b/avm/res/compute/ssh-public-key/tests/e2e/max/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.sshPublicKeys-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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) @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { generateSshPubKeyScriptName: 'dep-${namePrefix}-ds-${serviceShort}-generateSshPubKey' sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-sshkey-${serviceShort}001' publicKey: nestedDependencies.outputs.publicKey @@ -73,7 +73,7 @@ module testDeployment '../../../main.bicep' = { principalType: 'ServicePrincipal' } ] - location: location + location: resourceLocation tags: { 'hidden-title': 'This is visible in the resource name' Environment: 'Non-Prod' diff --git a/avm/res/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep index 74feeb11d7..ed12fc9e2c 100644 --- a/avm/res/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/ssh-public-key/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.sshPublicKeys-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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) @@ -29,17 +29,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { generateSshPubKeyScriptName: 'dep-${namePrefix}-ds-${serviceShort}-generateSshPubKey' sshKeyName: 'dep-${namePrefix}-ssh-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -49,7 +49,7 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-sshkey-${serviceShort}001' publicKey: nestedDependencies.outputs.publicKey @@ -74,7 +74,7 @@ module testDeployment '../../../main.bicep' = { principalType: 'ServicePrincipal' } ] - location: location + location: resourceLocation tags: { 'hidden-title': 'This is visible in the resource name' Environment: 'Non-Prod' diff --git a/avm/res/compute/virtual-machine/README.md b/avm/res/compute/virtual-machine/README.md index 56a111434f..221134880b 100644 --- a/avm/res/compute/virtual-machine/README.md +++ b/avm/res/compute/virtual-machine/README.md @@ -53,7 +53,7 @@ This instance deploys the module with registering to an automation account. ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmlinatmg' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmlinatmg' params: { // Required parameters adminUsername: 'localAdminUser' @@ -203,7 +203,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmlinmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmlinmin' params: { // Required parameters adminUsername: 'localAdminUser' @@ -341,7 +341,7 @@ This instance deploys the module with most of its features enabled. ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmlinmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmlinmax' params: { // Required parameters adminUsername: 'localAdministrator' @@ -913,7 +913,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmwinwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmwinwaf' params: { // Required parameters adminUsername: 'VMAdmin' @@ -1521,7 +1521,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmwinmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmwinmin' params: { // Required parameters adminUsername: 'localAdminUser' @@ -1639,7 +1639,7 @@ This instance deploys the module with most of its features enabled. ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmwinmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmwinmax' params: { // Required parameters adminUsername: 'VMAdmin' @@ -2249,7 +2249,7 @@ This instance deploys the module with disk enryption set. ```bicep module virtualMachine 'br/public:avm/res/compute/virtual-machine:' = { - name: '${uniqueString(deployment().name, location)}-test-cvmwincmk' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cvmwincmk' params: { // Required parameters adminUsername: 'VMAdministrator' diff --git a/avm/res/compute/virtual-machine/main.bicep b/avm/res/compute/virtual-machine/main.bicep index c33de899e8..58d04dc2d4 100644 --- a/avm/res/compute/virtual-machine/main.bicep +++ b/avm/res/compute/virtual-machine/main.bicep @@ -688,7 +688,7 @@ output resourceId string = vm.id 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 : '' +output systemAssignedMIPrincipalId string = vm.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = vm.location diff --git a/avm/res/compute/virtual-machine/main.json b/avm/res/compute/virtual-machine/main.json index 20892594ff..4fc18fa227 100644 --- a/avm/res/compute/virtual-machine/main.json +++ b/avm/res/compute/virtual-machine/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "6402533243232998196" + "templateHash": "4884548870640081043" }, "name": "Virtual Machines", "description": "This module deploys a Virtual Machine with one or multiple NICs and optionally one or multiple public IPs.", @@ -4411,7 +4411,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('vm', '2022-11-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/compute/virtual-machine/tests/e2e/atmg/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/atmg/main.test.bicep index 12be87e154..720b41fabe 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/atmg/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/atmg/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with registering to an param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,12 +31,12 @@ var tempLocation = 'northeurope' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -58,7 +58,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}' diff --git a/avm/res/compute/virtual-machine/tests/e2e/linux.defaults/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/linux.defaults/main.test.bicep index 071f6b07a5..11a7eaedd6 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/linux.defaults/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/linux.defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,12 +31,12 @@ var tempLocation = 'northeurope' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -58,7 +58,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}' diff --git a/avm/res/compute/virtual-machine/tests/e2e/linux.max/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/linux.max/main.test.bicep index 03e0c6b33a..ec1bddcf1b 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/linux.max/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/linux.max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'cvmlinmax' @@ -36,7 +36,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -56,7 +56,7 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -72,7 +72,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}' computerName: '${namePrefix}linvm1' diff --git a/avm/res/compute/virtual-machine/tests/e2e/waf-aligned/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/waf-aligned/main.test.bicep index 3b9b393c1e..4e56526eb5 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'cvmwinwaf' @@ -40,7 +40,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -76,7 +76,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}' diff --git a/avm/res/compute/virtual-machine/tests/e2e/windows.defaults/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/windows.defaults/main.test.bicep index 192c1eacb7..03aace62d9 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/windows.defaults/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/windows.defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -40,7 +40,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -53,7 +53,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}' diff --git a/avm/res/compute/virtual-machine/tests/e2e/windows.max/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/windows.max/main.test.bicep index 61ad940d1d..dc0a3701a0 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/windows.max/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/windows.max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'cvmwinmax' @@ -40,7 +40,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -76,7 +76,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}' diff --git a/avm/res/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep b/avm/res/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep index b90b9a2e41..75dcf825ef 100644 --- a/avm/res/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep +++ b/avm/res/compute/virtual-machine/tests/e2e/windows.ssecmk/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with disk enryption set param resourceGroupName string = 'dep-${namePrefix}-compute.virtualMachines-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -43,7 +43,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}' diff --git a/avm/res/consumption/budget/tests/e2e/defaults/main.test.bicep b/avm/res/consumption/budget/tests/e2e/defaults/main.test.bicep index a4f181b32c..4b3537ec84 100644 --- a/avm/res/consumption/budget/tests/e2e/defaults/main.test.bicep +++ b/avm/res/consumption/budget/tests/e2e/defaults/main.test.bicep @@ -8,7 +8,7 @@ metadata description = 'This instance deploys the module with the minimum set of // ========== // @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'cbmin' @@ -25,7 +25,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' name: '${uniqueString(deployment().name)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation amount: 500 contactEmails: [ 'dummy@contoso.com' diff --git a/avm/res/consumption/budget/tests/e2e/max/main.test.bicep b/avm/res/consumption/budget/tests/e2e/max/main.test.bicep index d3f12a005f..39f47f4977 100644 --- a/avm/res/consumption/budget/tests/e2e/max/main.test.bicep +++ b/avm/res/consumption/budget/tests/e2e/max/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with most of its featur param serviceShort string = 'cbmax' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation string = deployment().location @description('Optional. A token to inject into the name of each resource.') param namePrefix string = '#_namePrefix_#' @@ -25,7 +25,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' name: '${uniqueString(deployment().name)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation amount: 500 contactEmails: [ 'dummy@contoso.com' diff --git a/avm/res/consumption/budget/tests/e2e/waf-aligned/main.test.bicep b/avm/res/consumption/budget/tests/e2e/waf-aligned/main.test.bicep index dd498bce67..329c4ea51a 100644 --- a/avm/res/consumption/budget/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/consumption/budget/tests/e2e/waf-aligned/main.test.bicep @@ -8,7 +8,7 @@ metadata description = 'This instance deploys the module in alignment with the b // ========== // @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'cbwaf' @@ -25,7 +25,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' name: '${uniqueString(deployment().name)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation amount: 500 contactEmails: [ 'dummy@contoso.com' diff --git a/avm/res/container-registry/registry/README.md b/avm/res/container-registry/registry/README.md index d3fbf4edca..97bb430b03 100644 --- a/avm/res/container-registry/registry/README.md +++ b/avm/res/container-registry/registry/README.md @@ -50,7 +50,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module registry 'br/public:avm/res/container-registry/registry:' = { - name: '${uniqueString(deployment().name, location)}-test-crrmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crrmin' params: { // Required parameters name: 'crrmin001' @@ -98,7 +98,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign ```bicep module registry 'br/public:avm/res/container-registry/registry:' = { - name: '${uniqueString(deployment().name, location)}-test-crrencr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crrencr' params: { // Required parameters name: 'crrencr001' @@ -178,7 +178,7 @@ This instance deploys the module with most of its features enabled. ```bicep module registry 'br/public:avm/res/container-registry/registry:' = { - name: '${uniqueString(deployment().name, location)}-test-crrmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crrmax' params: { // Required parameters name: 'crrmax001' @@ -454,7 +454,7 @@ This instance deploys the module with a private endpoint. ```bicep module registry 'br/public:avm/res/container-registry/registry:' = { - name: '${uniqueString(deployment().name, location)}-test-crrpe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crrpe' params: { // Required parameters name: 'crrpe001' @@ -524,7 +524,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module registry 'br/public:avm/res/container-registry/registry:' = { - name: '${uniqueString(deployment().name, location)}-test-crrwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-crrwaf' params: { // Required parameters name: 'crrwaf001' diff --git a/avm/res/container-registry/registry/tests/e2e/defaults/main.test.bicep b/avm/res/container-registry/registry/tests/e2e/defaults/main.test.bicep index 2b85e212e2..c9ee60ee98 100644 --- a/avm/res/container-registry/registry/tests/e2e/defaults/main.test.bicep +++ b/avm/res/container-registry/registry/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/container-registry/registry/tests/e2e/encr/main.test.bicep b/avm/res/container-registry/registry/tests/e2e/encr/main.test.bicep index e33262ba94..bf33665f09 100644 --- a/avm/res/container-registry/registry/tests/e2e/encr/main.test.bicep +++ b/avm/res/container-registry/registry/tests/e2e/encr/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,18 +31,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -53,10 +53,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation acrSku: 'Premium' customerManagedKey: { keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName diff --git a/avm/res/container-registry/registry/tests/e2e/max/main.test.bicep b/avm/res/container-registry/registry/tests/e2e/max/main.test.bicep index ed70f7300e..38d182fd5a 100644 --- a/avm/res/container-registry/registry/tests/e2e/max/main.test.bicep +++ b/avm/res/container-registry/registry/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation acrAdminUserEnabled: false acrSku: 'Premium' diagnosticSettings: [ diff --git a/avm/res/container-registry/registry/tests/e2e/pe/main.test.bicep b/avm/res/container-registry/registry/tests/e2e/pe/main.test.bicep index f6289ef186..f56d0c49e3 100644 --- a/avm/res/container-registry/registry/tests/e2e/pe/main.test.bicep +++ b/avm/res/container-registry/registry/tests/e2e/pe/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a private endpoint param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation acrSku: 'Premium' privateEndpoints: [ { diff --git a/avm/res/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep b/avm/res/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep index 8750eccb6f..284f517de9 100644 --- a/avm/res/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/container-registry/registry/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-containerregistry.registries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-ds-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation acrAdminUserEnabled: false acrSku: 'Premium' diagnosticSettings: [ diff --git a/avm/res/container-service/managed-cluster/README.md b/avm/res/container-service/managed-cluster/README.md index 800c225de5..2c14eba530 100644 --- a/avm/res/container-service/managed-cluster/README.md +++ b/avm/res/container-service/managed-cluster/README.md @@ -48,7 +48,7 @@ This instance deploys the module with Azure CNI network plugin . ```bicep module managedCluster 'br/public:avm/res/container-service/managed-cluster:' = { - name: '${uniqueString(deployment().name, location)}-test-csmaz' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csmaz' params: { // Required parameters name: 'csmaz001' @@ -552,7 +552,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module managedCluster 'br/public:avm/res/container-service/managed-cluster:' = { - name: '${uniqueString(deployment().name, location)}-test-csmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csmin' params: { // Required parameters name: 'csmin001' @@ -626,7 +626,7 @@ This instance deploys the module with Kubenet network plugin . ```bicep module managedCluster 'br/public:avm/res/container-service/managed-cluster:' = { - name: '${uniqueString(deployment().name, location)}-test-csmkube' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csmkube' params: { // Required parameters name: 'csmkube001' @@ -906,7 +906,7 @@ This instance deploys the module with a private cluster instance. ```bicep module managedCluster 'br/public:avm/res/container-service/managed-cluster:' = { - name: '${uniqueString(deployment().name, location)}-test-csmpriv' + name: '${uniqueString(deployment().name, resourceLocation)}-test-csmpriv' params: { // Required parameters name: 'csmpriv001' @@ -1132,7 +1132,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module managedCluster 'br/public:avm/res/container-service/managed-cluster:' = { - name: '${uniqueString(deployment().name, location)}-test-cswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-cswaf' params: { // Required parameters name: 'cswaf001' diff --git a/avm/res/container-service/managed-cluster/tests/e2e/azure/main.test.bicep b/avm/res/container-service/managed-cluster/tests/e2e/azure/main.test.bicep index 6d44c21a54..367208a98e 100644 --- a/avm/res/container-service/managed-cluster/tests/e2e/azure/main.test.bicep +++ b/avm/res/container-service/managed-cluster/tests/e2e/azure/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with Azure CNI network param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -30,12 +30,12 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' @@ -46,7 +46,7 @@ module nestedDependencies 'dependencies.bicep' = { keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}-${substring(uniqueString(baseTime), 0, 3)}' dnsZoneName: 'dep-${namePrefix}-dns-${serviceShort}.com' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -54,13 +54,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -71,9 +71,9 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' primaryAgentPoolProfile: [ { diff --git a/avm/res/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep b/avm/res/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep index be98dd9270..b212dcf8f8 100644 --- a/avm/res/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep +++ b/avm/res/container-service/managed-cluster/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'csmin' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation managedIdentities: { systemAssigned: true } diff --git a/avm/res/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep b/avm/res/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep index b5ff8718cd..b5b303ea4e 100644 --- a/avm/res/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep +++ b/avm/res/container-service/managed-cluster/tests/e2e/kubenet/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with Kubenet network pl param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' dnsZoneName: 'dep-${namePrefix}-dns-${serviceShort}.com' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation primaryAgentPoolProfile: [ { availabilityZones: [ diff --git a/avm/res/container-service/managed-cluster/tests/e2e/priv/main.test.bicep b/avm/res/container-service/managed-cluster/tests/e2e/priv/main.test.bicep index b33d9febfc..20f4605976 100644 --- a/avm/res/container-service/managed-cluster/tests/e2e/priv/main.test.bicep +++ b/avm/res/container-service/managed-cluster/tests/e2e/priv/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a private cluster param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - privateDnsZoneName: 'privatelink.${location}.azmk8s.io' + privateDnsZoneName: 'privatelink.${resourceLocation}.azmk8s.io' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -49,10 +49,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation enablePrivateCluster: true primaryAgentPoolProfile: [ { diff --git a/avm/res/container-service/managed-cluster/tests/e2e/waf-aligned/main.test.bicep b/avm/res/container-service/managed-cluster/tests/e2e/waf-aligned/main.test.bicep index 25ed4da8c6..1f001f086e 100644 --- a/avm/res/container-service/managed-cluster/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/container-service/managed-cluster/tests/e2e/waf-aligned/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-containerservice.managedclusters-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -28,12 +28,12 @@ param namePrefix string = '#_namePrefix_#' module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - privateDnsZoneName: 'privatelink.${location}.azmk8s.io' + privateDnsZoneName: 'privatelink.${resourceLocation}.azmk8s.io' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -41,13 +41,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -55,7 +55,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -65,10 +65,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation enablePrivateCluster: true primaryAgentPoolProfile: [ { diff --git a/avm/res/data-factory/factory/README.md b/avm/res/data-factory/factory/README.md index b9c8686d99..14f30ba538 100644 --- a/avm/res/data-factory/factory/README.md +++ b/avm/res/data-factory/factory/README.md @@ -54,7 +54,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module factory 'br/public:avm/res/data-factory/factory:' = { - name: '${uniqueString(deployment().name, location)}-test-dffmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dffmin' params: { // Required parameters name: 'dffmin001' @@ -102,7 +102,7 @@ This instance deploys the module with most of its features enabled. ```bicep module factory 'br/public:avm/res/data-factory/factory:' = { - name: '${uniqueString(deployment().name, location)}-test-dffmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dffmax' params: { // Required parameters name: 'dffmax001' @@ -368,7 +368,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module factory 'br/public:avm/res/data-factory/factory:' = { - name: '${uniqueString(deployment().name, location)}-test-dffwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dffwaf' params: { // Required parameters name: 'dffwaf001' diff --git a/avm/res/data-factory/factory/main.bicep b/avm/res/data-factory/factory/main.bicep index 770b822c7d..58156b0e83 100644 --- a/avm/res/data-factory/factory/main.bicep +++ b/avm/res/data-factory/factory/main.bicep @@ -270,7 +270,7 @@ output resourceId string = dataFactory.id 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 : '' +output systemAssignedMIPrincipalId string = dataFactory.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = dataFactory.location diff --git a/avm/res/data-factory/factory/main.json b/avm/res/data-factory/factory/main.json index 419756e8af..8a6f80d545 100644 --- a/avm/res/data-factory/factory/main.json +++ b/avm/res/data-factory/factory/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "10051365519912587561" + "templateHash": "1210072663750911007" }, "name": "Data Factories", "description": "This module deploys a Data Factory.", @@ -1780,7 +1780,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('dataFactory', '2018-06-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/data-factory/factory/tests/e2e/defaults/main.test.bicep b/avm/res/data-factory/factory/tests/e2e/defaults/main.test.bicep index df2bc4b90a..2946e76de7 100644 --- a/avm/res/data-factory/factory/tests/e2e/defaults/main.test.bicep +++ b/avm/res/data-factory/factory/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-datafactory.factories-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/data-factory/factory/tests/e2e/max/main.test.bicep b/avm/res/data-factory/factory/tests/e2e/max/main.test.bicep index 0e7902fa47..7cabaa0fc7 100644 --- a/avm/res/data-factory/factory/tests/e2e/max/main.test.bicep +++ b/avm/res/data-factory/factory/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-datafactory.factories-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation customerManagedKey: { keyName: nestedDependencies.outputs.keyVaultEncryptionKeyName keyVaultResourceId: nestedDependencies.outputs.keyVaultResourceId diff --git a/avm/res/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep b/avm/res/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep index 238ba134b2..a0e765f6cb 100644 --- a/avm/res/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/data-factory/factory/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-datafactory.factories-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,20 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -52,10 +52,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName diff --git a/avm/res/data-protection/backup-vault/README.md b/avm/res/data-protection/backup-vault/README.md index 8909be5fc0..fc84b5d52f 100644 --- a/avm/res/data-protection/backup-vault/README.md +++ b/avm/res/data-protection/backup-vault/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module backupVault 'br/public:avm/res/data-protection/backup-vault:' = { - name: '${uniqueString(deployment().name, location)}-test-dpbvmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dpbvmin' params: { // Required parameters name: 'dpbvmin001' @@ -92,7 +92,7 @@ This instance deploys the module with most of its features enabled. ```bicep module backupVault 'br/public:avm/res/data-protection/backup-vault:' = { - name: '${uniqueString(deployment().name, location)}-test-dpbvmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dpbvmax' params: { // Required parameters name: 'dpbvmax001' @@ -336,7 +336,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module backupVault 'br/public:avm/res/data-protection/backup-vault:' = { - name: '${uniqueString(deployment().name, location)}-test-dpbvwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dpbvwaf' params: { // Required parameters name: 'dpbvwaf001' diff --git a/avm/res/data-protection/backup-vault/tests/e2e/defaults/main.test.bicep b/avm/res/data-protection/backup-vault/tests/e2e/defaults/main.test.bicep index 87d5dbc39d..c908151dba 100644 --- a/avm/res/data-protection/backup-vault/tests/e2e/defaults/main.test.bicep +++ b/avm/res/data-protection/backup-vault/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-dataprotection.backupvaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dpbvmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/data-protection/backup-vault/tests/e2e/max/main.test.bicep b/avm/res/data-protection/backup-vault/tests/e2e/max/main.test.bicep index 0feddffd60..e2653359e4 100644 --- a/avm/res/data-protection/backup-vault/tests/e2e/max/main.test.bicep +++ b/avm/res/data-protection/backup-vault/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-dataprotection.backupvaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dpbvmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation roleAssignments: [ { roleDefinitionIdOrName: 'Owner' diff --git a/avm/res/data-protection/backup-vault/tests/e2e/waf-aligned/main.test.bicep b/avm/res/data-protection/backup-vault/tests/e2e/waf-aligned/main.test.bicep index ed5f4485a4..1bc01850e2 100644 --- a/avm/res/data-protection/backup-vault/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/data-protection/backup-vault/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-dataprotection.backupvaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dpbvwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azureMonitorAlertSettingsAlertsForAllJobFailures: 'Disabled' managedIdentities: { systemAssigned: true diff --git a/avm/res/databricks/access-connector/README.md b/avm/res/databricks/access-connector/README.md index 0b9126deff..b2c9e52f2c 100644 --- a/avm/res/databricks/access-connector/README.md +++ b/avm/res/databricks/access-connector/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module accessConnector 'br/public:avm/res/databricks/access-connector:' = { - name: '${uniqueString(deployment().name, location)}-test-dacmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dacmin' params: { // Required parameters name: 'dacmin001' @@ -95,7 +95,7 @@ This instance deploys the module with most of its features enabled. ```bicep module accessConnector 'br/public:avm/res/databricks/access-connector:' = { - name: '${uniqueString(deployment().name, location)}-test-dacmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dacmax' params: { // Required parameters name: 'dacmax001' @@ -215,7 +215,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module accessConnector 'br/public:avm/res/databricks/access-connector:' = { - name: '${uniqueString(deployment().name, location)}-test-dacwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dacwaf' params: { // Required parameters name: 'dacwaf001' diff --git a/avm/res/databricks/access-connector/tests/e2e/defaults/main.test.bicep b/avm/res/databricks/access-connector/tests/e2e/defaults/main.test.bicep index 7c2e4e1ad9..9e6536ff96 100644 --- a/avm/res/databricks/access-connector/tests/e2e/defaults/main.test.bicep +++ b/avm/res/databricks/access-connector/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-databricks.accessconnectors-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/databricks/access-connector/tests/e2e/max/main.test.bicep b/avm/res/databricks/access-connector/tests/e2e/max/main.test.bicep index 1ec67b3e3a..d20a52e81d 100644 --- a/avm/res/databricks/access-connector/tests/e2e/max/main.test.bicep +++ b/avm/res/databricks/access-connector/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-databricks.accessconnectors-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,7 +47,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' lock: { @@ -82,6 +82,6 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' Environment: 'Non-Prod' Role: 'DeploymentValidation' } - location: location + location: resourceLocation } }] diff --git a/avm/res/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep b/avm/res/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep index 376d3fd3f6..a12b24ca74 100644 --- a/avm/res/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/databricks/access-connector/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-databricks.accessconnectors-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' lock: { @@ -53,6 +53,6 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' Environment: 'Non-Prod' Role: 'DeploymentValidation' } - location: location + location: resourceLocation } }] diff --git a/avm/res/databricks/workspace/README.md b/avm/res/databricks/workspace/README.md index 9f489d447d..54c21b1d9f 100644 --- a/avm/res/databricks/workspace/README.md +++ b/avm/res/databricks/workspace/README.md @@ -51,7 +51,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module workspace 'br/public:avm/res/databricks/workspace:' = { - name: '${uniqueString(deployment().name, location)}-test-dwmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dwmin' params: { // Required parameters name: 'dwmin001' @@ -361,7 +361,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module workspace 'br/public:avm/res/databricks/workspace:' = { - name: '${uniqueString(deployment().name, location)}-test-dwwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dwwaf' params: { // Required parameters name: 'dwwaf001' diff --git a/avm/res/databricks/workspace/tests/e2e/defaults/main.test.bicep b/avm/res/databricks/workspace/tests/e2e/defaults/main.test.bicep index 23f5959852..daf25fffde 100644 --- a/avm/res/databricks/workspace/tests/e2e/defaults/main.test.bicep +++ b/avm/res/databricks/workspace/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-databricks.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/databricks/workspace/tests/e2e/max/main.test.bicep b/avm/res/databricks/workspace/tests/e2e/max/main.test.bicep index 6aff77cd05..0840f063ff 100644 --- a/avm/res/databricks/workspace/tests/e2e/max/main.test.bicep +++ b/avm/res/databricks/workspace/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-databricks.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -34,7 +34,7 @@ var tempLocation = 'westeurope' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { diff --git a/avm/res/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep b/avm/res/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep index f8b93c8610..ff1b692f41 100644 --- a/avm/res/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/databricks/workspace/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-databricks.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,15 +31,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation amlWorkspaceName: 'dep-${namePrefix}-aml-${serviceShort}' applicationInsightsName: 'dep-${namePrefix}-appi-${serviceShort}' loadBalancerName: 'dep-${namePrefix}-lb-${serviceShort}' @@ -56,13 +56,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}' eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}' - location: location + location: resourceLocation } } @@ -73,10 +73,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/db-for-my-sql/flexible-server/ORPHANED.md b/avm/res/db-for-my-sql/flexible-server/ORPHANED.md deleted file mode 100644 index ef8fa911d2..0000000000 --- a/avm/res/db-for-my-sql/flexible-server/ORPHANED.md +++ /dev/null @@ -1,4 +0,0 @@ -⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ - -- Only security and bug fixes are being handled by the AVM core team at present. -- If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! \ No newline at end of file diff --git a/avm/res/db-for-my-sql/flexible-server/README.md b/avm/res/db-for-my-sql/flexible-server/README.md index 5dc64657fb..5068275f29 100644 --- a/avm/res/db-for-my-sql/flexible-server/README.md +++ b/avm/res/db-for-my-sql/flexible-server/README.md @@ -1,10 +1,5 @@ # DBforMySQL Flexible Servers `[Microsoft.DBforMySQL/flexibleServers]` -> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> -> - Only security and bug fixes are being handled by the AVM core team at present. -> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! - This module deploys a DBforMySQL Flexible Server. ## Navigation @@ -52,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfmsfsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfmsfsmin' params: { // Required parameters name: 'dfmsfsmin001' @@ -116,7 +111,7 @@ This instance deploys the module with most of its features enabled. ```bicep module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfmsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfmsmax' params: { // Required parameters name: 'dfmsmax001' @@ -400,7 +395,7 @@ This instance deploys the module with connectivity mode "Private Access". ```bicep module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfmspvt' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfmspvt' params: { // Required parameters name: 'dfmspvt001' @@ -536,7 +531,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module flexibleServer 'br/public:avm/res/db-for-my-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfmswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfmswaf' params: { // Required parameters name: 'dfmswaf001' diff --git a/avm/res/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep b/avm/res/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep index b4091bfc11..d13a62288a 100644 --- a/avm/res/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep +++ b/avm/res/db-for-my-sql/flexible-server/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -32,7 +32,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -42,10 +42,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password skuName: 'Standard_B1ms' diff --git a/avm/res/db-for-my-sql/flexible-server/tests/e2e/max/main.test.bicep b/avm/res/db-for-my-sql/flexible-server/tests/e2e/max/main.test.bicep index 79ee63174f..517b92d491 100644 --- a/avm/res/db-for-my-sql/flexible-server/tests/e2e/max/main.test.bicep +++ b/avm/res/db-for-my-sql/flexible-server/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dfmsmax' @@ -43,7 +43,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { module nestedDependencies1 'dependencies1.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies1' + name: '${uniqueString(deployment().name, resourceLocation)}-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: tempLocation @@ -54,7 +54,7 @@ module nestedDependencies1 'dependencies1.bicep' = { module nestedDependencies2 'dependencies2.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies2' + name: '${uniqueString(deployment().name, resourceLocation)}-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)}' @@ -70,7 +70,7 @@ module nestedDependencies2 'dependencies2.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -87,7 +87,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep b/avm/res/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep index a2457060a4..ccdb7a4b99 100644 --- a/avm/res/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep +++ b/avm/res/db-for-my-sql/flexible-server/tests/e2e/private/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with connectivity mode param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dfmspvt' @@ -32,16 +32,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -52,7 +52,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: resourceGroup.location diff --git a/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep b/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep index 65b0aa08c2..0db1445062 100644 --- a/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/db-for-my-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-dbformysql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -34,7 +34,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -44,10 +44,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password skuName: 'Standard_B1ms' diff --git a/avm/res/db-for-postgre-sql/flexible-server/README.md b/avm/res/db-for-postgre-sql/flexible-server/README.md index 0f989a825a..2a955d9f31 100644 --- a/avm/res/db-for-postgre-sql/flexible-server/README.md +++ b/avm/res/db-for-postgre-sql/flexible-server/README.md @@ -54,7 +54,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfpsfsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfpsfsmin' params: { // Required parameters name: 'dfpsfsmin001' @@ -118,7 +118,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign ```bicep module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfpsfse' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfpsfse' params: { // Required parameters name: 'dfpsfse001' @@ -206,7 +206,7 @@ This instance deploys the module with private access only. ```bicep module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfpsfspvt' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfpsfspvt' params: { // Required parameters name: 'dfpsfspvt001' @@ -408,7 +408,7 @@ This instance deploys the module with public access. ```bicep module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfpsfsp' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfpsfsp' params: { // Required parameters name: 'dfpsfsp001' @@ -652,7 +652,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:' = { - name: '${uniqueString(deployment().name, location)}-test-dfpsfswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dfpsfswaf' params: { // Required parameters name: 'dfpsfswaf001' diff --git a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep index b972cbcd5e..6daac427c5 100644 --- a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep +++ b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -32,7 +32,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -42,10 +42,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password skuName: 'Standard_B2s' diff --git a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/encr/main.test.bicep b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/encr/main.test.bicep index 31d41df16b..8dc147ed66 100644 --- a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/encr/main.test.bicep +++ b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/encr/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dfpsfse' @@ -35,17 +35,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -56,10 +56,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password skuName: 'Standard_D2s_v3' diff --git a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep index 455f22b552..1653785d7d 100644 --- a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep +++ b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/private/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with private access onl param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -32,16 +32,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -49,13 +49,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -66,10 +66,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password skuName: 'Standard_D2s_v3' diff --git a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep index 01878744ec..c2f8cf2936 100644 --- a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep +++ b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/public/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with public access.' param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,7 +61,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' administrators: [ @@ -141,7 +141,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ] geoRedundantBackup: 'Disabled' highAvailability: 'SameZone' - location: location + location: resourceLocation storageSizeGB: 1024 version: '14' tags: { diff --git a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep index e0bebc0c41..76f84d40cb 100644 --- a/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/db-for-postgre-sql/flexible-server/tests/e2e/waf-aligned/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-dbforpostgresql.flexibleservers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -30,16 +30,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administrators: [ { objectId: nestedDependencies.outputs.managedIdentityClientId diff --git a/avm/res/document-db/database-account/README.md b/avm/res/document-db/database-account/README.md index 64a6f81028..4b0477997d 100644 --- a/avm/res/document-db/database-account/README.md +++ b/avm/res/document-db/database-account/README.md @@ -59,14 +59,14 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module databaseAccount 'br/public:avm/res/document-db/database-account:' = { - name: '${uniqueString(deployment().name, location)}-test-dddamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dddamin' params: { // Required parameters locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: '' + locationName: '' } ] name: 'dddamin001' @@ -94,7 +94,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: { "failoverPriority": 0, "isZoneRedundant": false, - "locationName": "" + "locationName": "" } ] }, @@ -123,14 +123,14 @@ This instance deploys the module with a Gremlin Database. ```bicep module databaseAccount 'br/public:avm/res/document-db/database-account:' = { - name: '${uniqueString(deployment().name, location)}-test-dddagrm' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dddagrm' params: { // Required parameters locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: '' + locationName: '' } { failoverPriority: 1 @@ -254,7 +254,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: { "failoverPriority": 0, "isZoneRedundant": false, - "locationName": "" + "locationName": "" }, { "failoverPriority": 1, @@ -391,14 +391,14 @@ This instance deploys the module with a Mongo Database. ```bicep module databaseAccount 'br/public:avm/res/document-db/database-account:' = { - name: '${uniqueString(deployment().name, location)}-test-dddamng' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dddamng' params: { // Required parameters locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: '' + locationName: '' } { failoverPriority: 1 @@ -656,7 +656,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: { "failoverPriority": 0, "isZoneRedundant": false, - "locationName": "" + "locationName": "" }, { "failoverPriority": 1, @@ -925,14 +925,14 @@ This instance deploys the module without a Database. ```bicep module databaseAccount 'br/public:avm/res/document-db/database-account:' = { - name: '${uniqueString(deployment().name, location)}-test-dddapln' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dddapln' params: { // Required parameters locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: '' + locationName: '' } { failoverPriority: 1 @@ -1005,7 +1005,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: { "failoverPriority": 0, "isZoneRedundant": false, - "locationName": "" + "locationName": "" }, { "failoverPriority": 1, @@ -1087,14 +1087,14 @@ This instance deploys the module with a SQL Database. ```bicep module databaseAccount 'br/public:avm/res/document-db/database-account:' = { - name: '${uniqueString(deployment().name, location)}-test-dddasql' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dddasql' params: { // Required parameters locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: '' + locationName: '' } { failoverPriority: 1 @@ -1256,7 +1256,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: { "failoverPriority": 0, "isZoneRedundant": false, - "locationName": "" + "locationName": "" }, { "failoverPriority": 1, @@ -1431,14 +1431,14 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module databaseAccount 'br/public:avm/res/document-db/database-account:' = { - name: '${uniqueString(deployment().name, location)}-test-dddawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-dddawaf' params: { // Required parameters locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: '' + locationName: '' } { failoverPriority: 1 @@ -1521,7 +1521,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: { "failoverPriority": 0, "isZoneRedundant": false, - "locationName": "" + "locationName": "" }, { "failoverPriority": 1, diff --git a/avm/res/document-db/database-account/main.bicep b/avm/res/document-db/database-account/main.bicep index 5b373585ea..a978785d22 100644 --- a/avm/res/document-db/database-account/main.bicep +++ b/avm/res/document-db/database-account/main.bicep @@ -361,7 +361,7 @@ output resourceId string = databaseAccount.id 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 : '' +output systemAssignedMIPrincipalId string = databaseAccount.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = databaseAccount.location diff --git a/avm/res/document-db/database-account/main.json b/avm/res/document-db/database-account/main.json index eff3621136..5fa57ee291 100644 --- a/avm/res/document-db/database-account/main.json +++ b/avm/res/document-db/database-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "3077721667954326119" + "templateHash": "1861152987880656619" }, "name": "DocumentDB Database Accounts", "description": "This module deploys a DocumentDB Database Account.", @@ -2365,7 +2365,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('databaseAccount', '2023-04-15', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/document-db/database-account/tests/e2e/defaults/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/defaults/main.test.bicep index 2ae49fe3a8..af0711d8c6 100644 --- a/avm/res/document-db/database-account/tests/e2e/defaults/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'dddamin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,15 +38,15 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: location + locationName: resourceLocation } ] } diff --git a/avm/res/document-db/database-account/tests/e2e/gremlindb/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/gremlindb/main.test.bicep index 4732920a15..ad94f42066 100644 --- a/avm/res/document-db/database-account/tests/e2e/gremlindb/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/gremlindb/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a Gremlin Database param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,14 +62,14 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}002' locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: location + locationName: resourceLocation } { failoverPriority: 1 @@ -143,7 +143,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' name: '${namePrefix}-gdb-${serviceShort}-002' } ] - location: location + location: resourceLocation roleAssignments: [ { roleDefinitionIdOrName: 'Owner' diff --git a/avm/res/document-db/database-account/tests/e2e/mongodb/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/mongodb/main.test.bicep index 04b4d4ae18..48b812836a 100644 --- a/avm/res/document-db/database-account/tests/e2e/mongodb/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/mongodb/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a Mongo Database.' param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,14 +62,14 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: location + locationName: resourceLocation } { failoverPriority: 1 @@ -91,7 +91,7 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId } ] - location: location + location: resourceLocation mongodbDatabases: [ { collections: [ diff --git a/avm/res/document-db/database-account/tests/e2e/plain/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/plain/main.test.bicep index d7d00157f3..15f0bddb53 100644 --- a/avm/res/document-db/database-account/tests/e2e/plain/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/plain/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module without a Database.' param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,15 +62,15 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: location + locationName: resourceLocation } { failoverPriority: 1 diff --git a/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep index 4e2f0c89ae..70a0d82469 100644 --- a/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a SQL Database.' param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,14 +62,14 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: location + locationName: resourceLocation } { failoverPriority: 1 @@ -91,7 +91,7 @@ module testDeployment '../../../main.bicep' = { workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId } ] - location: location + location: resourceLocation privateEndpoints: [ { privateDnsZoneResourceIds: [ diff --git a/avm/res/document-db/database-account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/waf-aligned/main.test.bicep index 17b0909383..4f9c11197e 100644 --- a/avm/res/document-db/database-account/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/waf-aligned/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-documentdb.databaseaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -30,16 +30,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' pairedRegionScriptName: 'dep-${namePrefix}-ds-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -63,14 +63,14 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' locations: [ { failoverPriority: 0 isZoneRedundant: false - locationName: location + locationName: resourceLocation } { failoverPriority: 1 @@ -86,7 +86,7 @@ module testDeployment '../../../main.bicep' = { workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId } ] - location: location + location: resourceLocation sqlDatabases: [ { containers: [ diff --git a/avm/res/event-grid/domain/README.md b/avm/res/event-grid/domain/README.md index 23a845bfc2..e70962e416 100644 --- a/avm/res/event-grid/domain/README.md +++ b/avm/res/event-grid/domain/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module domain 'br/public:avm/res/event-grid/domain:' = { - name: '${uniqueString(deployment().name, location)}-test-egdmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egdmin' params: { // Required parameters name: 'egdmin001' @@ -95,7 +95,7 @@ This instance deploys the module with most of its features enabled. ```bicep module domain 'br/public:avm/res/event-grid/domain:' = { - name: '${uniqueString(deployment().name, location)}-test-egdmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egdmax' params: { // Required parameters name: 'egdmax001' @@ -283,7 +283,7 @@ This instance deploys the module with private endpoint. ```bicep module domain 'br/public:avm/res/event-grid/domain:' = { - name: '${uniqueString(deployment().name, location)}-test-egdpe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egdpe' params: { // Required parameters name: 'egdpe001' @@ -371,7 +371,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module domain 'br/public:avm/res/event-grid/domain:' = { - name: '${uniqueString(deployment().name, location)}-test-egdwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egdwaf' params: { // Required parameters name: 'egdwaf001' diff --git a/avm/res/event-grid/domain/main.bicep b/avm/res/event-grid/domain/main.bicep index b131b165d6..bbf28cf7bb 100644 --- a/avm/res/event-grid/domain/main.bicep +++ b/avm/res/event-grid/domain/main.bicep @@ -197,7 +197,7 @@ output resourceGroupName string = resourceGroup().name output location string = domain.location @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(domain.identity, 'principalId') ? domain.identity.principalId : '' +output systemAssignedMIPrincipalId string = domain.?identity.?principalId ?? '' // =============== // // Definitions // diff --git a/avm/res/event-grid/domain/main.json b/avm/res/event-grid/domain/main.json index 6e8b189a34..a7a735774e 100644 --- a/avm/res/event-grid/domain/main.json +++ b/avm/res/event-grid/domain/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "3680673253004786953" + "templateHash": "1330606995473778125" }, "name": "Event Grid Domains", "description": "This module deploys an Event Grid Domain.", @@ -1276,7 +1276,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('domain', '2023-06-01-preview', 'full').identity, 'principalId')), reference('domain', '2023-06-01-preview', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('domain', '2023-06-01-preview', 'full'), 'identity'), 'principalId'), '')]" } } } \ No newline at end of file diff --git a/avm/res/event-grid/domain/tests/e2e/defaults/main.test.bicep b/avm/res/event-grid/domain/tests/e2e/defaults/main.test.bicep index 764a08ee2f..f60f9071a1 100644 --- a/avm/res/event-grid/domain/tests/e2e/defaults/main.test.bicep +++ b/avm/res/event-grid/domain/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/event-grid/domain/tests/e2e/max/main.test.bicep b/avm/res/event-grid/domain/tests/e2e/max/main.test.bicep index c115211d69..2f2e04933a 100644 --- a/avm/res/event-grid/domain/tests/e2e/max/main.test.bicep +++ b/avm/res/event-grid/domain/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/event-grid/domain/tests/e2e/pe/main.test.bicep b/avm/res/event-grid/domain/tests/e2e/pe/main.test.bicep index 0eacb2de9c..49b2014da2 100644 --- a/avm/res/event-grid/domain/tests/e2e/pe/main.test.bicep +++ b/avm/res/event-grid/domain/tests/e2e/pe/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with private endpoint.' param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation privateEndpoints: [ { privateDnsZoneResourceIds: [ @@ -71,5 +71,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep b/avm/res/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep index 50a357ecf7..eaea4d3716 100644 --- a/avm/res/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/event-grid/domain/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-eventgrid.domains-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,10 +61,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/event-grid/system-topic/README.md b/avm/res/event-grid/system-topic/README.md index 9018db3dd2..e1b5fd1989 100644 --- a/avm/res/event-grid/system-topic/README.md +++ b/avm/res/event-grid/system-topic/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module systemTopic 'br/public:avm/res/event-grid/system-topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egstmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egstmin' params: { // Required parameters name: 'egstmin001' @@ -100,7 +100,7 @@ This instance deploys the module with most of its features enabled. ```bicep module systemTopic 'br/public:avm/res/event-grid/system-topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egstmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egstmax' params: { // Required parameters name: 'egstmax001' @@ -300,7 +300,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module systemTopic 'br/public:avm/res/event-grid/system-topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egstwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egstwaf' params: { // Required parameters name: 'egstwaf001' diff --git a/avm/res/event-grid/system-topic/main.bicep b/avm/res/event-grid/system-topic/main.bicep index 0aed5cf590..44d2a06045 100644 --- a/avm/res/event-grid/system-topic/main.bicep +++ b/avm/res/event-grid/system-topic/main.bicep @@ -160,7 +160,7 @@ output resourceId string = systemTopic.id 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 : '' +output systemAssignedMIPrincipalId string = systemTopic.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = systemTopic.location diff --git a/avm/res/event-grid/system-topic/main.json b/avm/res/event-grid/system-topic/main.json index 3c77ce6163..d553c57a1e 100644 --- a/avm/res/event-grid/system-topic/main.json +++ b/avm/res/event-grid/system-topic/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "1435642038697069486" + "templateHash": "3698031087535001530" }, "name": "Event Grid System Topics", "description": "This module deploys an Event Grid System Topic.", @@ -622,7 +622,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('systemTopic', '2021-12-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/event-grid/system-topic/tests/e2e/defaults/main.test.bicep b/avm/res/event-grid/system-topic/tests/e2e/defaults/main.test.bicep index 10d089aae4..a5121372c9 100644 --- a/avm/res/event-grid/system-topic/tests/e2e/defaults/main.test.bicep +++ b/avm/res/event-grid/system-topic/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-eventgrid.systemtopics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { storageAccountName: 'dep${namePrefix}sa${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,11 +61,11 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' source: nestedDependencies.outputs.storageAccountResourceId topicType: 'Microsoft.Storage.StorageAccounts' - location: location + location: resourceLocation } }] diff --git a/avm/res/event-grid/system-topic/tests/e2e/max/main.test.bicep b/avm/res/event-grid/system-topic/tests/e2e/max/main.test.bicep index dab3a5cc29..fc6bf1aef4 100644 --- a/avm/res/event-grid/system-topic/tests/e2e/max/main.test.bicep +++ b/avm/res/event-grid/system-topic/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-eventgrid.systemtopics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}sa${serviceShort}' storageQueueName: 'dep${namePrefix}sq${serviceShort}' - location: location + location: resourceLocation } } @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,12 +62,12 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' source: nestedDependencies.outputs.storageAccountResourceId topicType: 'Microsoft.Storage.StorageAccounts' - location: location + location: resourceLocation eventSubscriptions: [ { name: '${namePrefix}${serviceShort}001' expirationTimeUtc: '2099-01-01T11:00:21.715Z' diff --git a/avm/res/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep b/avm/res/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep index b5d3bfaa90..1fd7a058c0 100644 --- a/avm/res/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/event-grid/system-topic/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-eventgrid.systemtopics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { storageAccountName: 'dep${namePrefix}sa${serviceShort}' storageQueueName: 'dep${namePrefix}sq${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,12 +62,12 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' source: nestedDependencies.outputs.storageAccountResourceId topicType: 'Microsoft.Storage.StorageAccounts' - location: location + location: resourceLocation eventSubscriptions: [ { name: '${namePrefix}${serviceShort}001' expirationTimeUtc: '2099-01-01T11:00:21.715Z' diff --git a/avm/res/event-grid/topic/README.md b/avm/res/event-grid/topic/README.md index caab67a47c..32be5d2e6a 100644 --- a/avm/res/event-grid/topic/README.md +++ b/avm/res/event-grid/topic/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module topic 'br/public:avm/res/event-grid/topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egtmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egtmin' params: { // Required parameters name: 'egtmin001' @@ -95,7 +95,7 @@ This instance deploys the module with most of its features enabled. ```bicep module topic 'br/public:avm/res/event-grid/topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egtmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egtmax' params: { // Required parameters name: 'egtmax001' @@ -347,7 +347,7 @@ This instance deploys the module with the private endpoint. ```bicep module topic 'br/public:avm/res/event-grid/topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egtpe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egtpe' params: { // Required parameters name: 'egtpe001' @@ -435,7 +435,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module topic 'br/public:avm/res/event-grid/topic:' = { - name: '${uniqueString(deployment().name, location)}-test-egtwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-egtwaf' params: { // Required parameters name: 'egtwaf001' diff --git a/avm/res/event-grid/topic/main.bicep b/avm/res/event-grid/topic/main.bicep index 385407d1ca..ac92c43f27 100644 --- a/avm/res/event-grid/topic/main.bicep +++ b/avm/res/event-grid/topic/main.bicep @@ -199,7 +199,7 @@ output resourceGroupName string = resourceGroup().name output location string = topic.location @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(topic.identity, 'principalId') ? topic.identity.principalId : '' +output systemAssignedMIPrincipalId string = topic.?identity.?principalId ?? '' // =============== // // Definitions // diff --git a/avm/res/event-grid/topic/main.json b/avm/res/event-grid/topic/main.json index 32c40b6e1c..769a4ae56a 100644 --- a/avm/res/event-grid/topic/main.json +++ b/avm/res/event-grid/topic/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "6655586293612833663" + "templateHash": "3665951373659879423" }, "name": "Event Grid Topics", "description": "This module deploys an Event Grid Topic.", @@ -1357,7 +1357,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('topic', '2021-06-01-preview', 'full').identity, 'principalId')), reference('topic', '2021-06-01-preview', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('topic', '2021-06-01-preview', 'full'), 'identity'), 'principalId'), '')]" } } } \ No newline at end of file diff --git a/avm/res/event-grid/topic/tests/e2e/defaults/main.test.bicep b/avm/res/event-grid/topic/tests/e2e/defaults/main.test.bicep index 9dd4c1fb02..daa75b91f2 100644 --- a/avm/res/event-grid/topic/tests/e2e/defaults/main.test.bicep +++ b/avm/res/event-grid/topic/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,9 +37,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/event-grid/topic/tests/e2e/max/main.test.bicep b/avm/res/event-grid/topic/tests/e2e/max/main.test.bicep index 6ed2b64a9d..ddd5fb048b 100644 --- a/avm/res/event-grid/topic/tests/e2e/max/main.test.bicep +++ b/avm/res/event-grid/topic/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}sa${serviceShort}' storageQueueName: 'dep${namePrefix}sq${serviceShort}' - location: location + location: resourceLocation } } @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' @@ -163,5 +163,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/event-grid/topic/tests/e2e/pe/main.test.bicep b/avm/res/event-grid/topic/tests/e2e/pe/main.test.bicep index 0f583084f8..95900fbe39 100644 --- a/avm/res/event-grid/topic/tests/e2e/pe/main.test.bicep +++ b/avm/res/event-grid/topic/tests/e2e/pe/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the private endpoi param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation privateEndpoints: [ { privateDnsZoneResourceIds: [ @@ -71,4 +71,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - diff --git a/avm/res/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep b/avm/res/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep index 1d48186b98..087a0bb796 100644 --- a/avm/res/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/event-grid/topic/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-eventgrid.topics-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}sa${serviceShort}' storageQueueName: 'dep${namePrefix}sq${serviceShort}' - location: location + location: resourceLocation } } @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' @@ -129,5 +129,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/health-bot/health-bot/README.md b/avm/res/health-bot/health-bot/README.md index 9d0001fc1d..65a7aef659 100644 --- a/avm/res/health-bot/health-bot/README.md +++ b/avm/res/health-bot/health-bot/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module healthBot 'br/public:avm/res/health-bot/health-bot:' = { - name: '${uniqueString(deployment().name, location)}-test-hbhbmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-hbhbmin' params: { // Required parameters name: 'hbhbmin001' @@ -99,7 +99,7 @@ This instance deploys the module with most of its features enabled. ```bicep module healthBot 'br/public:avm/res/health-bot/health-bot:' = { - name: '${uniqueString(deployment().name, location)}-test-hbhbmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-hbhbmax' params: { // Required parameters name: 'hbhbmax001' @@ -221,7 +221,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module healthBot 'br/public:avm/res/health-bot/health-bot:' = { - name: '${uniqueString(deployment().name, location)}-test-hbhbwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-hbhbwaf' params: { // Required parameters name: 'hbhbwaf001' diff --git a/avm/res/health-bot/health-bot/tests/e2e/defaults/main.test.bicep b/avm/res/health-bot/health-bot/tests/e2e/defaults/main.test.bicep index df6d90ef04..a68c3076ce 100644 --- a/avm/res/health-bot/health-bot/tests/e2e/defaults/main.test.bicep +++ b/avm/res/health-bot/health-bot/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-healthbot.healthbots-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: resourceGroup.location diff --git a/avm/res/health-bot/health-bot/tests/e2e/max/main.test.bicep b/avm/res/health-bot/health-bot/tests/e2e/max/main.test.bicep index 0ad9d9b673..96499db8d7 100644 --- a/avm/res/health-bot/health-bot/tests/e2e/max/main.test.bicep +++ b/avm/res/health-bot/health-bot/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-healthbot.healthbots-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,7 +47,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: resourceGroup.location diff --git a/avm/res/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep b/avm/res/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep index a6f93c3546..7dc48ae873 100644 --- a/avm/res/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/health-bot/health-bot/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-healthbot.healthbots-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: resourceGroup.location diff --git a/avm/res/insights/action-group/README.md b/avm/res/insights/action-group/README.md index 8340f51511..988ac3551b 100644 --- a/avm/res/insights/action-group/README.md +++ b/avm/res/insights/action-group/README.md @@ -41,7 +41,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module actionGroup 'br/public:avm/res/insights/action-group:' = { - name: '${uniqueString(deployment().name, location)}-test-iagmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-iagmin' params: { // Required parameters groupShortName: 'agiagmin001' @@ -93,7 +93,7 @@ This instance deploys the module with most of its features enabled. ```bicep module actionGroup 'br/public:avm/res/insights/action-group:' = { - name: '${uniqueString(deployment().name, location)}-test-iagmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-iagmax' params: { // Required parameters groupShortName: 'agiagmax001' @@ -235,7 +235,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module actionGroup 'br/public:avm/res/insights/action-group:' = { - name: '${uniqueString(deployment().name, location)}-test-iagwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-iagwaf' params: { // Required parameters groupShortName: 'agiagwaf001' diff --git a/avm/res/insights/action-group/tests/e2e/defaults/main.test.bicep b/avm/res/insights/action-group/tests/e2e/defaults/main.test.bicep index 74b8c95346..6091b16997 100644 --- a/avm/res/insights/action-group/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/action-group/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.actiongroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/insights/action-group/tests/e2e/max/main.test.bicep b/avm/res/insights/action-group/tests/e2e/max/main.test.bicep index 82b49b4d96..a11a34591d 100644 --- a/avm/res/insights/action-group/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/action-group/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.actiongroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,7 +47,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/insights/action-group/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/action-group/tests/e2e/waf-aligned/main.test.bicep index 5f6bf02914..68492a4ecb 100644 --- a/avm/res/insights/action-group/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/action-group/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.actiongroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,7 +47,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/insights/activity-log-alert/README.md b/avm/res/insights/activity-log-alert/README.md index 91ef1b357d..305212ff6a 100644 --- a/avm/res/insights/activity-log-alert/README.md +++ b/avm/res/insights/activity-log-alert/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module activityLogAlert 'br/public:avm/res/insights/activity-log-alert:' = { - name: '${uniqueString(deployment().name, location)}-test-ialamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ialamin' params: { // Required parameters conditions: [ @@ -156,7 +156,7 @@ This instance deploys the module with most of its features enabled. ```bicep module activityLogAlert 'br/public:avm/res/insights/activity-log-alert:' = { - name: '${uniqueString(deployment().name, location)}-test-ialamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ialamax' params: { // Required parameters conditions: [ @@ -338,7 +338,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module activityLogAlert 'br/public:avm/res/insights/activity-log-alert:' = { - name: '${uniqueString(deployment().name, location)}-test-ialawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ialawaf' params: { // Required parameters conditions: [ diff --git a/avm/res/insights/activity-log-alert/tests/e2e/defaults/main.test.bicep b/avm/res/insights/activity-log-alert/tests/e2e/defaults/main.test.bicep index 52f7dfd4d2..3de3c2af28 100644 --- a/avm/res/insights/activity-log-alert/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/activity-log-alert/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.activityLogAlerts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ialamin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/insights/activity-log-alert/tests/e2e/max/main.test.bicep b/avm/res/insights/activity-log-alert/tests/e2e/max/main.test.bicep index 6d3d0d3c48..796fb3756e 100644 --- a/avm/res/insights/activity-log-alert/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/activity-log-alert/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.activityLogAlerts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep index bdc02161e4..7af69a877b 100644 --- a/avm/res/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/activity-log-alert/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.activityLogAlerts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,12 +28,12 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}' } @@ -46,7 +46,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/insights/component/README.md b/avm/res/insights/component/README.md index 4bf9d4e366..d75b5b633b 100644 --- a/avm/res/insights/component/README.md +++ b/avm/res/insights/component/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module component 'br/public:avm/res/insights/component:' = { - name: '${uniqueString(deployment().name, location)}-test-icmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-icmin' params: { // Required parameters name: 'icmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module component 'br/public:avm/res/insights/component:' = { - name: '${uniqueString(deployment().name, location)}-test-icmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-icmax' params: { // Required parameters name: 'icmax001' @@ -224,7 +224,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module component 'br/public:avm/res/insights/component:' = { - name: '${uniqueString(deployment().name, location)}-test-icwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-icwaf' params: { // Required parameters name: 'icwaf001' diff --git a/avm/res/insights/component/tests/e2e/defaults/main.test.bicep b/avm/res/insights/component/tests/e2e/defaults/main.test.bicep index 1a62455c75..d2fe9e2443 100644 --- a/avm/res/insights/component/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/component/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.components-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation workspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId } } diff --git a/avm/res/insights/component/tests/e2e/max/main.test.bicep b/avm/res/insights/component/tests/e2e/max/main.test.bicep index 3051b15c84..fe5aa82226 100644 --- a/avm/res/insights/component/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/component/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.components-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId diagnosticSettings: [ { diff --git a/avm/res/insights/component/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/component/tests/e2e/waf-aligned/main.test.bicep index 85300314ee..c8ec8d1383 100644 --- a/avm/res/insights/component/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/component/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.components-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId diagnosticSettings: [ { diff --git a/avm/res/insights/data-collection-endpoint/README.md b/avm/res/insights/data-collection-endpoint/README.md index 3f84ebb88a..6b912f0b7b 100644 --- a/avm/res/insights/data-collection-endpoint/README.md +++ b/avm/res/insights/data-collection-endpoint/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module dataCollectionEndpoint 'br/public:avm/res/insights/data-collection-endpoint:' = { - name: '${uniqueString(deployment().name, location)}-test-idcemin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcemin' params: { // Required parameters name: 'idcemin001' @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module dataCollectionEndpoint 'br/public:avm/res/insights/data-collection-endpoint:' = { - name: '${uniqueString(deployment().name, location)}-test-idcemax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcemax' params: { // Required parameters name: 'idcemax001' @@ -204,7 +204,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module dataCollectionEndpoint 'br/public:avm/res/insights/data-collection-endpoint:' = { - name: '${uniqueString(deployment().name, location)}-test-idcewaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcewaf' params: { // Required parameters name: 'idcewaf001' diff --git a/avm/res/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep b/avm/res/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep index a3b3986863..88c90cd91c 100644 --- a/avm/res/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/data-collection-endpoint/tests/e2e/defaults/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionEndpoints-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,7 +27,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,9 +37,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep b/avm/res/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep index 9a51a139db..f1247259b2 100644 --- a/avm/res/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/data-collection-endpoint/tests/e2e/max/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionEndpoints-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,15 +27,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation publicNetworkAccess: 'Enabled' kind: 'Windows' lock: { diff --git a/avm/res/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep index 2ddab5a4e1..4766a05468 100644 --- a/avm/res/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/data-collection-endpoint/tests/e2e/waf-aligned/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionEndpoints-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,7 +27,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation publicNetworkAccess: 'Disabled' kind: 'Windows' tags: { diff --git a/avm/res/insights/data-collection-rule/README.md b/avm/res/insights/data-collection-rule/README.md index 5c6b468cff..d9c06a97da 100644 --- a/avm/res/insights/data-collection-rule/README.md +++ b/avm/res/insights/data-collection-rule/README.md @@ -47,7 +47,7 @@ This instance deploys the module to setup collection of custom logs and ingestio ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrcusadv' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrcusadv' params: { // Required parameters dataFlows: [ @@ -267,7 +267,7 @@ This instance deploys the module to setup collection of custom logs. ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrcusbas' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrcusbas' params: { // Required parameters dataFlows: [ @@ -455,7 +455,7 @@ This instance deploys the module to setup the collection of IIS logs. ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrcusiis' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrcusiis' params: { // Required parameters dataFlows: [ @@ -599,7 +599,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrmin' params: { // Required parameters dataFlows: [ @@ -733,7 +733,7 @@ This instance deploys the module to setup the collection of Linux-specific perfo ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrlin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrlin' params: { // Required parameters dataFlows: [ @@ -1101,7 +1101,7 @@ This instance deploys the module with most of its features enabled. ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrmax' params: { // Required parameters dataFlows: [ @@ -1335,7 +1335,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrwaf' params: { // Required parameters dataFlows: [ @@ -1611,7 +1611,7 @@ This instance deploys the module to setup the connection of Windows-specific per ```bicep module dataCollectionRule 'br/public:avm/res/insights/data-collection-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-idcrwin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idcrwin' params: { // Required parameters dataFlows: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep index 56f0f10cbf..ded0c6e219 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/customadv/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module to setup collection of param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -27,16 +27,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { dataCollectionEndpointName: 'dep-${namePrefix}-dce-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dataCollectionEndpointId: nestedDependencies.outputs.dataCollectionEndpointResourceId description: 'Collecting custom text logs with ingestion-time transformation to columns. Expected format of a log line (comma separated values): ",,,", for example: "2023-01-25T20:15:05Z,ERROR,404,Page not found"' dataFlows: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/custombasic/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/custombasic/main.test.bicep index fdd36422d1..3fa5aac564 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/custombasic/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/custombasic/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module to setup collection of param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrcusbas' @@ -27,16 +27,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { dataCollectionEndpointName: 'dep-${namePrefix}-dce-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dataCollectionEndpointId: nestedDependencies.outputs.dataCollectionEndpointResourceId description: 'Collecting custom text logs without ingestion-time transformation.' dataFlows: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/customiis/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/customiis/main.test.bicep index 28661eb5f7..4c8af81827 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/customiis/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/customiis/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module to setup the collection param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrcusiis' @@ -27,16 +27,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { dataCollectionEndpointName: 'dep-${namePrefix}-dce-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dataCollectionEndpointId: nestedDependencies.outputs.dataCollectionEndpointResourceId description: 'Collecting IIS logs.' dataFlows: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/defaults/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/defaults/main.test.bicep index 7927fb6619..fc46e9ec99 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/defaults/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrmin' @@ -27,7 +27,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dataSources: { performanceCounters: [ { diff --git a/avm/res/insights/data-collection-rule/tests/e2e/linux/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/linux/main.test.bicep index da05038a43..8f8435b569 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/linux/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/linux/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module to setup the collection param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrlin' @@ -27,15 +27,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation description: 'Collecting Linux-specific performance counters and Linux Syslog' dataSources: { performanceCounters: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/max/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/max/main.test.bicep index 156dc9c6df..7bafac2eb6 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/max/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrmax' @@ -27,17 +27,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { dataCollectionEndpointName: 'dep-${namePrefix}-dce-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dataCollectionEndpointId: nestedDependencies.outputs.dataCollectionEndpointResourceId description: 'Collecting custom text logs without ingestion-time transformation.' dataFlows: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/waf-aligned/main.test.bicep index 584563358b..7c566cc632 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrwaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation description: 'Collecting Windows-specific performance counters and Windows Event Logs' dataSources: { performanceCounters: [ diff --git a/avm/res/insights/data-collection-rule/tests/e2e/windows/main.test.bicep b/avm/res/insights/data-collection-rule/tests/e2e/windows/main.test.bicep index 39e771d99f..9bc58edc58 100644 --- a/avm/res/insights/data-collection-rule/tests/e2e/windows/main.test.bicep +++ b/avm/res/insights/data-collection-rule/tests/e2e/windows/main.test.bicep @@ -11,7 +11,7 @@ metadata description = 'This instance deploys the module to setup the connection param resourceGroupName string = 'dep-${namePrefix}-insights.dataCollectionRules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idcrwin' @@ -27,15 +27,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation description: 'Collecting Windows-specific performance counters and Windows Event Logs' dataSources: { performanceCounters: [ diff --git a/avm/res/insights/diagnostic-setting/README.md b/avm/res/insights/diagnostic-setting/README.md index 05ec4d9b5d..bb077b2bc2 100644 --- a/avm/res/insights/diagnostic-setting/README.md +++ b/avm/res/insights/diagnostic-setting/README.md @@ -40,7 +40,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module diagnosticSetting 'br/public:avm/res/insights/diagnostic-setting:' = { - name: '${uniqueString(deployment().name, location)}-test-idsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idsmin' params: { location: '' name: 'idsmin001' @@ -88,7 +88,7 @@ This instance deploys the module with most of its features enabled. ```bicep module diagnosticSetting 'br/public:avm/res/insights/diagnostic-setting:' = { - name: '${uniqueString(deployment().name, location)}-test-idsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idsmax' params: { eventHubAuthorizationRuleResourceId: '' eventHubName: '' @@ -160,7 +160,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module diagnosticSetting 'br/public:avm/res/insights/diagnostic-setting:' = { - name: '${uniqueString(deployment().name, location)}-test-idswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-idswaf' params: { eventHubAuthorizationRuleResourceId: '' eventHubName: '' diff --git a/avm/res/insights/diagnostic-setting/tests/e2e/defaults/main.test.bicep b/avm/res/insights/diagnostic-setting/tests/e2e/defaults/main.test.bicep index e8d445d8fd..324cb36d18 100644 --- a/avm/res/insights/diagnostic-setting/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/diagnostic-setting/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.diagnosticsettings-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'idsmin' @@ -28,20 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -51,10 +51,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation workspaceResourceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId } }] diff --git a/avm/res/insights/diagnostic-setting/tests/e2e/max/main.test.bicep b/avm/res/insights/diagnostic-setting/tests/e2e/max/main.test.bicep index 063842f1e2..08aea32676 100644 --- a/avm/res/insights/diagnostic-setting/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/diagnostic-setting/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.diagnosticsettings-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,20 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -51,10 +51,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation metricCategories: [ { category: 'AllMetrics' diff --git a/avm/res/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep index 29fc6e288d..02a93b9eb2 100644 --- a/avm/res/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/diagnostic-setting/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.diagnosticsettings-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,20 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2023-07-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -51,10 +51,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation metricCategories: [ { category: 'AllMetrics' diff --git a/avm/res/insights/metric-alert/README.md b/avm/res/insights/metric-alert/README.md index 050f2bee99..087a604a65 100644 --- a/avm/res/insights/metric-alert/README.md +++ b/avm/res/insights/metric-alert/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module metricAlert 'br/public:avm/res/insights/metric-alert:' = { - name: '${uniqueString(deployment().name, location)}-test-imamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-imamin' params: { // Required parameters criterias: [ @@ -126,7 +126,7 @@ This instance deploys the module with most of its features enabled. ```bicep module metricAlert 'br/public:avm/res/insights/metric-alert:' = { - name: '${uniqueString(deployment().name, location)}-test-imamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-imamax' params: { // Required parameters criterias: [ @@ -270,7 +270,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module metricAlert 'br/public:avm/res/insights/metric-alert:' = { - name: '${uniqueString(deployment().name, location)}-test-imawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-imawaf' params: { // Required parameters criterias: [ diff --git a/avm/res/insights/metric-alert/tests/e2e/defaults/main.test.bicep b/avm/res/insights/metric-alert/tests/e2e/defaults/main.test.bicep index bdda463a00..1e5d69fa27 100644 --- a/avm/res/insights/metric-alert/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/metric-alert/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.metricalerts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'imamin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'Global' diff --git a/avm/res/insights/metric-alert/tests/e2e/max/main.test.bicep b/avm/res/insights/metric-alert/tests/e2e/max/main.test.bicep index ce042929ed..a6c15d2793 100644 --- a/avm/res/insights/metric-alert/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/metric-alert/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.metricalerts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'Global' diff --git a/avm/res/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep index 3f99467163..e12bab9638 100644 --- a/avm/res/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/metric-alert/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.metricalerts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,12 +28,12 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { actionGroupName: 'dep-${namePrefix}-ag-${serviceShort}' } @@ -46,7 +46,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'Global' diff --git a/avm/res/insights/scheduled-query-rule/README.md b/avm/res/insights/scheduled-query-rule/README.md index 507d5b50ef..64c355a7d2 100644 --- a/avm/res/insights/scheduled-query-rule/README.md +++ b/avm/res/insights/scheduled-query-rule/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module scheduledQueryRule 'br/public:avm/res/insights/scheduled-query-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-isqrmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-isqrmin' params: { // Required parameters criterias: { @@ -166,7 +166,7 @@ This instance deploys the module with most of its features enabled. ```bicep module scheduledQueryRule 'br/public:avm/res/insights/scheduled-query-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-isqrmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-isqrmax' params: { // Required parameters criterias: { @@ -350,7 +350,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module scheduledQueryRule 'br/public:avm/res/insights/scheduled-query-rule:' = { - name: '${uniqueString(deployment().name, location)}-test-isqrwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-isqrwaf' params: { // Required parameters criterias: { diff --git a/avm/res/insights/scheduled-query-rule/tests/e2e/defaults/main.test.bicep b/avm/res/insights/scheduled-query-rule/tests/e2e/defaults/main.test.bicep index a75f43f24f..3c3f88928d 100644 --- a/avm/res/insights/scheduled-query-rule/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/scheduled-query-rule/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.scheduledqueryrules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'isqrmin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation criterias: { allOf: [ { diff --git a/avm/res/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep b/avm/res/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep index 33365c5d34..bf15311fd2 100644 --- a/avm/res/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/scheduled-query-rule/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.scheduledqueryrules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation alertDescription: 'My sample Alert' autoMitigate: false criterias: { diff --git a/avm/res/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep index 7d53963884..9cc4ee9abb 100644 --- a/avm/res/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/scheduled-query-rule/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.scheduledqueryrules-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation alertDescription: 'My sample Alert' autoMitigate: false criterias: { diff --git a/avm/res/insights/webtest/README.md b/avm/res/insights/webtest/README.md index 400f8623d2..6f37502f31 100644 --- a/avm/res/insights/webtest/README.md +++ b/avm/res/insights/webtest/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module webtest 'br/public:avm/res/insights/webtest:' = { - name: '${uniqueString(deployment().name, location)}-test-iwtmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-iwtmin' params: { // Required parameters appInsightResourceId: '' @@ -113,7 +113,7 @@ This instance deploys the module with most of its features enabled. ```bicep module webtest 'br/public:avm/res/insights/webtest:' = { - name: '${uniqueString(deployment().name, location)}-test-iwtmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-iwtmax' params: { // Required parameters appInsightResourceId: '' @@ -253,7 +253,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module webtest 'br/public:avm/res/insights/webtest:' = { - name: '${uniqueString(deployment().name, location)}-test-iwtwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-iwtwaf' params: { // Required parameters appInsightResourceId: '' diff --git a/avm/res/insights/webtest/tests/e2e/defaults/main.test.bicep b/avm/res/insights/webtest/tests/e2e/defaults/main.test.bicep index 15351e1d6d..2415c915c7 100644 --- a/avm/res/insights/webtest/tests/e2e/defaults/main.test.bicep +++ b/avm/res/insights/webtest/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-insights.webtests-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { appInsightName: 'dep-${namePrefix}-appi-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation appInsightResourceId: nestedDependencies.outputs.appInsightResourceId webTestName: 'wt${namePrefix}$${serviceShort}001' request: { diff --git a/avm/res/insights/webtest/tests/e2e/max/main.test.bicep b/avm/res/insights/webtest/tests/e2e/max/main.test.bicep index 798c1e42ea..55c279f0b1 100644 --- a/avm/res/insights/webtest/tests/e2e/max/main.test.bicep +++ b/avm/res/insights/webtest/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-insights.webtests-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { appInsightName: 'dep-${namePrefix}-appi-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -49,10 +49,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation appInsightResourceId: nestedDependencies.outputs.appInsightResourceId tags: { 'hidden-title': 'This is visible in the resource name' diff --git a/avm/res/insights/webtest/tests/e2e/waf-aligned/main.test.bicep b/avm/res/insights/webtest/tests/e2e/waf-aligned/main.test.bicep index 7514fdacdf..bccb92e4f7 100644 --- a/avm/res/insights/webtest/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/insights/webtest/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-insights.webtests-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { appInsightName: 'dep-${namePrefix}-appi-${serviceShort}' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation appInsightResourceId: nestedDependencies.outputs.appInsightResourceId tags: { 'hidden-title': 'This is visible in the resource name' diff --git a/avm/res/key-vault/vault/README.md b/avm/res/key-vault/vault/README.md index 8baf02b7f8..632164cb6d 100644 --- a/avm/res/key-vault/vault/README.md +++ b/avm/res/key-vault/vault/README.md @@ -51,7 +51,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module vault 'br/public:avm/res/key-vault/vault:' = { - name: '${uniqueString(deployment().name, location)}-test-kvvmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kvvmin' params: { // Required parameters name: 'kvvmin002' @@ -103,7 +103,7 @@ This instance deploys the module with most of its features enabled. ```bicep module vault 'br/public:avm/res/key-vault/vault:' = { - name: '${uniqueString(deployment().name, location)}-test-kvvmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kvvmax' params: { // Required parameters name: 'kvvmax002' @@ -613,7 +613,7 @@ This instance deploys the module with Private Endpoints. ```bicep module vault 'br/public:avm/res/key-vault/vault:' = { - name: '${uniqueString(deployment().name, location)}-test-kvvpe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kvvpe' params: { // Required parameters name: 'kvvpe001' @@ -755,7 +755,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module vault 'br/public:avm/res/key-vault/vault:' = { - name: '${uniqueString(deployment().name, location)}-test-kvvwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kvvwaf' params: { // Required parameters name: 'kvvwaf002' diff --git a/avm/res/key-vault/vault/tests/e2e/defaults/main.test.bicep b/avm/res/key-vault/vault/tests/e2e/defaults/main.test.bicep index 8297b5cf1d..d79cd97b56 100644 --- a/avm/res/key-vault/vault/tests/e2e/defaults/main.test.bicep +++ b/avm/res/key-vault/vault/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,7 +31,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -41,10 +41,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}002' - location: location + location: resourceLocation // Only for testing purposes enablePurgeProtection: false } diff --git a/avm/res/key-vault/vault/tests/e2e/max/main.test.bicep b/avm/res/key-vault/vault/tests/e2e/max/main.test.bicep index 6710a71e32..b7fe8ae213 100644 --- a/avm/res/key-vault/vault/tests/e2e/max/main.test.bicep +++ b/avm/res/key-vault/vault/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}002' - location: location + location: resourceLocation accessPolicies: [ { objectId: nestedDependencies.outputs.managedIdentityPrincipalId diff --git a/avm/res/key-vault/vault/tests/e2e/private-endpoint/main.test.bicep b/avm/res/key-vault/vault/tests/e2e/private-endpoint/main.test.bicep index c391bdf550..6694323ecc 100644 --- a/avm/res/key-vault/vault/tests/e2e/private-endpoint/main.test.bicep +++ b/avm/res/key-vault/vault/tests/e2e/private-endpoint/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with Private Endpoints. param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation privateEndpoints: [ { privateDnsZoneResourceIds: [ diff --git a/avm/res/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep b/avm/res/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep index 0cd1ec7bd8..3415e5afdd 100644 --- a/avm/res/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-keyvault.vaults-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}002' - location: location + location: resourceLocation diagnosticSettings: [ { eventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName diff --git a/avm/res/kubernetes-configuration/extension/README.md b/avm/res/kubernetes-configuration/extension/README.md index 7d56403794..edfe4260dc 100644 --- a/avm/res/kubernetes-configuration/extension/README.md +++ b/avm/res/kubernetes-configuration/extension/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module extension 'br/public:avm/res/kubernetes-configuration/extension:' = { - name: '${uniqueString(deployment().name, location)}-test-kcemin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kcemin' params: { // Required parameters clusterName: '' @@ -108,7 +108,7 @@ This instance deploys the module with most of its features enabled. ```bicep module extension 'br/public:avm/res/kubernetes-configuration/extension:' = { - name: '${uniqueString(deployment().name, location)}-test-kcemax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kcemax' params: { // Required parameters clusterName: '' @@ -234,7 +234,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module extension 'br/public:avm/res/kubernetes-configuration/extension:' = { - name: '${uniqueString(deployment().name, location)}-test-kcewaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kcewaf' params: { // Required parameters clusterName: '' diff --git a/avm/res/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep b/avm/res/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep index 27e1da7346..9ccc8cbe8a 100644 --- a/avm/res/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep +++ b/avm/res/kubernetes-configuration/extension/tests/e2e/defaults/main.test.bicep @@ -14,7 +14,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.extensions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -30,16 +30,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { clusterName: 'dep-${namePrefix}-aks-${serviceShort}' clusterNodeResourceGroupName: 'nodes-${resourceGroupName}' - location: location + location: resourceLocation } } @@ -50,10 +50,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation clusterName: nestedDependencies.outputs.clusterName extensionType: 'microsoft.flux' releaseNamespace: 'flux-system' diff --git a/avm/res/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep b/avm/res/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep index 5a11a6257b..81887207c6 100644 --- a/avm/res/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep +++ b/avm/res/kubernetes-configuration/extension/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.extensions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { clusterName: 'dep-${namePrefix}-aks-${serviceShort}' clusterNodeResourceGroupName: 'nodes-${resourceGroupName}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation clusterName: nestedDependencies.outputs.clusterName extensionType: 'microsoft.flux' configurationSettings: { diff --git a/avm/res/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep b/avm/res/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep index f46741cde8..19633548aa 100644 --- a/avm/res/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/kubernetes-configuration/extension/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.extensions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { clusterName: 'dep-${namePrefix}-aks-${serviceShort}' clusterNodeResourceGroupName: 'nodes-${resourceGroupName}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation clusterName: nestedDependencies.outputs.clusterName extensionType: 'microsoft.flux' configurationSettings: { diff --git a/avm/res/kubernetes-configuration/flux-configuration/README.md b/avm/res/kubernetes-configuration/flux-configuration/README.md index 75e174b03b..bcc7b375e8 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/README.md +++ b/avm/res/kubernetes-configuration/flux-configuration/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:' = { - name: '${uniqueString(deployment().name, location)}-test-kcfcmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kcfcmin' params: { // Required parameters clusterName: '' @@ -135,7 +135,7 @@ This instance deploys the module with most of its features enabled. ```bicep module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:' = { - name: '${uniqueString(deployment().name, location)}-test-kcfcmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kcfcmax' params: { // Required parameters clusterName: '' @@ -249,7 +249,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:' = { - name: '${uniqueString(deployment().name, location)}-test-kcfcwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-kcfcwaf' params: { // Required parameters clusterName: '' diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep index 4b195f6b1a..d7670e5ecd 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.fluxconfigurations-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -31,17 +31,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { clusterName: 'dep-${namePrefix}-aks-${serviceShort}' clusterExtensionName: '${namePrefix}${serviceShort}001' clusterNodeResourceGroupName: 'dep-${namePrefix}-aks-${serviceShort}-rg' - location: location + location: resourceLocation } } @@ -52,9 +52,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' clusterName: nestedDependencies.outputs.clusterName namespace: 'flux-system' diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep index 872304fe85..d91f80c144 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.fluxconfigurations-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { clusterName: 'dep-${namePrefix}-aks-${serviceShort}' clusterExtensionName: '${namePrefix}${serviceShort}001' clusterNodeResourceGroupName: 'dep-${namePrefix}-aks-${serviceShort}-rg' - location: location + location: resourceLocation } } @@ -49,10 +49,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation clusterName: nestedDependencies.outputs.clusterName namespace: 'flux-system' scope: 'cluster' diff --git a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep index 475cdc867f..2b058c0fe5 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/kubernetes-configuration/flux-configuration/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-kubernetesconfiguration.fluxconfigurations-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { clusterName: 'dep-${namePrefix}-aks-${serviceShort}' clusterExtensionName: '${namePrefix}${serviceShort}001' clusterNodeResourceGroupName: 'dep-${namePrefix}-aks-${serviceShort}-rg' - location: location + location: resourceLocation } } @@ -49,12 +49,12 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' clusterName: nestedDependencies.outputs.clusterName namespace: 'flux-system' - location: location + location: resourceLocation scope: 'cluster' sourceKind: 'GitRepository' gitRepository: { diff --git a/avm/res/logic/workflow/README.md b/avm/res/logic/workflow/README.md index 6233d8aa19..da653bf9cf 100644 --- a/avm/res/logic/workflow/README.md +++ b/avm/res/logic/workflow/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module workflow 'br/public:avm/res/logic/workflow:' = { - name: '${uniqueString(deployment().name, location)}-test-lwmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-lwmin' params: { // Required parameters name: 'lwmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module workflow 'br/public:avm/res/logic/workflow:' = { - name: '${uniqueString(deployment().name, location)}-test-lwmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-lwmax' params: { // Required parameters name: 'lwmax001' @@ -308,7 +308,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module workflow 'br/public:avm/res/logic/workflow:' = { - name: '${uniqueString(deployment().name, location)}-test-lwwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-lwwaf' params: { // Required parameters name: 'lwwaf001' diff --git a/avm/res/logic/workflow/main.bicep b/avm/res/logic/workflow/main.bicep index 13dd42c113..86d345e173 100644 --- a/avm/res/logic/workflow/main.bicep +++ b/avm/res/logic/workflow/main.bicep @@ -205,7 +205,7 @@ output resourceGroupName string = resourceGroup().name 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 : '' +output systemAssignedMIPrincipalId string = logicApp.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = logicApp.location diff --git a/avm/res/logic/workflow/main.json b/avm/res/logic/workflow/main.json index 5925fe5a0b..6375e3ae57 100644 --- a/avm/res/logic/workflow/main.json +++ b/avm/res/logic/workflow/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "4655958886873898488" + "templateHash": "4887030268335586960" }, "name": "Logic Apps (Workflows)", "description": "This module deploys a Logic App (Workflow).", @@ -567,7 +567,7 @@ "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, '')]" + "value": "[coalesce(tryGet(tryGet(reference('logicApp', '2019-05-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/logic/workflow/tests/e2e/defaults/main.test.bicep b/avm/res/logic/workflow/tests/e2e/defaults/main.test.bicep index c48184ea65..a88399b180 100644 --- a/avm/res/logic/workflow/tests/e2e/defaults/main.test.bicep +++ b/avm/res/logic/workflow/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-logic.workflows-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'lwmin' @@ -31,7 +31,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -41,9 +41,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/logic/workflow/tests/e2e/max/main.test.bicep b/avm/res/logic/workflow/tests/e2e/max/main.test.bicep index d205faf768..c254af9d97 100644 --- a/avm/res/logic/workflow/tests/e2e/max/main.test.bicep +++ b/avm/res/logic/workflow/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-logic.workflows-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}01' eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}01' - location: location + location: resourceLocation } } @@ -61,10 +61,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/logic/workflow/tests/e2e/waf-aligned/main.test.bicep b/avm/res/logic/workflow/tests/e2e/waf-aligned/main.test.bicep index c27de83d2a..937583ab9e 100644 --- a/avm/res/logic/workflow/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/logic/workflow/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-logic.workflows-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'lwwaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' eventHubNamespaceEventHubName: 'dep-${namePrefix}-evh-${serviceShort}01' eventHubNamespaceName: 'dep-${namePrefix}-evhns-${serviceShort}01' - location: location + location: resourceLocation } } @@ -61,10 +61,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/maintenance/maintenance-configuration/README.md b/avm/res/maintenance/maintenance-configuration/README.md index a322d06355..5e2cb2eefb 100644 --- a/avm/res/maintenance/maintenance-configuration/README.md +++ b/avm/res/maintenance/maintenance-configuration/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module maintenanceConfiguration 'br/public:avm/res/maintenance/maintenance-configuration:' = { - name: '${uniqueString(deployment().name, location)}-test-mmcmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-mmcmin' params: { // Required parameters name: 'mmcmin001' @@ -95,7 +95,7 @@ This instance deploys the module with most of its features enabled. ```bicep module maintenanceConfiguration 'br/public:avm/res/maintenance/maintenance-configuration:' = { - name: '${uniqueString(deployment().name, location)}-test-mmcmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-mmcmax' params: { // Required parameters name: 'mmcmax001' @@ -267,7 +267,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module maintenanceConfiguration 'br/public:avm/res/maintenance/maintenance-configuration:' = { - name: '${uniqueString(deployment().name, location)}-test-mmcwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-mmcwaf' params: { // Required parameters name: 'mmcwaf001' diff --git a/avm/res/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep b/avm/res/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep index 24ecb7900c..7eee9f0efe 100644 --- a/avm/res/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep +++ b/avm/res/maintenance/maintenance-configuration/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-maintenance.maintenanceconfigurations-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep b/avm/res/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep index 8b7c41a7a4..a6c8080465 100644 --- a/avm/res/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep +++ b/avm/res/maintenance/maintenance-configuration/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-maintenance.maintenanceconfigurations-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation extensionProperties: { InGuestPatchMode: 'User' } diff --git a/avm/res/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep b/avm/res/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep index 791421732c..2eb217f971 100644 --- a/avm/res/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/maintenance/maintenance-configuration/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-maintenance.maintenanceconfigurations-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation extensionProperties: { InGuestPatchMode: 'User' } diff --git a/avm/res/managed-identity/user-assigned-identity/README.md b/avm/res/managed-identity/user-assigned-identity/README.md index 0a984c1c2d..51021a5cb9 100644 --- a/avm/res/managed-identity/user-assigned-identity/README.md +++ b/avm/res/managed-identity/user-assigned-identity/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module userAssignedIdentity 'br/public:avm/res/managed-identity/user-assigned-identity:' = { - name: '${uniqueString(deployment().name, location)}-test-miuaimin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-miuaimin' params: { // Required parameters name: 'miuaimin001' @@ -91,7 +91,7 @@ This instance deploys the module with most of its features enabled. ```bicep module userAssignedIdentity 'br/public:avm/res/managed-identity/user-assigned-identity:' = { - name: '${uniqueString(deployment().name, location)}-test-miuaimax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-miuaimax' params: { // Required parameters name: 'miuaimax001' @@ -219,7 +219,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module userAssignedIdentity 'br/public:avm/res/managed-identity/user-assigned-identity:' = { - name: '${uniqueString(deployment().name, location)}-test-miuaiwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-miuaiwaf' params: { // Required parameters name: 'miuaiwaf001' diff --git a/avm/res/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep b/avm/res/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep index 948debf00e..97d58c24d0 100644 --- a/avm/res/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep +++ b/avm/res/managed-identity/user-assigned-identity/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-managedidentity.userassignedidentities-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep b/avm/res/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep index 3c7ee57b22..3df764fdfd 100644 --- a/avm/res/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep +++ b/avm/res/managed-identity/user-assigned-identity/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-managedidentity.userassignedidentities-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location:location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep b/avm/res/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep index 364962868e..8b0ff97cc5 100644 --- a/avm/res/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/managed-identity/user-assigned-identity/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-managedidentity.userassignedidentities-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/net-app/net-app-account/README.md b/avm/res/net-app/net-app-account/README.md index 22acd8f044..1a3358d32d 100644 --- a/avm/res/net-app/net-app-account/README.md +++ b/avm/res/net-app/net-app-account/README.md @@ -50,7 +50,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { - name: '${uniqueString(deployment().name, location)}-test-nanaamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nanaamin' params: { // Required parameters name: 'nanaamin001' @@ -98,7 +98,7 @@ This instance deploys the module with most of its features enabled. ```bicep module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { - name: '${uniqueString(deployment().name, location)}-test-nanaamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nanaamax' params: { // Required parameters name: 'nanaamax001' @@ -360,7 +360,7 @@ This instance deploys the module with nfs31. ```bicep module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { - name: '${uniqueString(deployment().name, location)}-test-nanaanfs3' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nanaanfs3' params: { // Required parameters name: 'nanaanfs3001' @@ -600,7 +600,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module netAppAccount 'br/public:avm/res/net-app/net-app-account:' = { - name: '${uniqueString(deployment().name, location)}-test-nanaawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nanaawaf' params: { // Required parameters name: 'nanaawaf001' diff --git a/avm/res/net-app/net-app-account/tests/e2e/defaults/main.test.bicep b/avm/res/net-app/net-app-account/tests/e2e/defaults/main.test.bicep index 3c7446c1ef..19c1b6d37b 100644 --- a/avm/res/net-app/net-app-account/tests/e2e/defaults/main.test.bicep +++ b/avm/res/net-app/net-app-account/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -40,7 +40,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/net-app/net-app-account/tests/e2e/max/main.test.bicep b/avm/res/net-app/net-app-account/tests/e2e/max/main.test.bicep index 14603d2194..b8865f0428 100644 --- a/avm/res/net-app/net-app-account/tests/e2e/max/main.test.bicep +++ b/avm/res/net-app/net-app-account/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nanaamax' @@ -36,7 +36,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' @@ -50,7 +50,7 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep b/avm/res/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep index f389b83a78..764ffda9c8 100644 --- a/avm/res/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep +++ b/avm/res/net-app/net-app-account/tests/e2e/nfs3/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with nfs31.' param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -36,7 +36,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' @@ -50,7 +50,7 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep index 83f7da408c..b0edf958c0 100644 --- a/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/net-app/net-app-account/tests/e2e/waf-aligned/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-netapp.netappaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -43,7 +43,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: tempLocation diff --git a/avm/res/network/application-security-group/README.md b/avm/res/network/application-security-group/README.md index 8a5633789d..b2131c1a04 100644 --- a/avm/res/network/application-security-group/README.md +++ b/avm/res/network/application-security-group/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module applicationSecurityGroup 'br/public:avm/res/network/application-security-group:' = { - name: '${uniqueString(deployment().name, location)}-test-nasgmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nasgmin' params: { // Required parameters name: 'nasgmin001' @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module applicationSecurityGroup 'br/public:avm/res/network/application-security-group:' = { - name: '${uniqueString(deployment().name, location)}-test-nasgmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nasgmax' params: { // Required parameters name: 'nasgmax001' @@ -196,7 +196,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module applicationSecurityGroup 'br/public:avm/res/network/application-security-group:' = { - name: '${uniqueString(deployment().name, location)}-test-nasgwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nasgwaf' params: { // Required parameters name: 'nasgwaf001' diff --git a/avm/res/network/application-security-group/tests/e2e/defaults/main.test.bicep b/avm/res/network/application-security-group/tests/e2e/defaults/main.test.bicep index e63d09090c..3805501d29 100644 --- a/avm/res/network/application-security-group/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/application-security-group/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.applicationsecuritygroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nasgmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/network/application-security-group/tests/e2e/max/main.test.bicep b/avm/res/network/application-security-group/tests/e2e/max/main.test.bicep index 40b237c62f..ad4f14a855 100644 --- a/avm/res/network/application-security-group/tests/e2e/max/main.test.bicep +++ b/avm/res/network/application-security-group/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.applicationsecuritygroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nasgmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/application-security-group/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/application-security-group/tests/e2e/waf-aligned/main.test.bicep index b7feb9fbbe..9743d1fe3b 100644 --- a/avm/res/network/application-security-group/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/application-security-group/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.applicationsecuritygroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nasgwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/bastion-host/README.md b/avm/res/network/bastion-host/README.md index 0f1121e07d..dd623e6f75 100644 --- a/avm/res/network/bastion-host/README.md +++ b/avm/res/network/bastion-host/README.md @@ -45,7 +45,7 @@ This instance does not require a pre-deployed public IP but includes its deploym ```bicep module bastionHost 'br/public:avm/res/network/bastion-host:' = { - name: '${uniqueString(deployment().name, location)}-test-nbhctmpip' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nbhctmpip' params: { // Required parameters name: 'nbhctmpip001' @@ -175,7 +175,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module bastionHost 'br/public:avm/res/network/bastion-host:' = { - name: '${uniqueString(deployment().name, location)}-test-nbhmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nbhmin' params: { // Required parameters name: 'nbhmin001' @@ -227,7 +227,7 @@ This instance deploys the module with most of its features enabled. ```bicep module bastionHost 'br/public:avm/res/network/bastion-host:' = { - name: '${uniqueString(deployment().name, location)}-test-nbhmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nbhmax' params: { // Required parameters name: 'nbhmax001' @@ -385,7 +385,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module bastionHost 'br/public:avm/res/network/bastion-host:' = { - name: '${uniqueString(deployment().name, location)}-test-nbhwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nbhwaf' params: { // Required parameters name: 'nbhwaf001' diff --git a/avm/res/network/bastion-host/tests/e2e/custompip/main.test.bicep b/avm/res/network/bastion-host/tests/e2e/custompip/main.test.bicep index c2ad27c6f7..91163fa547 100644 --- a/avm/res/network/bastion-host/tests/e2e/custompip/main.test.bicep +++ b/avm/res/network/bastion-host/tests/e2e/custompip/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance does not require a pre-deployed public IP param resourceGroupName string = 'dep-${namePrefix}-network.bastionhosts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nbhctmpip' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation vNetId: nestedDependencies.outputs.virtualNetworkResourceId publicIPAddressObject: { name: '${namePrefix}${serviceShort}001-pip' diff --git a/avm/res/network/bastion-host/tests/e2e/defaults/main.test.bicep b/avm/res/network/bastion-host/tests/e2e/defaults/main.test.bicep index 00394de2e2..fbc9394986 100644 --- a/avm/res/network/bastion-host/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/bastion-host/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.bastionhosts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nbhmin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation vNetId: nestedDependencies.outputs.virtualNetworkResourceId } }] diff --git a/avm/res/network/bastion-host/tests/e2e/max/main.test.bicep b/avm/res/network/bastion-host/tests/e2e/max/main.test.bicep index b321deebb5..9595cb7612 100644 --- a/avm/res/network/bastion-host/tests/e2e/max/main.test.bicep +++ b/avm/res/network/bastion-host/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.bastionhosts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nbhmax' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' publicIPName: 'dep-${namePrefix}-pip-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -63,10 +63,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation vNetId: nestedDependencies.outputs.virtualNetworkResourceId bastionSubnetPublicIpResourceId: nestedDependencies.outputs.publicIPResourceId diagnosticSettings: [ diff --git a/avm/res/network/bastion-host/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/bastion-host/tests/e2e/waf-aligned/main.test.bicep index 5d6b0538eb..3e5ce775d7 100644 --- a/avm/res/network/bastion-host/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/bastion-host/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.bastionhosts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nbhwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' publicIPName: 'dep-${namePrefix}-pip-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation vNetId: nestedDependencies.outputs.virtualNetworkResourceId bastionSubnetPublicIpResourceId: nestedDependencies.outputs.publicIPResourceId diagnosticSettings: [ diff --git a/avm/res/network/connection/README.md b/avm/res/network/connection/README.md index 56c620a937..cfca233145 100644 --- a/avm/res/network/connection/README.md +++ b/avm/res/network/connection/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module connection 'br/public:avm/res/network/connection:' = { - name: '${uniqueString(deployment().name, location)}-test-ncmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ncmin' params: { // Required parameters name: 'ncmin001' @@ -114,7 +114,7 @@ This instance deploys the module with most of its features enabled. ```bicep module connection 'br/public:avm/res/network/connection:' = { - name: '${uniqueString(deployment().name, location)}-test-ncmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ncmax' params: { // Required parameters name: 'ncmax001' @@ -220,7 +220,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module connection 'br/public:avm/res/network/connection:' = { - name: '${uniqueString(deployment().name, location)}-test-ncwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ncwaf' params: { // Required parameters name: 'ncwaf001' diff --git a/avm/res/network/connection/tests/e2e/defaults/main.test.bicep b/avm/res/network/connection/tests/e2e/defaults/main.test.bicep index 0f5bb0b1b4..2a99ca88b8 100644 --- a/avm/res/network/connection/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/connection/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.connections-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ncmin' @@ -35,12 +35,12 @@ var tempLocation = 'italynorth' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation primaryPublicIPName: 'dep-${namePrefix}-pip-${serviceShort}-1' @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' diff --git a/avm/res/network/connection/tests/e2e/max/main.test.bicep b/avm/res/network/connection/tests/e2e/max/main.test.bicep index cb98b96551..a59ac37a5d 100644 --- a/avm/res/network/connection/tests/e2e/max/main.test.bicep +++ b/avm/res/network/connection/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.connections-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ncmax' @@ -35,12 +35,12 @@ var tempLocation = 'italynorth' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation primaryPublicIPName: 'dep-${namePrefix}-pip-${serviceShort}-1' @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' diff --git a/avm/res/network/connection/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/connection/tests/e2e/waf-aligned/main.test.bicep index 0eb607a5f7..e416190b72 100644 --- a/avm/res/network/connection/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/connection/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.connections-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ncwaf' @@ -35,12 +35,12 @@ var tempLocation = 'italynorth' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation primaryPublicIPName: 'dep-${namePrefix}-pip-${serviceShort}-1' @@ -59,7 +59,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' diff --git a/avm/res/network/ddos-protection-plan/README.md b/avm/res/network/ddos-protection-plan/README.md index 56892605ef..f41dd6567f 100644 --- a/avm/res/network/ddos-protection-plan/README.md +++ b/avm/res/network/ddos-protection-plan/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module ddosProtectionPlan 'br/public:avm/res/network/ddos-protection-plan:' = { - name: '${uniqueString(deployment().name, location)}-test-ndppmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndppmin' params: { // Required parameters name: 'ndppmin001' @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module ddosProtectionPlan 'br/public:avm/res/network/ddos-protection-plan:' = { - name: '${uniqueString(deployment().name, location)}-test-ndppmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndppmax' params: { // Required parameters name: 'ndppmax001' @@ -196,7 +196,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module ddosProtectionPlan 'br/public:avm/res/network/ddos-protection-plan:' = { - name: '${uniqueString(deployment().name, location)}-test-ndppwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndppwaf' params: { // Required parameters name: 'ndppwaf001' diff --git a/avm/res/network/ddos-protection-plan/tests/e2e/defaults/main.test.bicep b/avm/res/network/ddos-protection-plan/tests/e2e/defaults/main.test.bicep index db63d47838..da732fc0c1 100644 --- a/avm/res/network/ddos-protection-plan/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/ddos-protection-plan/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.ddosprotectionplans-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = 'uksouth' +param resourceLocation 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 = 'ndppmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,9 +37,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } } diff --git a/avm/res/network/ddos-protection-plan/tests/e2e/max/main.test.bicep b/avm/res/network/ddos-protection-plan/tests/e2e/max/main.test.bicep index 0b356bcbb6..cb5de1c255 100644 --- a/avm/res/network/ddos-protection-plan/tests/e2e/max/main.test.bicep +++ b/avm/res/network/ddos-protection-plan/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.ddosprotectionplans-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = 'eastus2' +param resourceLocation 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 = 'ndppmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/ddos-protection-plan/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/ddos-protection-plan/tests/e2e/waf-aligned/main.test.bicep index c53c15c40e..9509e6dca6 100644 --- a/avm/res/network/ddos-protection-plan/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/ddos-protection-plan/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.ddosprotectionplans-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = 'eastus' +param resourceLocation 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 = 'ndppwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/dns-forwarding-ruleset/README.md b/avm/res/network/dns-forwarding-ruleset/README.md index 2f78e29c7e..f029102bd3 100644 --- a/avm/res/network/dns-forwarding-ruleset/README.md +++ b/avm/res/network/dns-forwarding-ruleset/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module dnsForwardingRuleset 'br/public:avm/res/network/dns-forwarding-ruleset:' = { - name: '${uniqueString(deployment().name, location)}-test-ndfrsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndfrsmin' params: { // Required parameters dnsForwardingRulesetOutboundEndpointResourceIds: [ @@ -102,7 +102,7 @@ This instance deploys the module with most of its features enabled. ```bicep module dnsForwardingRuleset 'br/public:avm/res/network/dns-forwarding-ruleset:' = { - name: '${uniqueString(deployment().name, location)}-test-ndfrsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndfrsmax' params: { // Required parameters dnsForwardingRulesetOutboundEndpointResourceIds: [ @@ -252,7 +252,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module dnsForwardingRuleset 'br/public:avm/res/network/dns-forwarding-ruleset:' = { - name: '${uniqueString(deployment().name, location)}-test-ndfrswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndfrswaf' params: { // Required parameters dnsForwardingRulesetOutboundEndpointResourceIds: [ diff --git a/avm/res/network/dns-forwarding-ruleset/tests/e2e/defaults/main.test.bicep b/avm/res/network/dns-forwarding-ruleset/tests/e2e/defaults/main.test.bicep index 937fabd992..15c0bac31f 100644 --- a/avm/res/network/dns-forwarding-ruleset/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/dns-forwarding-ruleset/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-network.dnsForwardingRuleset-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndfrsmin' @@ -31,16 +31,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' dnsResolverName: 'dep-${namePrefix}-ndr-${serviceShort}' - location: location + location: resourceLocation } } @@ -51,12 +51,12 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' dnsForwardingRulesetOutboundEndpointResourceIds: [ nestedDependencies.outputs.dnsResolverOutboundEndpointsResourceId ] - location: location + location: resourceLocation } }] diff --git a/avm/res/network/dns-forwarding-ruleset/tests/e2e/max/main.test.bicep b/avm/res/network/dns-forwarding-ruleset/tests/e2e/max/main.test.bicep index 89f5c7f85c..60ecc18e5b 100644 --- a/avm/res/network/dns-forwarding-ruleset/tests/e2e/max/main.test.bicep +++ b/avm/res/network/dns-forwarding-ruleset/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.dnsForwardingRuleset-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndfrsmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' dnsResolverName: 'dep-${namePrefix}-ndr-${serviceShort}' - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -49,10 +49,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dnsForwardingRulesetOutboundEndpointResourceIds: [ nestedDependencies.outputs.dnsResolverOutboundEndpointsId ] diff --git a/avm/res/network/dns-forwarding-ruleset/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/dns-forwarding-ruleset/tests/e2e/waf-aligned/main.test.bicep index e757e76cf7..71afa436a9 100644 --- a/avm/res/network/dns-forwarding-ruleset/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/dns-forwarding-ruleset/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.dnsForwardingRuleset-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndfrswaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' dnsResolverName: 'dep-${namePrefix}-ndr-${serviceShort}' - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -49,10 +49,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dnsForwardingRulesetOutboundEndpointResourceIds: [ nestedDependencies.outputs.dnsResolverOutboundEndpointsId ] diff --git a/avm/res/network/dns-resolver/README.md b/avm/res/network/dns-resolver/README.md index 2513e2ceb9..7b3c5ad147 100644 --- a/avm/res/network/dns-resolver/README.md +++ b/avm/res/network/dns-resolver/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module dnsResolver 'br/public:avm/res/network/dns-resolver:' = { - name: '${uniqueString(deployment().name, location)}-test-ndrmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndrmin' params: { // Required parameters name: 'ndrmin001' @@ -98,7 +98,7 @@ This instance deploys the module with most of its features enabled. ```bicep module dnsResolver 'br/public:avm/res/network/dns-resolver:' = { - name: '${uniqueString(deployment().name, location)}-test-ndrmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndrmax' params: { // Required parameters name: 'ndrmax001' @@ -236,7 +236,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module dnsResolver 'br/public:avm/res/network/dns-resolver:' = { - name: '${uniqueString(deployment().name, location)}-test-ndrwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndrwaf' params: { // Required parameters name: 'ndrwaf001' diff --git a/avm/res/network/dns-resolver/tests/e2e/defaults/main.test.bicep b/avm/res/network/dns-resolver/tests/e2e/defaults/main.test.bicep index aff32456f8..15b630c156 100644 --- a/avm/res/network/dns-resolver/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/dns-resolver/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-network.dnsResolvers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndrmin' @@ -31,16 +31,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -51,10 +51,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' virtualNetworkResourceId: nestedDependencies.outputs.virtualNetworkResourceId - location: location + location: resourceLocation } }] diff --git a/avm/res/network/dns-resolver/tests/e2e/max/main.test.bicep b/avm/res/network/dns-resolver/tests/e2e/max/main.test.bicep index 66818b0a24..a942d6711c 100644 --- a/avm/res/network/dns-resolver/tests/e2e/max/main.test.bicep +++ b/avm/res/network/dns-resolver/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.dnsResolvers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndrmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation virtualNetworkResourceId: nestedDependencies.outputs.virtualNetworkResourceId lock: { kind: 'CanNotDelete' diff --git a/avm/res/network/dns-resolver/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/dns-resolver/tests/e2e/waf-aligned/main.test.bicep index 4070b4cc6e..7f820efb73 100644 --- a/avm/res/network/dns-resolver/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/dns-resolver/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.dnsResolvers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndrwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { name: 'myCustomLockName' kind: 'CanNotDelete' diff --git a/avm/res/network/dns-zone/README.md b/avm/res/network/dns-zone/README.md index ffdc48431b..69d5d2b65d 100644 --- a/avm/res/network/dns-zone/README.md +++ b/avm/res/network/dns-zone/README.md @@ -52,7 +52,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module dnsZone 'br/public:avm/res/network/dns-zone:' = { - name: '${uniqueString(deployment().name, location)}-test-ndzmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndzmin' params: { // Required parameters name: 'ndzmin001.com' @@ -100,7 +100,7 @@ This instance deploys the module with most of its features enabled. ```bicep module dnsZone 'br/public:avm/res/network/dns-zone:' = { - name: '${uniqueString(deployment().name, location)}-test-ndzmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndzmax' params: { // Required parameters name: 'ndzmax001.com' @@ -660,7 +660,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module dnsZone 'br/public:avm/res/network/dns-zone:' = { - name: '${uniqueString(deployment().name, location)}-test-ndzwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ndzwaf' params: { // Required parameters name: 'ndzwaf001.com' diff --git a/avm/res/network/dns-zone/tests/e2e/defaults/main.test.bicep b/avm/res/network/dns-zone/tests/e2e/defaults/main.test.bicep index 51671d7ce1..7c97b1e101 100644 --- a/avm/res/network/dns-zone/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/dns-zone/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.dnszones-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndzmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001.com' location: 'global' diff --git a/avm/res/network/dns-zone/tests/e2e/max/main.test.bicep b/avm/res/network/dns-zone/tests/e2e/max/main.test.bicep index 25588e8228..a7827f4d55 100644 --- a/avm/res/network/dns-zone/tests/e2e/max/main.test.bicep +++ b/avm/res/network/dns-zone/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.dnszones-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndzmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { trafficManagerProfileName: 'dep-${namePrefix}-tmp-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001.com' location: 'global' diff --git a/avm/res/network/dns-zone/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/dns-zone/tests/e2e/waf-aligned/main.test.bicep index 9a0dd49254..a3d821e933 100644 --- a/avm/res/network/dns-zone/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/dns-zone/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.dnszones-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ndzwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { trafficManagerProfileName: 'dep-${namePrefix}-tmp-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001.com' location: 'global' diff --git a/avm/res/network/express-route-circuit/README.md b/avm/res/network/express-route-circuit/README.md index 439b024b4c..03dadf9daa 100644 --- a/avm/res/network/express-route-circuit/README.md +++ b/avm/res/network/express-route-circuit/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module expressRouteCircuit 'br/public:avm/res/network/express-route-circuit:' = { - name: '${uniqueString(deployment().name, location)}-test-nercmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nercmin' params: { // Required parameters bandwidthInMbps: 50 @@ -103,7 +103,7 @@ This instance deploys the module with most of its features enabled. ```bicep module expressRouteCircuit 'br/public:avm/res/network/express-route-circuit:' = { - name: '${uniqueString(deployment().name, location)}-test-nercmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nercmax' params: { // Required parameters bandwidthInMbps: 50 @@ -264,7 +264,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module expressRouteCircuit 'br/public:avm/res/network/express-route-circuit:' = { - name: '${uniqueString(deployment().name, location)}-test-nercwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nercwaf' params: { // Required parameters bandwidthInMbps: 50 diff --git a/avm/res/network/express-route-circuit/tests/e2e/defaults/main.test.bicep b/avm/res/network/express-route-circuit/tests/e2e/defaults/main.test.bicep index 0854dbee8c..27ad16cd30 100644 --- a/avm/res/network/express-route-circuit/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/express-route-circuit/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.expressroutecircuits-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nercmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,14 +38,12 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' bandwidthInMbps: 50 peeringLocation: 'Amsterdam' serviceProviderName: 'Equinix' - location: location + location: resourceLocation } }] - - diff --git a/avm/res/network/express-route-circuit/tests/e2e/max/main.test.bicep b/avm/res/network/express-route-circuit/tests/e2e/max/main.test.bicep index fcbde41067..fbe38c7edd 100644 --- a/avm/res/network/express-route-circuit/tests/e2e/max/main.test.bicep +++ b/avm/res/network/express-route-circuit/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.expressroutecircuits-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nercmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation bandwidthInMbps: 50 peeringLocation: 'Amsterdam' serviceProviderName: 'Equinix' diff --git a/avm/res/network/express-route-circuit/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/express-route-circuit/tests/e2e/waf-aligned/main.test.bicep index c61aec26f8..bd5b28139a 100644 --- a/avm/res/network/express-route-circuit/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/express-route-circuit/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.expressroutecircuits-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nercwaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation bandwidthInMbps: 50 peeringLocation: 'Amsterdam' serviceProviderName: 'Equinix' @@ -95,5 +95,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/network/express-route-gateway/README.md b/avm/res/network/express-route-gateway/README.md index 2f57298e04..8bf06769a7 100644 --- a/avm/res/network/express-route-gateway/README.md +++ b/avm/res/network/express-route-gateway/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module expressRouteGateway 'br/public:avm/res/network/express-route-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nergmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nergmin' params: { // Required parameters name: 'nergmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module expressRouteGateway 'br/public:avm/res/network/express-route-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nergmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nergmax' params: { // Required parameters name: 'nergmax001' @@ -210,7 +210,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module expressRouteGateway 'br/public:avm/res/network/express-route-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nergwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nergwaf' params: { // Required parameters name: 'nergwaf001' diff --git a/avm/res/network/express-route-gateway/tests/e2e/defaults/main.test.bicep b/avm/res/network/express-route-gateway/tests/e2e/defaults/main.test.bicep index 3101c73a2b..ec3957fa03 100644 --- a/avm/res/network/express-route-gateway/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/express-route-gateway/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.expressRouteGateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nergmin' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualWANName: 'dep-${namePrefix}-vwan-${serviceShort}' virtualHubName: 'dep-${namePrefix}-hub-${serviceShort}' - location: location + location: resourceLocation } } // ============== // @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation virtualHubId: nestedDependencies.outputs.virtualHubResourceId } diff --git a/avm/res/network/express-route-gateway/tests/e2e/max/main.test.bicep b/avm/res/network/express-route-gateway/tests/e2e/max/main.test.bicep index c434688564..9d9206e251 100644 --- a/avm/res/network/express-route-gateway/tests/e2e/max/main.test.bicep +++ b/avm/res/network/express-route-gateway/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.expressRouteGateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nergmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualWANName: 'dep-${namePrefix}-vwan-${serviceShort}' virtualHubName: 'dep-${namePrefix}-hub-${serviceShort}' - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation tags: { 'hidden-title': 'This is visible in the resource name' hello: 'world' diff --git a/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/dependencies.bicep b/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/dependencies.bicep index cf53573850..0e84400a01 100644 --- a/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/dependencies.bicep +++ b/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/dependencies.bicep @@ -25,4 +25,3 @@ resource virtualHub 'Microsoft.Network/virtualHubs@2023-04-01' = { @description('The resource ID of the created Virtual Hub.') output virtualHubResourceId string = virtualHub.id - diff --git a/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/main.test.bicep index 85e1adb10e..d3929548bb 100644 --- a/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/express-route-gateway/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.expressRouteGateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nergwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualWANName: 'dep-${namePrefix}-vwan-${serviceShort}' virtualHubName: 'dep-${namePrefix}-hub-${serviceShort}' - location: location + location: resourceLocation } } // ============== // @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation tags: { 'hidden-title': 'This is visible in the resource name' hello: 'world' diff --git a/avm/res/network/firewall-policy/ORPHANED.md b/avm/res/network/firewall-policy/ORPHANED.md deleted file mode 100644 index ef8fa911d2..0000000000 --- a/avm/res/network/firewall-policy/ORPHANED.md +++ /dev/null @@ -1,4 +0,0 @@ -⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ - -- Only security and bug fixes are being handled by the AVM core team at present. -- If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! \ No newline at end of file diff --git a/avm/res/network/firewall-policy/README.md b/avm/res/network/firewall-policy/README.md index 0009160b35..14b984bee9 100644 --- a/avm/res/network/firewall-policy/README.md +++ b/avm/res/network/firewall-policy/README.md @@ -1,10 +1,5 @@ # Firewall Policies `[Microsoft.Network/firewallPolicies]` -> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> -> - Only security and bug fixes are being handled by the AVM core team at present. -> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! - This module deploys a Firewall Policy. ## Navigation @@ -46,7 +41,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module firewallPolicy 'br/public:avm/res/network/firewall-policy:' = { - name: '${uniqueString(deployment().name, location)}-test-nfpmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nfpmin' params: { // Required parameters name: 'nfpmin001' @@ -94,7 +89,7 @@ This instance deploys the module with most of its features enabled. ```bicep module firewallPolicy 'br/public:avm/res/network/firewall-policy:' = { - name: '${uniqueString(deployment().name, location)}-test-nfpmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nfpmax' params: { // Required parameters name: 'nfpmax001' @@ -260,7 +255,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module firewallPolicy 'br/public:avm/res/network/firewall-policy:' = { - name: '${uniqueString(deployment().name, location)}-test-nfpwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nfpwaf' params: { // Required parameters name: 'nfpwaf001' diff --git a/avm/res/network/firewall-policy/tests/e2e/defaults/main.test.bicep b/avm/res/network/firewall-policy/tests/e2e/defaults/main.test.bicep index b7f696192f..c48fbf7ba4 100644 --- a/avm/res/network/firewall-policy/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/firewall-policy/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.firewallpolicies-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nfpmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/network/firewall-policy/tests/e2e/max/main.test.bicep b/avm/res/network/firewall-policy/tests/e2e/max/main.test.bicep index ea6f60886d..0295a163df 100644 --- a/avm/res/network/firewall-policy/tests/e2e/max/main.test.bicep +++ b/avm/res/network/firewall-policy/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.firewallpolicies-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nfpmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation tier: 'Premium' mode: 'Alert' ruleCollectionGroups: [ diff --git a/avm/res/network/firewall-policy/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/firewall-policy/tests/e2e/waf-aligned/main.test.bicep index 5804989b7c..51003decf8 100644 --- a/avm/res/network/firewall-policy/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/firewall-policy/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.firewallpolicies-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nfpwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation ruleCollectionGroups: [ { name: '${namePrefix}-rule-001' diff --git a/avm/res/network/front-door-web-application-firewall-policy/ORPHANED.md b/avm/res/network/front-door-web-application-firewall-policy/ORPHANED.md deleted file mode 100644 index ef8fa911d2..0000000000 --- a/avm/res/network/front-door-web-application-firewall-policy/ORPHANED.md +++ /dev/null @@ -1,4 +0,0 @@ -⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ - -- Only security and bug fixes are being handled by the AVM core team at present. -- If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! \ No newline at end of file diff --git a/avm/res/network/front-door-web-application-firewall-policy/README.md b/avm/res/network/front-door-web-application-firewall-policy/README.md index cf4c6a7864..a8cb404398 100644 --- a/avm/res/network/front-door-web-application-firewall-policy/README.md +++ b/avm/res/network/front-door-web-application-firewall-policy/README.md @@ -1,10 +1,5 @@ # Front Door Web Application Firewall (WAF) Policies `[Microsoft.Network/FrontDoorWebApplicationFirewallPolicies]` -> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> -> - Only security and bug fixes are being handled by the AVM core team at present. -> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! - This module deploys a Front Door Web Application Firewall (WAF) Policy. ## Navigation @@ -47,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module frontDoorWebApplicationFirewallPolicy 'br/public:avm/res/network/front-door-web-application-firewall-policy:' = { - name: '${uniqueString(deployment().name, location)}-test-nagwafpmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nagwafpmin' params: { // Required parameters name: 'nagwafpmin001' @@ -95,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module frontDoorWebApplicationFirewallPolicy 'br/public:avm/res/network/front-door-web-application-firewall-policy:' = { - name: '${uniqueString(deployment().name, location)}-test-nagwafpmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nagwafpmax' params: { // Required parameters name: 'nagwafpmax001' @@ -335,7 +330,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module frontDoorWebApplicationFirewallPolicy 'br/public:avm/res/network/front-door-web-application-firewall-policy:' = { - name: '${uniqueString(deployment().name, location)}-test-nagwafpwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nagwafpwaf' params: { // Required parameters name: 'nagwafpwaf001' diff --git a/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/defaults/main.test.bicep b/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/defaults/main.test.bicep index a2a8bcddd1..92998f86dc 100644 --- a/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.frontdoorWebApplicationFirewallPolicies-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nagwafpmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/max/main.test.bicep b/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/max/main.test.bicep index a952e91e69..e5a2cab892 100644 --- a/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/max/main.test.bicep +++ b/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.frontdoorWebApplicationFirewallPolicies-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep index 4e9017dbd7..9fc72dff92 100644 --- a/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/front-door-web-application-firewall-policy/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.frontdoorWebApplicationFirewallPolicies-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation sku: 'Premium_AzureFrontDoor' policySettings: { mode: 'Prevention' diff --git a/avm/res/network/front-door/README.md b/avm/res/network/front-door/README.md index 3a84efb3dc..41c269566a 100644 --- a/avm/res/network/front-door/README.md +++ b/avm/res/network/front-door/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module frontDoor 'br/public:avm/res/network/front-door:' = { - name: '${uniqueString(deployment().name, location)}-test-nfdmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nfdmin' params: { // Required parameters backendPools: [ @@ -259,7 +259,7 @@ This instance deploys the module with most of its features enabled. ```bicep module frontDoor 'br/public:avm/res/network/front-door:' = { - name: '${uniqueString(deployment().name, location)}-test-nfdmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nfdmax' params: { // Required parameters backendPools: [ @@ -609,7 +609,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module frontDoor 'br/public:avm/res/network/front-door:' = { - name: '${uniqueString(deployment().name, location)}-test-nfdwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nfdwaf' params: { // Required parameters backendPools: [ diff --git a/avm/res/network/front-door/tests/e2e/defaults/main.test.bicep b/avm/res/network/front-door/tests/e2e/defaults/main.test.bicep index 3383086a5b..9da362d16d 100644 --- a/avm/res/network/front-door/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/front-door/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.frontdoors-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nfdmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ var resourceName = '${namePrefix}${serviceShort}001' @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: resourceName - location: location + location: resourceLocation frontendEndpoints: [ { name: 'frontEnd' diff --git a/avm/res/network/front-door/tests/e2e/max/main.test.bicep b/avm/res/network/front-door/tests/e2e/max/main.test.bicep index e382c33a61..2af64d2d37 100644 --- a/avm/res/network/front-door/tests/e2e/max/main.test.bicep +++ b/avm/res/network/front-door/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.frontdoors-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nfdmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,10 +61,10 @@ var resourceName = '${namePrefix}${serviceShort}001' @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: resourceName - location: location + location: resourceLocation backendPools: [ { name: 'backendPool' diff --git a/avm/res/network/front-door/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/front-door/tests/e2e/waf-aligned/main.test.bicep index 30a605417a..ccefa82e3f 100644 --- a/avm/res/network/front-door/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/front-door/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.frontdoors-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nfdwaf' @@ -28,20 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -52,10 +52,10 @@ var resourceName = '${namePrefix}${serviceShort}001' @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: resourceName - location: location + location: resourceLocation backendPools: [ { name: 'backendPool' diff --git a/avm/res/network/load-balancer/README.md b/avm/res/network/load-balancer/README.md index b4e0294a2d..15334b8bb0 100644 --- a/avm/res/network/load-balancer/README.md +++ b/avm/res/network/load-balancer/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module loadBalancer 'br/public:avm/res/network/load-balancer:' = { - name: '${uniqueString(deployment().name, location)}-test-nlbmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlbmin' params: { // Required parameters frontendIPConfigurations: [ @@ -117,7 +117,7 @@ This instance deploys the module with the minimum set of required parameters to ```bicep module loadBalancer 'br/public:avm/res/network/load-balancer:' = { - name: '${uniqueString(deployment().name, location)}-test-nlbint' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlbint' params: { // Required parameters frontendIPConfigurations: [ @@ -335,7 +335,7 @@ This instance deploys the module with most of its features enabled. ```bicep module loadBalancer 'br/public:avm/res/network/load-balancer:' = { - name: '${uniqueString(deployment().name, location)}-test-nlbmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlbmax' params: { // Required parameters frontendIPConfigurations: [ @@ -643,7 +643,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module loadBalancer 'br/public:avm/res/network/load-balancer:' = { - name: '${uniqueString(deployment().name, location)}-test-nlbwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlbwaf' params: { // Required parameters frontendIPConfigurations: [ diff --git a/avm/res/network/load-balancer/tests/e2e/defaults/main.test.bicep b/avm/res/network/load-balancer/tests/e2e/defaults/main.test.bicep index 713916b673..fe23a602f3 100644 --- a/avm/res/network/load-balancer/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/load-balancer/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.loadbalancers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlbmin' @@ -28,13 +28,13 @@ param namePrefix string = '#_namePrefix_#' // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -42,15 +42,15 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { publicIPName: 'dep-${namePrefix}-pip-${serviceShort}' - location: location + location: resourceLocation } } @@ -61,10 +61,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: {} diagnosticSettings: [] frontendIPConfigurations: [ diff --git a/avm/res/network/load-balancer/tests/e2e/internal/main.test.bicep b/avm/res/network/load-balancer/tests/e2e/internal/main.test.bicep index 72a0a57bb5..a16be760a5 100644 --- a/avm/res/network/load-balancer/tests/e2e/internal/main.test.bicep +++ b/avm/res/network/load-balancer/tests/e2e/internal/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.loadbalancers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlbint' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation frontendIPConfigurations: [ { name: 'privateIPConfig1' diff --git a/avm/res/network/load-balancer/tests/e2e/max/main.test.bicep b/avm/res/network/load-balancer/tests/e2e/max/main.test.bicep index f05076a241..6b6ad6d9e0 100644 --- a/avm/res/network/load-balancer/tests/e2e/max/main.test.bicep +++ b/avm/res/network/load-balancer/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.loadbalancers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlbmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { publicIPName: 'dep-${namePrefix}-pip-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation frontendIPConfigurations: [ { name: 'publicIPConfig1' diff --git a/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep index 700bb3c3d8..86fa6e6ecf 100644 --- a/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/load-balancer/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.loadbalancers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlbwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { publicIPName: 'dep-${namePrefix}-pip-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation frontendIPConfigurations: [ { name: 'publicIPConfig1' diff --git a/avm/res/network/local-network-gateway/README.md b/avm/res/network/local-network-gateway/README.md index 75e638a4ac..f913b29d05 100644 --- a/avm/res/network/local-network-gateway/README.md +++ b/avm/res/network/local-network-gateway/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module localNetworkGateway 'br/public:avm/res/network/local-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nlngmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlngmin' params: { // Required parameters localAddressPrefixes: [ @@ -102,7 +102,7 @@ This instance deploys the module with most of its features enabled. ```bicep module localNetworkGateway 'br/public:avm/res/network/local-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nlngmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlngmax' params: { // Required parameters localAddressPrefixes: [ @@ -228,7 +228,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module localNetworkGateway 'br/public:avm/res/network/local-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nlngwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nlngwaf' params: { // Required parameters localAddressPrefixes: [ diff --git a/avm/res/network/local-network-gateway/tests/e2e/defaults/main.test.bicep b/avm/res/network/local-network-gateway/tests/e2e/defaults/main.test.bicep index 4a551f243f..3d8c1fa7b7 100644 --- a/avm/res/network/local-network-gateway/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/local-network-gateway/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.localnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlngmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' localAddressPrefixes: [ '192.168.1.0/24' @@ -48,7 +48,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' localGatewayPublicIpAddress: '8.8.8.8' } }] - - - - diff --git a/avm/res/network/local-network-gateway/tests/e2e/max/main.test.bicep b/avm/res/network/local-network-gateway/tests/e2e/max/main.test.bicep index 3d59039559..e2300f1c24 100644 --- a/avm/res/network/local-network-gateway/tests/e2e/max/main.test.bicep +++ b/avm/res/network/local-network-gateway/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.localnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlngmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -47,9 +47,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' localAddressPrefixes: [ '192.168.1.0/24' @@ -85,7 +85,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - - - diff --git a/avm/res/network/local-network-gateway/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/local-network-gateway/tests/e2e/waf-aligned/main.test.bicep index d9ae249b78..0dacd22889 100644 --- a/avm/res/network/local-network-gateway/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/local-network-gateway/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.localnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nlngwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' localAddressPrefixes: [ '192.168.1.0/24' @@ -59,7 +59,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - - - diff --git a/avm/res/network/nat-gateway/README.md b/avm/res/network/nat-gateway/README.md index 4db79b86a5..b1567ecf30 100644 --- a/avm/res/network/nat-gateway/README.md +++ b/avm/res/network/nat-gateway/README.md @@ -46,7 +46,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module natGateway 'br/public:avm/res/network/nat-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nngmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nngmin' params: { // Required parameters name: 'nngmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module natGateway 'br/public:avm/res/network/nat-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nngmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nngmax' params: { // Required parameters name: 'nngmax001' @@ -286,7 +286,7 @@ This example shows how you can provide a Public IP Prefix to the module, while a ```bicep module natGateway 'br/public:avm/res/network/nat-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nngcprx' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nngcprx' params: { // Required parameters name: 'nngcprx001' @@ -354,7 +354,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module natGateway 'br/public:avm/res/network/nat-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nngwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nngwaf' params: { // Required parameters name: 'nngwaf001' diff --git a/avm/res/network/nat-gateway/tests/e2e/defaults/main.test.bicep b/avm/res/network/nat-gateway/tests/e2e/defaults/main.test.bicep index f98611c101..911d92d36f 100644 --- a/avm/res/network/nat-gateway/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/nat-gateway/tests/e2e/defaults/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.natgateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -30,7 +30,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -40,10 +40,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { // You parameters go here - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' } }] diff --git a/avm/res/network/nat-gateway/tests/e2e/max/main.test.bicep b/avm/res/network/nat-gateway/tests/e2e/max/main.test.bicep index d443a1c30e..7f859e396b 100644 --- a/avm/res/network/nat-gateway/tests/e2e/max/main.test.bicep +++ b/avm/res/network/nat-gateway/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.natgateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nngmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location:location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,9 +61,9 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' lock: { kind: 'CanNotDelete' @@ -73,21 +73,21 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' { name: '${namePrefix}${serviceShort}001-pip' 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' - } + { + 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' + } ] skuTier: 'Regional' zones: [ diff --git a/avm/res/network/nat-gateway/tests/e2e/prefixCombined/main.test.bicep b/avm/res/network/nat-gateway/tests/e2e/prefixCombined/main.test.bicep index ebb524443b..8680b7934d 100644 --- a/avm/res/network/nat-gateway/tests/e2e/prefixCombined/main.test.bicep +++ b/avm/res/network/nat-gateway/tests/e2e/prefixCombined/main.test.bicep @@ -12,12 +12,11 @@ metadata description = 'This example shows how you can provide a Public IP Prefi param resourceGroupName string = 'dep-${namePrefix}-network.natgateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nngcprx' - @description('Optional. A token to inject into the name of each resource.') param namePrefix string = '#_namePrefix_#' @@ -29,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -39,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' publicIPPrefixObjects: [ { diff --git a/avm/res/network/nat-gateway/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/nat-gateway/tests/e2e/waf-aligned/main.test.bicep index 3d95875960..710a0de739 100644 --- a/avm/res/network/nat-gateway/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/nat-gateway/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.natgateway-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nngwaf' @@ -28,21 +28,20 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } - // Diagnostics // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -53,9 +52,9 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' lock: { kind: 'CanNotDelete' diff --git a/avm/res/network/network-interface/README.md b/avm/res/network/network-interface/README.md index 42befd7f7f..71662f900b 100644 --- a/avm/res/network/network-interface/README.md +++ b/avm/res/network/network-interface/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module networkInterface 'br/public:avm/res/network/network-interface:' = { - name: '${uniqueString(deployment().name, location)}-test-nnimin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nnimin' params: { // Required parameters ipConfigurations: [ @@ -105,7 +105,7 @@ This instance deploys the module with most of its features enabled. ```bicep module networkInterface 'br/public:avm/res/network/network-interface:' = { - name: '${uniqueString(deployment().name, location)}-test-nnimax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nnimax' params: { // Required parameters ipConfigurations: [ @@ -281,7 +281,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module networkInterface 'br/public:avm/res/network/network-interface:' = { - name: '${uniqueString(deployment().name, location)}-test-nniwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nniwaf' params: { // Required parameters ipConfigurations: [ diff --git a/avm/res/network/network-interface/tests/e2e/defaults/main.test.bicep b/avm/res/network/network-interface/tests/e2e/defaults/main.test.bicep index 8c81d40c45..5ffea88ff2 100644 --- a/avm/res/network/network-interface/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/network-interface/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.networkinterfaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nnimin' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation ipConfigurations: [ { name: 'ipconfig01' diff --git a/avm/res/network/network-interface/tests/e2e/max/main.test.bicep b/avm/res/network/network-interface/tests/e2e/max/main.test.bicep index f4e2963622..9cca8336eb 100644 --- a/avm/res/network/network-interface/tests/e2e/max/main.test.bicep +++ b/avm/res/network/network-interface/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.networkinterfaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nnimax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation ipConfigurations: [ { applicationSecurityGroups: [ diff --git a/avm/res/network/network-interface/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/network-interface/tests/e2e/waf-aligned/main.test.bicep index 02782ff698..23484b0e28 100644 --- a/avm/res/network/network-interface/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/network-interface/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.networkinterfaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nniwaf' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' loadBalancerName: 'dep-${namePrefix}-lb-${serviceShort}' @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -63,10 +63,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation ipConfigurations: [ { applicationSecurityGroups: [ diff --git a/avm/res/network/network-security-group/README.md b/avm/res/network/network-security-group/README.md index 3053f2c2a2..d452941b7d 100644 --- a/avm/res/network/network-security-group/README.md +++ b/avm/res/network/network-security-group/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module networkSecurityGroup 'br/public:avm/res/network/network-security-group:' = { - name: '${uniqueString(deployment().name, location)}-test-nnsgmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nnsgmin' params: { // Required parameters name: 'nnsgmin001' @@ -92,7 +92,7 @@ This instance deploys the module with most of its features enabled. ```bicep module networkSecurityGroup 'br/public:avm/res/network/network-security-group:' = { - name: '${uniqueString(deployment().name, location)}-test-nnsgmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nnsgmax' params: { // Required parameters name: 'nnsgmax001' @@ -348,7 +348,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module networkSecurityGroup 'br/public:avm/res/network/network-security-group:' = { - name: '${uniqueString(deployment().name, location)}-test-nnsgwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nnsgwaf' params: { // Required parameters name: 'nnsgwaf001' diff --git a/avm/res/network/network-security-group/tests/e2e/defaults/main.test.bicep b/avm/res/network/network-security-group/tests/e2e/defaults/main.test.bicep index 4242c2f6d9..4778e3177b 100644 --- a/avm/res/network/network-security-group/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/network-security-group/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.networksecuritygroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nnsgmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/network/network-security-group/tests/e2e/max/main.test.bicep b/avm/res/network/network-security-group/tests/e2e/max/main.test.bicep index b2e4f9997c..3347be3ee8 100644 --- a/avm/res/network/network-security-group/tests/e2e/max/main.test.bicep +++ b/avm/res/network/network-security-group/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.networksecuritygroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nnsgmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/network/network-security-group/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/network-security-group/tests/e2e/waf-aligned/main.test.bicep index 753e7270c8..711dbee1a4 100644 --- a/avm/res/network/network-security-group/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/network-security-group/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.networksecuritygroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nnsgwaf' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -61,10 +61,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation diagnosticSettings: [ { name: 'customSetting' diff --git a/avm/res/network/private-dns-zone/README.md b/avm/res/network/private-dns-zone/README.md index 1159c1dddc..4af1c35950 100644 --- a/avm/res/network/private-dns-zone/README.md +++ b/avm/res/network/private-dns-zone/README.md @@ -53,7 +53,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module privateDnsZone 'br/public:avm/res/network/private-dns-zone:' = { - name: '${uniqueString(deployment().name, location)}-test-npdzmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npdzmin' params: { // Required parameters name: 'npdzmin001.com' @@ -101,7 +101,7 @@ This instance deploys the module with most of its features enabled. ```bicep module privateDnsZone 'br/public:avm/res/network/private-dns-zone:' = { - name: '${uniqueString(deployment().name, location)}-test-npdzmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npdzmax' params: { // Required parameters name: 'npdzmax001.com' @@ -667,7 +667,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module privateDnsZone 'br/public:avm/res/network/private-dns-zone:' = { - name: '${uniqueString(deployment().name, location)}-test-npdzwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npdzwaf' params: { // Required parameters name: 'npdzwaf001.com' diff --git a/avm/res/network/private-dns-zone/tests/e2e/defaults/main.test.bicep b/avm/res/network/private-dns-zone/tests/e2e/defaults/main.test.bicep index 0c43e4878b..29c950ed0d 100644 --- a/avm/res/network/private-dns-zone/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/private-dns-zone/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-network.privatednszones-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npdzmin' @@ -31,7 +31,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -41,7 +41,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001.com' location: 'global' diff --git a/avm/res/network/private-dns-zone/tests/e2e/max/main.test.bicep b/avm/res/network/private-dns-zone/tests/e2e/max/main.test.bicep index 360bc32452..e95348146f 100644 --- a/avm/res/network/private-dns-zone/tests/e2e/max/main.test.bicep +++ b/avm/res/network/private-dns-zone/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.privatednszones-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npdzmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001.com' location: 'global' diff --git a/avm/res/network/private-dns-zone/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/private-dns-zone/tests/e2e/waf-aligned/main.test.bicep index 423c9f185c..cad9a29cfc 100644 --- a/avm/res/network/private-dns-zone/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/private-dns-zone/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.privatednszones-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npdzwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001.com' location: 'global' diff --git a/avm/res/network/private-endpoint/README.md b/avm/res/network/private-endpoint/README.md index f813411f2d..15622ca5f0 100644 --- a/avm/res/network/private-endpoint/README.md +++ b/avm/res/network/private-endpoint/README.md @@ -45,7 +45,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = { - name: '${uniqueString(deployment().name, location)}-test-npemin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npemin' params: { // Required parameters name: 'npemin001' @@ -161,7 +161,7 @@ This instance deploys the module with most of its features enabled. ```bicep module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = { - name: '${uniqueString(deployment().name, location)}-test-npemax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npemax' params: { // Required parameters name: 'npemax001' @@ -365,7 +365,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module privateEndpoint 'br/public:avm/res/network/private-endpoint:' = { - name: '${uniqueString(deployment().name, location)}-test-npewaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npewaf' params: { // Required parameters name: 'npewaf001' diff --git a/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep b/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep index 14c6f0e2d9..545b7bcd9d 100644 --- a/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/private-endpoint/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-network.privateendpoints-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npemin' @@ -31,16 +31,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' - location: location + location: resourceLocation } } @@ -51,10 +51,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation subnetResourceId: nestedDependencies.outputs.subnetResourceId // Workaround for PSRule lock: {} diff --git a/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep b/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep index 7b3e0e4fd8..c33302af69 100644 --- a/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep +++ b/avm/res/network/private-endpoint/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.privateendpoints-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npemax' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' - location: location + location: resourceLocation } } @@ -50,10 +50,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation subnetResourceId: nestedDependencies.outputs.subnetResourceId lock: { kind: 'CanNotDelete' diff --git a/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep index 2c1fda4447..1a7534fdc4 100644 --- a/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/private-endpoint/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.privateendpoints-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npewaf' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' - location: location + location: resourceLocation } } @@ -50,10 +50,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation subnetResourceId: nestedDependencies.outputs.subnetResourceId lock: { kind: 'CanNotDelete' diff --git a/avm/res/network/public-ip-address/README.md b/avm/res/network/public-ip-address/README.md index dfdb4ca6be..ccf0741f21 100644 --- a/avm/res/network/public-ip-address/README.md +++ b/avm/res/network/public-ip-address/README.md @@ -45,7 +45,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module publicIpAddress 'br/public:avm/res/network/public-ip-address:' = { - name: '${uniqueString(deployment().name, location)}-test-npiamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npiamin' params: { // Required parameters name: 'npiamin001' @@ -93,7 +93,7 @@ This instance deploys the module with most of its features enabled. ```bicep module publicIpAddress 'br/public:avm/res/network/public-ip-address:' = { - name: '${uniqueString(deployment().name, location)}-test-npiamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npiamax' params: { // Required parameters name: 'npiamax001' @@ -259,7 +259,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module publicIpAddress 'br/public:avm/res/network/public-ip-address:' = { - name: '${uniqueString(deployment().name, location)}-test-npiawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npiawaf' params: { // Required parameters name: 'npiawaf001' diff --git a/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep b/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep index b4e293d5f8..911bfd315d 100644 --- a/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/public-ip-address/tests/e2e/defaults/main.test.bicep @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'dep-${namePrefix}-network.publicipaddresses-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npiamin' @@ -31,7 +31,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -40,9 +40,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/network/public-ip-address/tests/e2e/max/main.test.bicep b/avm/res/network/public-ip-address/tests/e2e/max/main.test.bicep index 8520b8d043..a0a37e644f 100644 --- a/avm/res/network/public-ip-address/tests/e2e/max/main.test.bicep +++ b/avm/res/network/public-ip-address/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.publicipaddresses-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npiamax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../../avm/utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../../avm/utilities/e2e-template-a module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { name: 'myCustomLockName' kind: 'CanNotDelete' diff --git a/avm/res/network/public-ip-address/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/public-ip-address/tests/e2e/waf-aligned/main.test.bicep index 68f69d0966..81c76101ea 100644 --- a/avm/res/network/public-ip-address/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/public-ip-address/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.publicipaddresses-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npiawaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../../avm/utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../../avm/utilities/e2e-template-a module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { name: 'myCustomLockName' kind: 'CanNotDelete' diff --git a/avm/res/network/public-ip-prefix/README.md b/avm/res/network/public-ip-prefix/README.md index edf4d1290d..0b9a7496ae 100644 --- a/avm/res/network/public-ip-prefix/README.md +++ b/avm/res/network/public-ip-prefix/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module publicIpPrefix 'br/public:avm/res/network/public-ip-prefix:' = { - name: '${uniqueString(deployment().name, location)}-test-npipmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npipmin' params: { // Required parameters name: 'npipmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module publicIpPrefix 'br/public:avm/res/network/public-ip-prefix:' = { - name: '${uniqueString(deployment().name, location)}-test-npipmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npipmax' params: { // Required parameters name: 'npipmax001' @@ -204,7 +204,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module publicIpPrefix 'br/public:avm/res/network/public-ip-prefix:' = { - name: '${uniqueString(deployment().name, location)}-test-npipwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-npipwaf' params: { // Required parameters name: 'npipwaf001' diff --git a/avm/res/network/public-ip-prefix/tests/e2e/defaults/main.test.bicep b/avm/res/network/public-ip-prefix/tests/e2e/defaults/main.test.bicep index 827797739c..44e088af33 100644 --- a/avm/res/network/public-ip-prefix/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/public-ip-prefix/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.publicipprefixes-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npipmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // // Test Execution // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation prefixLength: 28 } }] diff --git a/avm/res/network/public-ip-prefix/tests/e2e/max/main.test.bicep b/avm/res/network/public-ip-prefix/tests/e2e/max/main.test.bicep index fbbb130616..0ea9597cf7 100644 --- a/avm/res/network/public-ip-prefix/tests/e2e/max/main.test.bicep +++ b/avm/res/network/public-ip-prefix/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.publicipprefixes-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npipmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation prefixLength: 28 lock: { kind: 'CanNotDelete' diff --git a/avm/res/network/public-ip-prefix/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/public-ip-prefix/tests/e2e/waf-aligned/main.test.bicep index 4a3396a6d9..88352c6605 100644 --- a/avm/res/network/public-ip-prefix/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/public-ip-prefix/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.publicipprefixes-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'npipwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation prefixLength: 28 tags: { 'hidden-title': 'This is visible in the resource name' diff --git a/avm/res/network/route-table/README.md b/avm/res/network/route-table/README.md index 3d7b80f4e6..fd5dcee0ad 100644 --- a/avm/res/network/route-table/README.md +++ b/avm/res/network/route-table/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module routeTable 'br/public:avm/res/network/route-table:' = { - name: '${uniqueString(deployment().name, location)}-test-nrtmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nrtmin' params: { // Required parameters name: 'nrtmin001' @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module routeTable 'br/public:avm/res/network/route-table:' = { - name: '${uniqueString(deployment().name, location)}-test-nrtmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nrtmax' params: { // Required parameters name: 'nrtmax001' @@ -218,7 +218,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module routeTable 'br/public:avm/res/network/route-table:' = { - name: '${uniqueString(deployment().name, location)}-test-nrtwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nrtwaf' params: { // Required parameters name: 'nrtwaf001' diff --git a/avm/res/network/route-table/tests/e2e/defaults/main.test.bicep b/avm/res/network/route-table/tests/e2e/defaults/main.test.bicep index 8161677499..63c29b7753 100644 --- a/avm/res/network/route-table/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/route-table/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.routetables-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nrtmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,9 +37,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } } diff --git a/avm/res/network/route-table/tests/e2e/max/main.test.bicep b/avm/res/network/route-table/tests/e2e/max/main.test.bicep index f9bea9fcab..82c3e2627b 100644 --- a/avm/res/network/route-table/tests/e2e/max/main.test.bicep +++ b/avm/res/network/route-table/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.routetables-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nrtmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/route-table/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/route-table/tests/e2e/waf-aligned/main.test.bicep index 6dc11c0803..c0f75ab893 100644 --- a/avm/res/network/route-table/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/route-table/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.routetables-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nrtwaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/network/trafficmanagerprofile/README.md b/avm/res/network/trafficmanagerprofile/README.md index c1394f5f60..caf0e25aed 100644 --- a/avm/res/network/trafficmanagerprofile/README.md +++ b/avm/res/network/trafficmanagerprofile/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module trafficmanagerprofile 'br/public:avm/res/network/trafficmanagerprofile:' = { - name: '${uniqueString(deployment().name, location)}-test-ntmpmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ntmpmin' params: { // Required parameters name: 'ntmpmin001' @@ -91,7 +91,7 @@ This instance deploys the module with most of its features enabled. ```bicep module trafficmanagerprofile 'br/public:avm/res/network/trafficmanagerprofile:' = { - name: '${uniqueString(deployment().name, location)}-test-ntmpmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ntmpmax' params: { // Required parameters name: 'ntmpmax001' @@ -231,7 +231,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module trafficmanagerprofile 'br/public:avm/res/network/trafficmanagerprofile:' = { - name: '${uniqueString(deployment().name, location)}-test-ntmpwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ntmpwaf' params: { // Required parameters name: 'ntmpwaf001' diff --git a/avm/res/network/trafficmanagerprofile/tests/e2e/defaults/main.test.bicep b/avm/res/network/trafficmanagerprofile/tests/e2e/defaults/main.test.bicep index a0cdc661e5..1f0aca0761 100644 --- a/avm/res/network/trafficmanagerprofile/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/trafficmanagerprofile/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.trafficmanagerprofiles-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ntmpmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,7 +37,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/network/trafficmanagerprofile/tests/e2e/max/main.test.bicep b/avm/res/network/trafficmanagerprofile/tests/e2e/max/main.test.bicep index 3ae58f7bd9..b42bac759e 100644 --- a/avm/res/network/trafficmanagerprofile/tests/e2e/max/main.test.bicep +++ b/avm/res/network/trafficmanagerprofile/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.trafficmanagerprofiles-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ntmpmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,7 +60,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' relativeName: '${namePrefix}${serviceShort}001-rn' diff --git a/avm/res/network/trafficmanagerprofile/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/trafficmanagerprofile/tests/e2e/waf-aligned/main.test.bicep index 9f7f1bc127..cb2cc08da1 100644 --- a/avm/res/network/trafficmanagerprofile/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/trafficmanagerprofile/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.trafficmanagerprofiles-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ntmpwaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation serverFarmName01: 'dep-${namePrefix}-sf-${serviceShort}01' serverFarmName02: 'dep-${namePrefix}-sf-${serviceShort}02' webApp01Name: 'dep-${namePrefix}-wa-${serviceShort}01' @@ -50,13 +50,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -66,7 +66,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'global' diff --git a/avm/res/network/virtual-network-gateway/README.md b/avm/res/network/virtual-network-gateway/README.md index 91b7147342..0becb94816 100644 --- a/avm/res/network/virtual-network-gateway/README.md +++ b/avm/res/network/virtual-network-gateway/README.md @@ -48,7 +48,7 @@ This instance deploys the module with the AAD set of required parameters. ```bicep module virtualNetworkGateway 'br/public:avm/res/network/virtual-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nvngavpn' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvngavpn' params: { // Required parameters gatewayType: 'Vpn' @@ -160,7 +160,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module virtualNetworkGateway 'br/public:avm/res/network/virtual-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nvgmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvgmin' params: { // Required parameters gatewayType: 'Vpn' @@ -232,7 +232,7 @@ This instance deploys the module with the ExpressRoute set of required parameter ```bicep module virtualNetworkGateway 'br/public:avm/res/network/virtual-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nvger' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvger' params: { // Required parameters gatewayType: 'ExpressRoute' @@ -316,7 +316,7 @@ This instance deploys the module with most of its features enabled. ```bicep module virtualNetworkGateway 'br/public:avm/res/network/virtual-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nvgmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvgmax' params: { // Required parameters gatewayType: 'Vpn' @@ -586,7 +586,7 @@ This instance deploys the module with the VPN set of required parameters. ```bicep module virtualNetworkGateway 'br/public:avm/res/network/virtual-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nvgvpn' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvgvpn' params: { // Required parameters gatewayType: 'Vpn' @@ -698,7 +698,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module virtualNetworkGateway 'br/public:avm/res/network/virtual-network-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-nvgmwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvgmwaf' params: { // Required parameters gatewayType: 'Vpn' diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/dependencies.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/dependencies.bicep index b801da63fd..223faddfbd 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/dependencies.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/dependencies.bicep @@ -28,4 +28,3 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { @description('The resource ID of the created Virtual Network.') output vnetResourceId string = virtualNetwork.id - diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/main.test.bicep index 9fdee33d7e..9069c8e24d 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/main.test.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/aadvpn/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the AAD set of req param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvngavpn' @@ -31,19 +31,18 @@ var tempLocation = 'francecentral' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' } } - // ============== // // Test Execution // // ============== // @@ -51,7 +50,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' @@ -82,4 +81,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' vpnType: 'RouteBased' } }] - diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep index 2233ca8739..f7b93d6df5 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvgmin' @@ -32,12 +32,12 @@ var tempLocation = 'francecentral' resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -52,7 +52,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/expressRoute/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/expressRoute/main.test.bicep index d65c528f1f..840a57161e 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/expressRoute/main.test.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/expressRoute/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the ExpressRoute s param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvger' @@ -31,12 +31,12 @@ var tempLocation = 'francecentral' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -50,7 +50,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/max/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/max/main.test.bicep index a89a82fc36..a5b47ce8bd 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/max/main.test.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvgmax' @@ -31,12 +31,12 @@ var tempLocation = 'francecentral' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -49,7 +49,7 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -66,7 +66,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' @@ -165,4 +165,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' enableBgpRouteTranslationForNat: true } }] - diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/vpn/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/vpn/main.test.bicep index f99d5256e2..3177695365 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/vpn/main.test.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/vpn/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the VPN set of req param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvgvpn' @@ -31,12 +31,12 @@ var tempLocation = 'francecentral' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -51,7 +51,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' @@ -76,4 +76,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' enableBgpRouteTranslationForNat: true } }] - diff --git a/avm/res/network/virtual-network-gateway/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/virtual-network-gateway/tests/e2e/waf-aligned/main.test.bicep index a79b6d0a5e..4cd8595b5f 100644 --- a/avm/res/network/virtual-network-gateway/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/virtual-network-gateway/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworkgateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvgmwaf' @@ -31,12 +31,12 @@ var tempLocation = 'francecentral' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -48,7 +48,7 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -64,7 +64,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' @@ -146,4 +146,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' enableBgpRouteTranslationForNat: true } }] - diff --git a/avm/res/network/virtual-network/README.md b/avm/res/network/virtual-network/README.md index 2784dbd732..c780d88960 100644 --- a/avm/res/network/virtual-network/README.md +++ b/avm/res/network/virtual-network/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module virtualNetwork 'br/public:avm/res/network/virtual-network:' = { - name: '${uniqueString(deployment().name, location)}-test-nvnmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvnmin' params: { // Required parameters addressPrefixes: [ @@ -103,7 +103,7 @@ This instance deploys the module with most of its features enabled. ```bicep module virtualNetwork 'br/public:avm/res/network/virtual-network:' = { - name: '${uniqueString(deployment().name, location)}-test-nvnmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvnmax' params: { // Required parameters addressPrefixes: [ @@ -355,7 +355,7 @@ This instance deploys the module with both an inbound and outbound peering. ```bicep module virtualNetwork 'br/public:avm/res/network/virtual-network:' = { - name: '${uniqueString(deployment().name, location)}-test-nvnpeer' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvnpeer' params: { // Required parameters addressPrefixes: [ @@ -483,7 +483,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module virtualNetwork 'br/public:avm/res/network/virtual-network:' = { - name: '${uniqueString(deployment().name, location)}-test-nvnwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvnwaf' params: { // Required parameters addressPrefixes: [ diff --git a/avm/res/network/virtual-network/tests/e2e/defaults/main.test.bicep b/avm/res/network/virtual-network/tests/e2e/defaults/main.test.bicep index be4081119d..c5023d1f86 100644 --- a/avm/res/network/virtual-network/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/virtual-network/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvnmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation addressPrefixes: [ '10.0.0.0/16' ] diff --git a/avm/res/network/virtual-network/tests/e2e/max/main.test.bicep b/avm/res/network/virtual-network/tests/e2e/max/main.test.bicep index c47e25b964..ccc2e22f25 100644 --- a/avm/res/network/virtual-network/tests/e2e/max/main.test.bicep +++ b/avm/res/network/virtual-network/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvnmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' routeTableName: 'dep-${namePrefix}-rt-${serviceShort}' networkSecurityGroupName: 'dep-${namePrefix}-nsg-${serviceShort}' @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -65,10 +65,10 @@ var addressPrefix = '10.0.0.0/16' @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation addressPrefixes: [ addressPrefix ] diff --git a/avm/res/network/virtual-network/tests/e2e/vnetPeering/main.test.bicep b/avm/res/network/virtual-network/tests/e2e/vnetPeering/main.test.bicep index 4beef2ae9e..6162e78b05 100644 --- a/avm/res/network/virtual-network/tests/e2e/vnetPeering/main.test.bicep +++ b/avm/res/network/virtual-network/tests/e2e/vnetPeering/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with both an inbound an param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvnpeer' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' networkSecurityGroupBastionName: 'dep-${namePrefix}-nsg-bastion-${serviceShort}' } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation addressPrefixes: [ '10.1.0.0/24' ] diff --git a/avm/res/network/virtual-network/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/virtual-network/tests/e2e/waf-aligned/main.test.bicep index 57d01ea281..e640058c01 100644 --- a/avm/res/network/virtual-network/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/virtual-network/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.virtualnetworks-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvnwaf' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' routeTableName: 'dep-${namePrefix}-rt-${serviceShort}' networkSecurityGroupName: 'dep-${namePrefix}-nsg-${serviceShort}' networkSecurityGroupBastionName: 'dep-${namePrefix}-nsg-bastion-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,13 +47,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -65,10 +65,10 @@ var addressPrefix = '10.0.0.0/16' @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation addressPrefixes: [ addressPrefix ] diff --git a/avm/res/network/vpn-gateway/README.md b/avm/res/network/vpn-gateway/README.md index 31e0f3e346..714f323bab 100644 --- a/avm/res/network/vpn-gateway/README.md +++ b/avm/res/network/vpn-gateway/README.md @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module vpnGateway 'br/public:avm/res/network/vpn-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-vpngmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-vpngmin' params: { // Required parameters name: 'vpngmin001' @@ -96,7 +96,7 @@ This instance deploys the module with most of its features enabled. ```bicep module vpnGateway 'br/public:avm/res/network/vpn-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-vpngmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-vpngmax' params: { // Required parameters name: 'vpngmax001' @@ -246,7 +246,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module vpnGateway 'br/public:avm/res/network/vpn-gateway:' = { - name: '${uniqueString(deployment().name, location)}-test-vpngwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-vpngwaf' params: { // Required parameters name: 'vpngwaf001' diff --git a/avm/res/network/vpn-gateway/tests/e2e/defaults/main.test.bicep b/avm/res/network/vpn-gateway/tests/e2e/defaults/main.test.bicep index ac00216a72..772bacbee2 100644 --- a/avm/res/network/vpn-gateway/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/vpn-gateway/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.vpngateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'vpngmin' @@ -21,7 +21,7 @@ param serviceShort string = 'vpngmin' param namePrefix string = '#_namePrefix_#' #disable-next-line no-hardcoded-location // Just a value to avoid ongoing capacity challenges -var tempLocation ='uksouth' +var tempLocation = 'uksouth' // ============ // // Dependencies // @@ -31,12 +31,12 @@ var tempLocation ='uksouth' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualHubName: 'dep-${namePrefix}-vh-${serviceShort}' @@ -51,12 +51,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' virtualHubResourceId: nestedDependencies.outputs.virtualHubResourceId } }] - - diff --git a/avm/res/network/vpn-gateway/tests/e2e/max/main.test.bicep b/avm/res/network/vpn-gateway/tests/e2e/max/main.test.bicep index 8fff3ef17f..5b337a3a24 100644 --- a/avm/res/network/vpn-gateway/tests/e2e/max/main.test.bicep +++ b/avm/res/network/vpn-gateway/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.vpngateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'vpngmax' @@ -21,7 +21,7 @@ param serviceShort string = 'vpngmax' param namePrefix string = '#_namePrefix_#' #disable-next-line no-hardcoded-location // Just a value to avoid ongoing capacity challenges -var tempLocation ='uksouth' +var tempLocation = 'uksouth' // ============ // // Dependencies // @@ -31,12 +31,12 @@ var tempLocation ='uksouth' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualHubName: 'dep-${namePrefix}-vh-${serviceShort}' @@ -51,7 +51,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' @@ -102,5 +102,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/network/vpn-gateway/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/vpn-gateway/tests/e2e/waf-aligned/main.test.bicep index d14ae8fdae..638cb54c1c 100644 --- a/avm/res/network/vpn-gateway/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/vpn-gateway/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.vpngateways-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'vpngwaf' @@ -21,7 +21,7 @@ param serviceShort string = 'vpngwaf' param namePrefix string = '#_namePrefix_#' #disable-next-line no-hardcoded-location // Just a value to avoid ongoing capacity challenges -var tempLocation ='uksouth' +var tempLocation = 'uksouth' // ============ // // Dependencies // @@ -31,12 +31,12 @@ var tempLocation ='uksouth' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { location: tempLocation virtualHubName: 'dep-${namePrefix}-vh-${serviceShort}' @@ -51,7 +51,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { location: tempLocation name: '${namePrefix}${serviceShort}001' @@ -102,5 +102,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/network/vpn-site/README.md b/avm/res/network/vpn-site/README.md index 6f1537dcee..990c5b2f13 100644 --- a/avm/res/network/vpn-site/README.md +++ b/avm/res/network/vpn-site/README.md @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module vpnSite 'br/public:avm/res/network/vpn-site:' = { - name: '${uniqueString(deployment().name, location)}-test-nvsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvsmin' params: { // Required parameters name: 'nvsmin' @@ -107,7 +107,7 @@ This instance deploys the module with most of its features enabled. ```bicep module vpnSite 'br/public:avm/res/network/vpn-site:' = { - name: '${uniqueString(deployment().name, location)}-test-nvsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvsmax' params: { // Required parameters name: 'nvsmax' @@ -303,7 +303,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module vpnSite 'br/public:avm/res/network/vpn-site:' = { - name: '${uniqueString(deployment().name, location)}-test-nvswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-nvswaf' params: { // Required parameters name: 'nvswaf' diff --git a/avm/res/network/vpn-site/tests/e2e/defaults/main.test.bicep b/avm/res/network/vpn-site/tests/e2e/defaults/main.test.bicep index 8a288af220..bb6fde527a 100644 --- a/avm/res/network/vpn-site/tests/e2e/defaults/main.test.bicep +++ b/avm/res/network/vpn-site/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-network.vpnSites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvsmin' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location:location + location: resourceLocation virtualWANName: 'dep-${namePrefix}-vw-${serviceShort}' } } @@ -47,9 +47,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}-${serviceShort}' virtualWanId: nestedDependencies.outputs.virtualWWANResourceId addressPrefixes: [ @@ -58,5 +58,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ipAddress: '1.2.3.4' } }] - - diff --git a/avm/res/network/vpn-site/tests/e2e/max/main.test.bicep b/avm/res/network/vpn-site/tests/e2e/max/main.test.bicep index 463da28b48..ff6889fb2a 100644 --- a/avm/res/network/vpn-site/tests/e2e/max/main.test.bicep +++ b/avm/res/network/vpn-site/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-network.vpnSites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvsmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location:location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' virtualWANName: 'dep-${namePrefix}-vw-${serviceShort}' } @@ -48,9 +48,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}-${serviceShort}' virtualWanId: nestedDependencies.outputs.virtualWWANResourceId lock: { @@ -121,5 +121,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ] } }] - - diff --git a/avm/res/network/vpn-site/tests/e2e/waf-aligned/main.test.bicep b/avm/res/network/vpn-site/tests/e2e/waf-aligned/main.test.bicep index 1aedb61567..e4f04d6cd6 100644 --- a/avm/res/network/vpn-site/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/network/vpn-site/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-network.vpnSites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'nvswaf' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location:location + location: resourceLocation managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' virtualWANName: 'dep-${namePrefix}-vw-${serviceShort}' } @@ -48,9 +48,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}-${serviceShort}' virtualWanId: nestedDependencies.outputs.virtualWWANResourceId lock: { @@ -104,5 +104,3 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' } } }] - - diff --git a/avm/res/operational-insights/workspace/README.md b/avm/res/operational-insights/workspace/README.md index 94fd4da5d0..8b2247c2ac 100644 --- a/avm/res/operational-insights/workspace/README.md +++ b/avm/res/operational-insights/workspace/README.md @@ -52,7 +52,7 @@ This instance deploys the module with advanced features like custom tables and d ```bicep module workspace 'br/public:avm/res/operational-insights/workspace:' = { - name: '${uniqueString(deployment().name, location)}-test-oiwadv' + name: '${uniqueString(deployment().name, resourceLocation)}-test-oiwadv' params: { // Required parameters name: 'oiwadv001' @@ -676,7 +676,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module workspace 'br/public:avm/res/operational-insights/workspace:' = { - name: '${uniqueString(deployment().name, location)}-test-oiwmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-oiwmin' params: { // Required parameters name: 'oiwmin001' @@ -724,7 +724,7 @@ This instance deploys the module with most of its features enabled. ```bicep module workspace 'br/public:avm/res/operational-insights/workspace:' = { - name: '${uniqueString(deployment().name, location)}-test-oiwmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-oiwmax' params: { // Required parameters name: 'oiwmax001' @@ -1346,7 +1346,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module workspace 'br/public:avm/res/operational-insights/workspace:' = { - name: '${uniqueString(deployment().name, location)}-test-oiwwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-oiwwaf' params: { // Required parameters name: 'oiwwaf001' diff --git a/avm/res/operational-insights/workspace/main.bicep b/avm/res/operational-insights/workspace/main.bicep index a2d5ede46e..b0c4c62125 100644 --- a/avm/res/operational-insights/workspace/main.bicep +++ b/avm/res/operational-insights/workspace/main.bicep @@ -330,7 +330,7 @@ output logAnalyticsWorkspaceId string = logAnalyticsWorkspace.properties.custome output location string = logAnalyticsWorkspace.location @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(logAnalyticsWorkspace.identity, 'principalId') ? logAnalyticsWorkspace.identity.principalId : '' +output systemAssignedMIPrincipalId string = logAnalyticsWorkspace.?identity.?principalId ?? '' // =============== // // Definitions // diff --git a/avm/res/operational-insights/workspace/main.json b/avm/res/operational-insights/workspace/main.json index e48d8e66f9..66e4f01e6e 100644 --- a/avm/res/operational-insights/workspace/main.json +++ b/avm/res/operational-insights/workspace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "6610248633645776629" + "templateHash": "7251796385032619850" }, "name": "Log Analytics Workspaces", "description": "This module deploys a Log Analytics Workspace.", @@ -1906,7 +1906,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('logAnalyticsWorkspace', '2022-10-01', 'full').identity, 'principalId')), reference('logAnalyticsWorkspace', '2022-10-01', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('logAnalyticsWorkspace', '2022-10-01', 'full'), 'identity'), 'principalId'), '')]" } } } \ No newline at end of file diff --git a/avm/res/operational-insights/workspace/tests/e2e/adv/main.test.bicep b/avm/res/operational-insights/workspace/tests/e2e/adv/main.test.bicep index c6962c8dcb..0d42a9e199 100644 --- a/avm/res/operational-insights/workspace/tests/e2e/adv/main.test.bicep +++ b/avm/res/operational-insights/workspace/tests/e2e/adv/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with advanced features param resourceGroupName string = 'dep-${namePrefix}-operationalinsights.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'oiwadv' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation storageAccountName: 'dep${namePrefix}sa${serviceShort}' automationAccountName: 'dep-${namePrefix}-auto-${serviceShort}' eventHubNamespaceName: 'dep-${namePrefix}-ehn-${serviceShort}' @@ -48,13 +48,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -65,10 +65,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dailyQuotaGb: 10 dataSources: [ { diff --git a/avm/res/operational-insights/workspace/tests/e2e/defaults/main.test.bicep b/avm/res/operational-insights/workspace/tests/e2e/defaults/main.test.bicep index 45a649c342..1239251a63 100644 --- a/avm/res/operational-insights/workspace/tests/e2e/defaults/main.test.bicep +++ b/avm/res/operational-insights/workspace/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-operationalinsights.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'oiwmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/operational-insights/workspace/tests/e2e/max/main.test.bicep b/avm/res/operational-insights/workspace/tests/e2e/max/main.test.bicep index c0e6a68f85..6cfb24c8ab 100644 --- a/avm/res/operational-insights/workspace/tests/e2e/max/main.test.bicep +++ b/avm/res/operational-insights/workspace/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-operationalinsights.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'oiwmax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation storageAccountName: 'dep${namePrefix}sa${serviceShort}' automationAccountName: 'dep-${namePrefix}-auto-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -63,10 +63,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dailyQuotaGb: 10 dataSources: [ { diff --git a/avm/res/operational-insights/workspace/tests/e2e/waf-aligned/main.test.bicep b/avm/res/operational-insights/workspace/tests/e2e/waf-aligned/main.test.bicep index 3f2ca5345b..510f51367a 100644 --- a/avm/res/operational-insights/workspace/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/operational-insights/workspace/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-operationalinsights.workspaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'oiwwaf' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation storageAccountName: 'dep${namePrefix}sa${serviceShort}' automationAccountName: 'dep-${namePrefix}-auto-${serviceShort}' } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,10 +62,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation dailyQuotaGb: 10 dataSources: [ { diff --git a/avm/res/operations-management/solution/README.md b/avm/res/operations-management/solution/README.md index 1615194086..fa0f9fac57 100644 --- a/avm/res/operations-management/solution/README.md +++ b/avm/res/operations-management/solution/README.md @@ -41,7 +41,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module solution 'br/public:avm/res/operations-management/solution:' = { - name: '${uniqueString(deployment().name, location)}-test-omsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-omsmin' params: { // Required parameters logAnalyticsWorkspaceName: '' @@ -93,7 +93,7 @@ This instance deploys the module with a Microsoft solution. ```bicep module solution 'br/public:avm/res/operations-management/solution:' = { - name: '${uniqueString(deployment().name, location)}-test-omsms' + name: '${uniqueString(deployment().name, resourceLocation)}-test-omsms' params: { // Required parameters logAnalyticsWorkspaceName: '' @@ -153,7 +153,7 @@ This instance deploys the module with a third party (Non-Microsoft) solution. ```bicep module solution 'br/public:avm/res/operations-management/solution:' = { - name: '${uniqueString(deployment().name, location)}-test-omsnonms' + name: '${uniqueString(deployment().name, resourceLocation)}-test-omsnonms' params: { // Required parameters logAnalyticsWorkspaceName: '' @@ -213,7 +213,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module solution 'br/public:avm/res/operations-management/solution:' = { - name: '${uniqueString(deployment().name, location)}-test-omswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-omswaf' params: { // Required parameters logAnalyticsWorkspaceName: '' diff --git a/avm/res/operations-management/solution/tests/e2e/defaults/main.test.bicep b/avm/res/operations-management/solution/tests/e2e/defaults/main.test.bicep index 937829c24f..8be0e169ad 100644 --- a/avm/res/operations-management/solution/tests/e2e/defaults/main.test.bicep +++ b/avm/res/operations-management/solution/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-operationsmanagement.solutions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'omsmin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: 'Updates' - location: location + location: resourceLocation logAnalyticsWorkspaceName: nestedDependencies.outputs.logAnalyticsWorkspaceName } } diff --git a/avm/res/operations-management/solution/tests/e2e/ms/main.test.bicep b/avm/res/operations-management/solution/tests/e2e/ms/main.test.bicep index aa5fbbde0b..314aae1901 100644 --- a/avm/res/operations-management/solution/tests/e2e/ms/main.test.bicep +++ b/avm/res/operations-management/solution/tests/e2e/ms/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a Microsoft soluti param resourceGroupName string = 'dep-${namePrefix}-operationsmanagement.solutions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'omsms' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: 'AzureAutomation' - location: location + location: resourceLocation logAnalyticsWorkspaceName: nestedDependencies.outputs.logAnalyticsWorkspaceName product: 'OMSGallery' publisher: 'Microsoft' diff --git a/avm/res/operations-management/solution/tests/e2e/nonms/main.test.bicep b/avm/res/operations-management/solution/tests/e2e/nonms/main.test.bicep index 2153dc3d75..c5211d6040 100644 --- a/avm/res/operations-management/solution/tests/e2e/nonms/main.test.bicep +++ b/avm/res/operations-management/solution/tests/e2e/nonms/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a third party (Non param resourceGroupName string = 'dep-${namePrefix}-operationsmanagement.solutions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'omsnonms' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation logAnalyticsWorkspaceName: nestedDependencies.outputs.logAnalyticsWorkspaceName product: 'nonmsTestSolutionProduct' publisher: 'nonmsTestSolutionPublisher' diff --git a/avm/res/operations-management/solution/tests/e2e/waf-aligned/main.test.bicep b/avm/res/operations-management/solution/tests/e2e/waf-aligned/main.test.bicep index 9e7f561694..5fa771d83f 100644 --- a/avm/res/operations-management/solution/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/operations-management/solution/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-operationsmanagement.solutions-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'omswaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: 'AzureAutomation' - location: location + location: resourceLocation logAnalyticsWorkspaceName: nestedDependencies.outputs.logAnalyticsWorkspaceName product: 'OMSGallery' publisher: 'Microsoft' diff --git a/avm/res/power-bi-dedicated/capacity/README.md b/avm/res/power-bi-dedicated/capacity/README.md index 179ce0d26c..e723c4b70a 100644 --- a/avm/res/power-bi-dedicated/capacity/README.md +++ b/avm/res/power-bi-dedicated/capacity/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module capacity 'br/public:avm/res/power-bi-dedicated/capacity:' = { - name: '${uniqueString(deployment().name, location)}-test-pbdcapmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-pbdcapmin' params: { // Required parameters members: [ @@ -106,7 +106,7 @@ This instance deploys the module with most of its features enabled. ```bicep module capacity 'br/public:avm/res/power-bi-dedicated/capacity:' = { - name: '${uniqueString(deployment().name, location)}-test-pbdcapmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-pbdcapmax' params: { // Required parameters members: [ @@ -236,7 +236,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module capacity 'br/public:avm/res/power-bi-dedicated/capacity:' = { - name: '${uniqueString(deployment().name, location)}-test-pbdcapwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-pbdcapwaf' params: { // Required parameters members: [ diff --git a/avm/res/power-bi-dedicated/capacity/tests/e2e/defaults/main.test.bicep b/avm/res/power-bi-dedicated/capacity/tests/e2e/defaults/main.test.bicep index dd902c976a..db1935917b 100644 --- a/avm/res/power-bi-dedicated/capacity/tests/e2e/defaults/main.test.bicep +++ b/avm/res/power-bi-dedicated/capacity/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-powerbidedicated.capacities-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'pbdcapmin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,7 +47,7 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' sku: { @@ -56,6 +56,6 @@ module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' members: [ nestedDependencies.outputs.managedIdentityPrincipalId ] - location: location + location: resourceLocation } }] diff --git a/avm/res/power-bi-dedicated/capacity/tests/e2e/max/main.test.bicep b/avm/res/power-bi-dedicated/capacity/tests/e2e/max/main.test.bicep index 34aa222f46..2e6a779030 100644 --- a/avm/res/power-bi-dedicated/capacity/tests/e2e/max/main.test.bicep +++ b/avm/res/power-bi-dedicated/capacity/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-powerbidedicated.capacities-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'pbdcapmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation sku: { capacity: 1 name: 'A1' diff --git a/avm/res/power-bi-dedicated/capacity/tests/e2e/waf-aligned/main.test.bicep b/avm/res/power-bi-dedicated/capacity/tests/e2e/waf-aligned/main.test.bicep index 3f907ee3b0..c412a4ef4a 100644 --- a/avm/res/power-bi-dedicated/capacity/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/power-bi-dedicated/capacity/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-powerbidedicated.capacities-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'pbdcapwaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation sku: { capacity: 1 } diff --git a/avm/res/resource-graph/query/README.md b/avm/res/resource-graph/query/README.md index ad81ed4dfe..a0d9171de4 100644 --- a/avm/res/resource-graph/query/README.md +++ b/avm/res/resource-graph/query/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module query 'br/public:avm/res/resource-graph/query:' = { - name: '${uniqueString(deployment().name, location)}-test-rdsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdsmin' params: { // Required parameters name: 'rdsmin001' @@ -94,7 +94,7 @@ This instance deploys the module with most of its features enabled. ```bicep module query 'br/public:avm/res/resource-graph/query:' = { - name: '${uniqueString(deployment().name, location)}-test-rdsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdsmax' params: { // Required parameters name: 'rdsmax001' @@ -206,7 +206,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module query 'br/public:avm/res/resource-graph/query:' = { - name: '${uniqueString(deployment().name, location)}-test-rdswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdswaf' params: { // Required parameters name: 'rdswaf001' diff --git a/avm/res/resource-graph/query/tests/e2e/defaults/main.test.bicep b/avm/res/resource-graph/query/tests/e2e/defaults/main.test.bicep index 778d04cd9f..b7ed07f5cb 100644 --- a/avm/res/resource-graph/query/tests/e2e/defaults/main.test.bicep +++ b/avm/res/resource-graph/query/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-resourcegraph.queries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdsmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation query: 'Resources | limit 10' } } diff --git a/avm/res/resource-graph/query/tests/e2e/max/main.test.bicep b/avm/res/resource-graph/query/tests/e2e/max/main.test.bicep index 8782b28c87..3f7e8edead 100644 --- a/avm/res/resource-graph/query/tests/e2e/max/main.test.bicep +++ b/avm/res/resource-graph/query/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-resourcegraph.queries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdsmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'None' } diff --git a/avm/res/resource-graph/query/tests/e2e/waf-aligned/main.test.bicep b/avm/res/resource-graph/query/tests/e2e/waf-aligned/main.test.bicep index dff1270dc1..a40ce73f3f 100644 --- a/avm/res/resource-graph/query/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/resource-graph/query/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-resourcegraph.queries-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdswaf' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,10 +37,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation lock: { kind: 'None' } diff --git a/avm/res/resources/deployment-script/README.md b/avm/res/resources/deployment-script/README.md index 02d8fd1047..69e3012079 100644 --- a/avm/res/resources/deployment-script/README.md +++ b/avm/res/resources/deployment-script/README.md @@ -45,7 +45,7 @@ This instance deploys the module with an Azure CLI script. ```bicep module deploymentScript 'br/public:avm/res/resources/deployment-script:' = { - name: '${uniqueString(deployment().name, location)}-test-rdscli' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdscli' params: { // Required parameters kind: 'AzureCLI' @@ -135,7 +135,7 @@ module deploymentScript 'br/public:avm/res/resources/deployment-script: ### Example 2: _Using only defaults_ This instance deploys the module with the minimum set of required parameters. -> **Note:** The test currently implements additional non-required parameters to cater for a test-specific limitation. +> **Note:** In this scenario, In this scenario, the `Storage File Data Privileged Contributor` role needs to be assigned to the user-assigned managed identity and the deployment principal needs to have permissions to list the storage account keys. @@ -145,7 +145,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module deploymentScript 'br/public:avm/res/resources/deployment-script:' = { - name: '${uniqueString(deployment().name, location)}-test-rdsmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdsmin' params: { // Required parameters kind: 'AzurePowerShell' @@ -160,7 +160,6 @@ module deploymentScript 'br/public:avm/res/resources/deployment-script: } retentionInterval: 'P1D' scriptContent: 'Write-Host \'AVM Deployment Script test!\'' - storageAccountResourceId: '' } } ``` @@ -203,9 +202,6 @@ module deploymentScript 'br/public:avm/res/resources/deployment-script: }, "scriptContent": { "value": "Write-Host \"AVM Deployment Script test!\"" - }, - "storageAccountResourceId": { - "value": "" } } } @@ -225,7 +221,7 @@ This instance deploys the module with most of its features enabled. ```bicep module deploymentScript 'br/public:avm/res/resources/deployment-script:' = { - name: '${uniqueString(deployment().name, location)}-test-rdsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdsmax' params: { // Required parameters kind: 'AzureCLI' @@ -407,7 +403,7 @@ This instance deploys the module with access to a private network. ```bicep module deploymentScript 'br/public:avm/res/resources/deployment-script:' = { - name: '${uniqueString(deployment().name, location)}-test-rdsnet' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdsnet' params: { // Required parameters kind: 'AzureCLI' @@ -507,7 +503,7 @@ This instance deploys the module with an Azure PowerShell script. ```bicep module deploymentScript 'br/public:avm/res/resources/deployment-script:' = { - name: '${uniqueString(deployment().name, location)}-test-rdsps' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdsps' params: { // Required parameters kind: 'AzurePowerShell' @@ -591,7 +587,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module deploymentScript 'br/public:avm/res/resources/deployment-script:' = { - name: '${uniqueString(deployment().name, location)}-test-rdswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rdswaf' params: { // Required parameters kind: 'AzureCLI' @@ -722,7 +718,7 @@ module deploymentScript 'br/public:avm/res/resources/deployment-script: | [`runOnce`](#parameter-runonce) | bool | When set to false, script will run every time the template is deployed. When set to true, the script will only run once. | | [`scriptContent`](#parameter-scriptcontent) | string | Script body. Max length: 32000 characters. To run an external script, use primaryScriptURI instead. | | [`storageAccountResourceId`](#parameter-storageaccountresourceid) | string | The resource ID of the storage account to use for this deployment script. If none is provided, the deployment script uses a temporary, managed storage account. | -| [`subnetResourceIds`](#parameter-subnetresourceids) | array | List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network. | +| [`subnetResourceIds`](#parameter-subnetresourceids) | array | List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network. When using a private network, the `Storage File Data Privileged Contributor` role needs to be assigned to the user-assigned managed identity and the deployment principal needs to have permissions to list the storage account keys. Also, Shared-Keys must not be disabled on the used storage account [ref](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deployment-script-vnet). | | [`supportingScriptUris`](#parameter-supportingscripturis) | array | List of supporting files for the external script (defined in primaryScriptUri). Does not work with internal scripts (code defined in scriptContent). | | [`tags`](#parameter-tags) | object | Resource tags. | | [`timeout`](#parameter-timeout) | string | Maximum allowed script execution time specified in ISO 8601 format. Default value is PT1H - 1 hour; 'PT30M' - 30 minutes; 'P5D' - 5 days; 'P1Y' 1 year. | @@ -1006,7 +1002,7 @@ The resource ID of the storage account to use for this deployment script. If non ### Parameter: `subnetResourceIds` -List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network. +List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network. When using a private network, the `Storage File Data Privileged Contributor` role needs to be assigned to the user-assigned managed identity and the deployment principal needs to have permissions to list the storage account keys. Also, Shared-Keys must not be disabled on the used storage account [ref](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deployment-script-vnet). - Required: No - Type: array diff --git a/avm/res/resources/deployment-script/main.bicep b/avm/res/resources/deployment-script/main.bicep index 9f372221bb..3f2e6d3158 100644 --- a/avm/res/resources/deployment-script/main.bicep +++ b/avm/res/resources/deployment-script/main.bicep @@ -55,7 +55,7 @@ param environmentVariables object = {} @description('Optional. List of supporting files for the external script (defined in primaryScriptUri). Does not work with internal scripts (code defined in scriptContent).') param supportingScriptUris array? -@description('Optional. List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network.') +@description('Optional. List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network. When using a private network, the `Storage File Data Privileged Contributor` role needs to be assigned to the user-assigned managed identity and the deployment principal needs to have permissions to list the storage account keys. Also, Shared-Keys must not be disabled on the used storage account [ref](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deployment-script-vnet).') param subnetResourceIds string[]? @description('Optional. Command-line arguments to pass to the script. Arguments are separated by spaces.') @@ -130,7 +130,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' existing } var storageAccountSettings = !empty(storageAccountResourceId) ? { - storageAccountKey: listKeys(storageAccount.id, '2023-01-01').keys[0].value + storageAccountKey: empty(subnetResourceIds) ? listKeys(storageAccount.id, '2023-01-01').keys[0].value : null storageAccountName: last(split(storageAccountResourceId, '/')) } : null diff --git a/avm/res/resources/deployment-script/main.json b/avm/res/resources/deployment-script/main.json index 73d6998f7c..52febeae55 100644 --- a/avm/res/resources/deployment-script/main.json +++ b/avm/res/resources/deployment-script/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.24.24.22086", - "templateHash": "3543265320789085006" + "version": "0.23.1.45101", + "templateHash": "8734511554398837213" }, "name": "Deployment Scripts", "description": "This module deploys Deployment Scripts.", @@ -208,7 +208,7 @@ }, "nullable": true, "metadata": { - "description": "Optional. List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network." + "description": "Optional. List of subnet IDs to use for the container group. This is required if you want to run the deployment script in a private network. When using a private network, the `Storage File Data Privileged Contributor` role needs to be assigned to the user-assigned managed identity and the deployment principal needs to have permissions to list the storage account keys. Also, Shared-Keys must not be disabled on the used storage account [ref](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deployment-script-vnet)." } }, "arguments": { @@ -394,7 +394,7 @@ "azPowerShellVersion": "[if(equals(parameters('kind'), 'AzurePowerShell'), parameters('azPowerShellVersion'), null())]", "azCliVersion": "[if(equals(parameters('kind'), 'AzureCLI'), parameters('azCliVersion'), null())]", "containerSettings": "[if(not(empty(variables('containerSettings'))), variables('containerSettings'), null())]", - "storageAccountSettings": "[if(not(empty(parameters('storageAccountResourceId'))), if(not(empty(parameters('storageAccountResourceId'))), createObject('storageAccountKey', listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(if(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountResourceId'), '//'), '/')[2], split(if(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(if(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountResourceId'), 'dummyAccount'), '/'))), '2023-01-01').keys[0].value, 'storageAccountName', last(split(parameters('storageAccountResourceId'), '/'))), null()), null())]", + "storageAccountSettings": "[if(not(empty(parameters('storageAccountResourceId'))), if(not(empty(parameters('storageAccountResourceId'))), createObject('storageAccountKey', if(empty(parameters('subnetResourceIds')), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(if(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountResourceId'), '//'), '/')[2], split(if(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(if(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountResourceId'), 'dummyAccount'), '/'))), '2023-01-01').keys[0].value, null()), 'storageAccountName', last(split(parameters('storageAccountResourceId'), '/'))), null()), null())]", "arguments": "[parameters('arguments')]", "environmentVariables": "[if(not(empty(parameters('environmentVariables'))), parameters('environmentVariables').secureList, createArray())]", "scriptContent": "[if(not(empty(parameters('scriptContent'))), parameters('scriptContent'), null())]", diff --git a/avm/res/resources/deployment-script/tests/e2e/cli/main.test.bicep b/avm/res/resources/deployment-script/tests/e2e/cli/main.test.bicep index 36a1b7056f..54a9719890 100644 --- a/avm/res/resources/deployment-script/tests/e2e/cli/main.test.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/cli/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with an Azure CLI scrip param resourceGroupName string = 'avm-${namePrefix}-resources.deploymentscripts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdscli' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azCliVersion: '2.9.1' kind: 'AzureCLI' retentionInterval: 'P1D' diff --git a/avm/res/resources/deployment-script/tests/e2e/defaults/dependencies.bicep b/avm/res/resources/deployment-script/tests/e2e/defaults/dependencies.bicep index d49ed08f87..eb82ada472 100644 --- a/avm/res/resources/deployment-script/tests/e2e/defaults/dependencies.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/defaults/dependencies.bicep @@ -4,28 +4,10 @@ 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 - resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { name: managedIdentityName location: location } -resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { - name: storageAccountName - location: location - sku: { - name: 'Standard_LRS' - } - kind: 'StorageV2' - properties: { - supportsHttpsTrafficOnly: true - } -} - @description('The resource ID of the created managed identity.') output managedIdentityResourceId string = managedIdentity.id - -@description('The resource ID of the created storage account.') -output storageAccountResourceId string = storageAccount.id diff --git a/avm/res/resources/deployment-script/tests/e2e/defaults/main.test.bicep b/avm/res/resources/deployment-script/tests/e2e/defaults/main.test.bicep index 926bc535be..68e0bbd0cf 100644 --- a/avm/res/resources/deployment-script/tests/e2e/defaults/main.test.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/defaults/main.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' metadata name = 'Using only defaults' metadata description = ''' This instance deploys the module with the minimum set of required parameters. -> **Note:** The test currently implements additional non-required parameters to cater for a test-specific limitation. +> **Note:** In this scenario, In this scenario, the `Storage File Data Privileged Contributor` role needs to be assigned to the user-assigned managed identity and the deployment principal needs to have permissions to list the storage account keys. ''' // ========== // @@ -15,7 +15,7 @@ This instance deploys the module with the minimum set of required parameters. param resourceGroupName string = 'avm-${namePrefix}-resources.deploymentscripts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdsmin' @@ -31,16 +31,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -50,15 +49,14 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azPowerShellVersion: '9.7' kind: 'AzurePowerShell' retentionInterval: 'P1D' scriptContent: 'Write-Host \'AVM Deployment Script test!\'' - storageAccountResourceId: nestedDependencies.outputs.storageAccountResourceId managedIdentities: { userAssignedResourcesIds: [ nestedDependencies.outputs.managedIdentityResourceId diff --git a/avm/res/resources/deployment-script/tests/e2e/max/main.test.bicep b/avm/res/resources/deployment-script/tests/e2e/max/main.test.bicep index 436e0d8bfa..e3048af592 100644 --- a/avm/res/resources/deployment-script/tests/e2e/max/main.test.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'avm-${namePrefix}-resources.deploymentscripts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdsmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azCliVersion: '2.9.1' kind: 'AzureCLI' retentionInterval: 'P1D' diff --git a/avm/res/resources/deployment-script/tests/e2e/private-network/dependencies.bicep b/avm/res/resources/deployment-script/tests/e2e/private-network/dependencies.bicep index 6d0153f7ca..a8dfbc60f0 100644 --- a/avm/res/resources/deployment-script/tests/e2e/private-network/dependencies.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/private-network/dependencies.bicep @@ -23,7 +23,7 @@ resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018- location: location } -resource storagePermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { +resource storageFileSharePermissions 'Microsoft.Authorization/roleAssignments@2022-04-01' = { name: guid('storageFileDataPrivilegedContributorRole', managedIdentity.id, storageAccount.id) scope: storageAccount properties: { @@ -42,6 +42,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = { kind: 'StorageV2' properties: { supportsHttpsTrafficOnly: true + allowSharedKeyAccess: true // Cannot be set to false when using a private network for the deployment script networkAcls: { bypass: 'AzureServices' defaultAction: 'Deny' diff --git a/avm/res/resources/deployment-script/tests/e2e/private-network/main.test.bicep b/avm/res/resources/deployment-script/tests/e2e/private-network/main.test.bicep index 552dad3ce5..f6a78cb877 100644 --- a/avm/res/resources/deployment-script/tests/e2e/private-network/main.test.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/private-network/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with access to a privat param resourceGroupName string = 'avm-${namePrefix}-resources.deploymentscripts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdsnet' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,10 +48,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azCliVersion: '2.9.1' kind: 'AzureCLI' retentionInterval: 'P1D' diff --git a/avm/res/resources/deployment-script/tests/e2e/ps/main.test.bicep b/avm/res/resources/deployment-script/tests/e2e/ps/main.test.bicep index 20951e15ae..ca878b3ec6 100644 --- a/avm/res/resources/deployment-script/tests/e2e/ps/main.test.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/ps/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with an Azure PowerShel param resourceGroupName string = 'avm-${namePrefix}-resources.deploymentscripts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdsps' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azPowerShellVersion: '9.7' kind: 'AzurePowerShell' retentionInterval: 'P1D' diff --git a/avm/res/resources/deployment-script/tests/e2e/waf-aligned/main.test.bicep b/avm/res/resources/deployment-script/tests/e2e/waf-aligned/main.test.bicep index 2e91746ed6..52cec6abcb 100644 --- a/avm/res/resources/deployment-script/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/resources/deployment-script/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'avm-${namePrefix}-resources.deploymentscripts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rdswaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation azCliVersion: '2.9.1' kind: 'AzureCLI' retentionInterval: 'P1D' diff --git a/avm/res/resources/resource-group/README.md b/avm/res/resources/resource-group/README.md index a551a11127..dc1ba768a0 100644 --- a/avm/res/resources/resource-group/README.md +++ b/avm/res/resources/resource-group/README.md @@ -42,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module resourceGroup 'br/public:avm/res/resources/resource-group:' = { - name: '${uniqueString(deployment().name, location)}-test-rrgmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rrgmin' params: { // Required parameters name: 'avm-resources.resourcegroups-rrgmin-rg' @@ -90,7 +90,7 @@ This instance deploys the module with most of its features enabled. ```bicep module resourceGroup 'br/public:avm/res/resources/resource-group:' = { - name: '${uniqueString(deployment().name, location)}-test-rrgmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rrgmax' params: { // Required parameters name: 'avm-resources.resourcegroups-rrgmax-rg' @@ -196,7 +196,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module resourceGroup 'br/public:avm/res/resources/resource-group:' = { - name: '${uniqueString(deployment().name, location)}-test-rrgwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-rrgwaf' params: { // Required parameters name: 'avm-resources.resourcegroups-rrgwaf-rg' diff --git a/avm/res/resources/resource-group/tests/e2e/defaults/main.test.bicep b/avm/res/resources/resource-group/tests/e2e/defaults/main.test.bicep index 21ce3abac2..63ad08354a 100644 --- a/avm/res/resources/resource-group/tests/e2e/defaults/main.test.bicep +++ b/avm/res/resources/resource-group/tests/e2e/defaults/main.test.bicep @@ -8,7 +8,7 @@ metadata description = 'This instance deploys the module with the minimum set of // ========== // @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rrgmin' @@ -22,9 +22,9 @@ param namePrefix string = '#_namePrefix_#' @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: 'avm-${namePrefix}-resources.resourcegroups-${serviceShort}-rg' - location: location + location: resourceLocation } }] diff --git a/avm/res/resources/resource-group/tests/e2e/max/main.test.bicep b/avm/res/resources/resource-group/tests/e2e/max/main.test.bicep index 2dc53ce8d8..08e5060ba4 100644 --- a/avm/res/resources/resource-group/tests/e2e/max/main.test.bicep +++ b/avm/res/resources/resource-group/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-resources.resourcegroups-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rrgmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,9 +45,9 @@ module nestedDependencies 'dependencies.bicep' = { // ============== // module testDeployment '../../../main.bicep' = { - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { - location: location + location: resourceLocation name: 'avm-${namePrefix}-resources.resourcegroups-${serviceShort}-rg' lock: { kind: 'CanNotDelete' diff --git a/avm/res/resources/resource-group/tests/e2e/waf-aligned/main.test.bicep b/avm/res/resources/resource-group/tests/e2e/waf-aligned/main.test.bicep index 876dc68f34..d0bdb8a832 100644 --- a/avm/res/resources/resource-group/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/resources/resource-group/tests/e2e/waf-aligned/main.test.bicep @@ -8,7 +8,7 @@ metadata description = 'This instance deploys the module in alignment with the b // ========== // @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'rrgwaf' @@ -21,9 +21,9 @@ param namePrefix string = '#_namePrefix_#' // ============== // module testDeployment '../../../main.bicep' = { - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { - location: location + location: resourceLocation name: 'avm-${namePrefix}-resources.resourcegroups-${serviceShort}-rg' lock: { kind: 'CanNotDelete' diff --git a/avm/res/search/search-service/README.md b/avm/res/search/search-service/README.md index eaa7b355e1..b6afe54b40 100644 --- a/avm/res/search/search-service/README.md +++ b/avm/res/search/search-service/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module searchService 'br/public:avm/res/search/search-service:' = { - name: '${uniqueString(deployment().name, location)}-test-sssmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sssmin' params: { // Required parameters name: 'sssmin001' @@ -95,7 +95,7 @@ This instance deploys the module with most of its features enabled. ```bicep module searchService 'br/public:avm/res/search/search-service:' = { - name: '${uniqueString(deployment().name, location)}-test-sssmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sssmax' params: { // Required parameters name: 'sssmax001' @@ -297,7 +297,7 @@ This instance deploys the module with private endpoints. ```bicep module searchService 'br/public:avm/res/search/search-service:' = { - name: '${uniqueString(deployment().name, location)}-test-ssspe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssspe' params: { // Required parameters name: 'ssspe001' @@ -421,7 +421,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module searchService 'br/public:avm/res/search/search-service:' = { - name: '${uniqueString(deployment().name, location)}-test-ssswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssswaf' params: { // Required parameters name: 'ssswaf001' diff --git a/avm/res/search/search-service/main.bicep b/avm/res/search/search-service/main.bicep index bb911f1f77..c7692a4f77 100644 --- a/avm/res/search/search-service/main.bicep +++ b/avm/res/search/search-service/main.bicep @@ -262,7 +262,7 @@ output resourceId string = searchService.id output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(searchService.identity, 'principalId') ? searchService.identity.principalId : '' +output systemAssignedMIPrincipalId string = searchService.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = searchService.location diff --git a/avm/res/search/search-service/main.json b/avm/res/search/search-service/main.json index f065054412..373b4d1094 100644 --- a/avm/res/search/search-service/main.json +++ b/avm/res/search/search-service/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "2340292260752527729" + "templateHash": "11985965072265356380" }, "name": "Search Services", "description": "This module deploys a Search Service.", @@ -1487,7 +1487,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('searchService', '2022-09-01', 'full').identity, 'principalId')), reference('searchService', '2022-09-01', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('searchService', '2022-09-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/search/search-service/tests/e2e/defaults/main.test.bicep b/avm/res/search/search-service/tests/e2e/defaults/main.test.bicep index fd2601f04c..57f101667b 100644 --- a/avm/res/search/search-service/tests/e2e/defaults/main.test.bicep +++ b/avm/res/search/search-service/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-search.searchservices-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sssmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -37,9 +37,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } } diff --git a/avm/res/search/search-service/tests/e2e/max/main.test.bicep b/avm/res/search/search-service/tests/e2e/max/main.test.bicep index 4155009d7a..992a44d413 100644 --- a/avm/res/search/search-service/tests/e2e/max/main.test.bicep +++ b/avm/res/search/search-service/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-search.searchservices-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sssmax' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation sku: 'standard3' cmkEnforcement: 'Enabled' disableLocalAuth: false diff --git a/avm/res/search/search-service/tests/e2e/pe/main.test.bicep b/avm/res/search/search-service/tests/e2e/pe/main.test.bicep index c46bbf22a8..6f3121f61a 100644 --- a/avm/res/search/search-service/tests/e2e/pe/main.test.bicep +++ b/avm/res/search/search-service/tests/e2e/pe/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with private endpoints. param resourceGroupName string = 'dep-${namePrefix}-search.searchservices-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssspe' @@ -28,19 +28,19 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' applicationSecurityGroupName: 'dep-${namePrefix}-asg-${serviceShort}' storageAccountName: 'dep${namePrefix}st${serviceShort}' keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' privateDnsZoneName: 'privatelink.search.windows.net' - location: location + location: resourceLocation } } @@ -50,10 +50,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation publicNetworkAccess: 'disabled' privateEndpoints: [ { diff --git a/avm/res/search/search-service/tests/e2e/waf-aligned/main.test.bicep b/avm/res/search/search-service/tests/e2e/waf-aligned/main.test.bicep index 1fb890bb8e..a1de915de1 100644 --- a/avm/res/search/search-service/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/search/search-service/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-search.searchservices-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssswaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,9 +60,9 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' sku: 'standard3' cmkEnforcement: 'Enabled' diff --git a/avm/res/service-bus/namespace/README.md b/avm/res/service-bus/namespace/README.md index ce862310f6..8c43fe9fe7 100644 --- a/avm/res/service-bus/namespace/README.md +++ b/avm/res/service-bus/namespace/README.md @@ -56,7 +56,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module namespace 'br/public:avm/res/service-bus/namespace:' = { - name: '${uniqueString(deployment().name, location)}-test-sbnmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sbnmin' params: { // Required parameters name: 'sbnmin001' @@ -112,7 +112,7 @@ This instance deploys the module with features enabled for CMK encryption. ```bicep module namespace 'br/public:avm/res/service-bus/namespace:' = { - name: '${uniqueString(deployment().name, location)}-test-sbnencr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sbnencr' params: { // Required parameters name: 'sbnencr001' @@ -196,7 +196,7 @@ This instance deploys the module with most of its features enabled. ```bicep module namespace 'br/public:avm/res/service-bus/namespace:' = { - name: '${uniqueString(deployment().name, location)}-test-sbnmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sbnmax' params: { // Required parameters name: 'sbnmax001' @@ -644,7 +644,7 @@ This instance deploys the module with features enabled for private endpoint conf ```bicep module namespace 'br/public:avm/res/service-bus/namespace:' = { - name: '${uniqueString(deployment().name, location)}-test-sbnpe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sbnpe' params: { // Required parameters name: 'sbnpe001' @@ -782,7 +782,7 @@ This instance deploys the module in alignment with the best-practices of the Wel ```bicep module namespace 'br/public:avm/res/service-bus/namespace:' = { - name: '${uniqueString(deployment().name, location)}-test-sbnwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sbnwaf' params: { // Required parameters name: 'sbnwaf001' diff --git a/avm/res/service-bus/namespace/main.bicep b/avm/res/service-bus/namespace/main.bicep index e5327bd08b..413498aaf7 100644 --- a/avm/res/service-bus/namespace/main.bicep +++ b/avm/res/service-bus/namespace/main.bicep @@ -358,7 +358,7 @@ output resourceGroupName string = resourceGroup().name output name string = serviceBusNamespace.name @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(serviceBusNamespace.identity, 'principalId') ? serviceBusNamespace.identity.principalId : '' +output systemAssignedMIPrincipalId string = serviceBusNamespace.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = serviceBusNamespace.location diff --git a/avm/res/service-bus/namespace/main.json b/avm/res/service-bus/namespace/main.json index 5834100392..6fc1136dc6 100644 --- a/avm/res/service-bus/namespace/main.json +++ b/avm/res/service-bus/namespace/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "18066724538226124332" + "templateHash": "3819001479724310529" }, "name": "Service Bus Namespaces", "description": "This module deploys a Service Bus Namespace.", @@ -4042,7 +4042,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('serviceBusNamespace', '2022-10-01-preview', 'full').identity, 'principalId')), reference('serviceBusNamespace', '2022-10-01-preview', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('serviceBusNamespace', '2022-10-01-preview', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/service-bus/namespace/tests/e2e/defaults/main.test.bicep b/avm/res/service-bus/namespace/tests/e2e/defaults/main.test.bicep index 15bd0dea0e..ba24f47f74 100644 --- a/avm/res/service-bus/namespace/tests/e2e/defaults/main.test.bicep +++ b/avm/res/service-bus/namespace/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-servicebus.namespaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sbnmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,10 +38,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation skuObject: { name: 'Basic' } diff --git a/avm/res/service-bus/namespace/tests/e2e/encr/main.test.bicep b/avm/res/service-bus/namespace/tests/e2e/encr/main.test.bicep index ba3548ae02..a42a0686b1 100644 --- a/avm/res/service-bus/namespace/tests/e2e/encr/main.test.bicep +++ b/avm/res/service-bus/namespace/tests/e2e/encr/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with features enabled f param resourceGroupName string = 'dep-${namePrefix}-servicebus.namespaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sbnencr' @@ -31,18 +31,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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}' - location: location + location: resourceLocation } } @@ -53,14 +53,14 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' skuObject: { name: 'Premium' capacity: 1 } - location: location + location: resourceLocation managedIdentities: { systemAssigned: false userAssignedResourcesIds: [ diff --git a/avm/res/service-bus/namespace/tests/e2e/max/main.test.bicep b/avm/res/service-bus/namespace/tests/e2e/max/main.test.bicep index b20ceeb532..09f357c679 100644 --- a/avm/res/service-bus/namespace/tests/e2e/max/main.test.bicep +++ b/avm/res/service-bus/namespace/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-servicebus.namespaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sbnmax' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,14 +62,14 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' } - location: location + location: resourceLocation skuObject: { name: 'Premium' capacity: 16 diff --git a/avm/res/service-bus/namespace/tests/e2e/pe/main.test.bicep b/avm/res/service-bus/namespace/tests/e2e/pe/main.test.bicep index 15a8d14af9..034666003b 100644 --- a/avm/res/service-bus/namespace/tests/e2e/pe/main.test.bicep +++ b/avm/res/service-bus/namespace/tests/e2e/pe/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with features enabled f param resourceGroupName string = 'dep-${namePrefix}-servicebus.namespaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sbnpe' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,13 +48,13 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' skuObject: { name: 'Premium' } - location: location + location: resourceLocation publicNetworkAccess: 'Disabled' privateEndpoints: [ { diff --git a/avm/res/service-bus/namespace/tests/e2e/waf-aligned/main.test.bicep b/avm/res/service-bus/namespace/tests/e2e/waf-aligned/main.test.bicep index 6986a8ac6b..11ba61b580 100644 --- a/avm/res/service-bus/namespace/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/service-bus/namespace/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-servicebus.namespaces-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sbnwaf' @@ -28,16 +28,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,14 +62,14 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' lock: { kind: 'CanNotDelete' name: 'myCustomLockName' } - location: location + location: resourceLocation skuObject: { name: 'Premium' capacity: 2 diff --git a/avm/res/sql/server/README.md b/avm/res/sql/server/README.md index 1e28641ee6..d9a6d97d2f 100644 --- a/avm/res/sql/server/README.md +++ b/avm/res/sql/server/README.md @@ -65,7 +65,7 @@ This instance deploys the module with a Microsoft Entra ID identity as SQL admin ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-sqlsadmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sqlsadmin' params: { // Required parameters name: 'sqlsadmin' @@ -127,7 +127,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-ssmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssmin' params: { // Required parameters name: 'ssmin001' @@ -183,7 +183,7 @@ This instance deploys the module with most of its features enabled. ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-sqlsmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sqlsmax' params: { // Required parameters name: 'sqlsmax' @@ -517,7 +517,7 @@ This instance deploys the module with Private Endpoints. ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-sqlspe' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sqlspe' params: { // Required parameters name: 'sqlspe' @@ -649,7 +649,7 @@ This instance deploys the module with a secondary database. ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-sqlsec' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sqlsec' params: { // Required parameters name: 'sqlsec-sec' @@ -739,7 +739,7 @@ This instance deploys the module with a vulnerability assessment. ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-sqlsvln' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sqlsvln' params: { // Required parameters name: 'sqlsvln' @@ -867,7 +867,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module server 'br/public:avm/res/sql/server:' = { - name: '${uniqueString(deployment().name, location)}-test-sqlswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-sqlswaf' params: { // Required parameters name: 'sqlswaf' diff --git a/avm/res/sql/server/main.bicep b/avm/res/sql/server/main.bicep index 450f779843..9adb292dfa 100644 --- a/avm/res/sql/server/main.bicep +++ b/avm/res/sql/server/main.bicep @@ -350,7 +350,7 @@ output resourceId string = server.id output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(server.identity, 'principalId') ? server.identity.principalId : '' +output systemAssignedMIPrincipalId string = server.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = server.location diff --git a/avm/res/sql/server/main.json b/avm/res/sql/server/main.json index 9d010c1c2f..53002a85aa 100644 --- a/avm/res/sql/server/main.json +++ b/avm/res/sql/server/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "4549734270002695393" + "templateHash": "11930269426263350547" }, "name": "Azure SQL Servers", "description": "This module deploys an Azure SQL Server.", @@ -3028,7 +3028,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('server', '2022-05-01-preview', 'full').identity, 'principalId')), reference('server', '2022-05-01-preview', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('server', '2022-05-01-preview', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/sql/server/tests/e2e/admin/main.test.bicep b/avm/res/sql/server/tests/e2e/admin/main.test.bicep index 64e245ecca..a7143c0613 100644 --- a/avm/res/sql/server/tests/e2e/admin/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/admin/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a Microsoft Entra param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sqlsadmin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,10 +46,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}' - location: location + location: resourceLocation administrators: { azureADOnlyAuthentication: true login: 'myspn' diff --git a/avm/res/sql/server/tests/e2e/defaults/main.test.bicep b/avm/res/sql/server/tests/e2e/defaults/main.test.bicep index e0805dbc90..b2b9f5c769 100644 --- a/avm/res/sql/server/tests/e2e/defaults/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/defaults/main.test.bicep @@ -13,7 +13,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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.') // e.g., for a module 'network/private-endpoint' you could use 'npe' as a prefix and then 'waf' as a suffix for the waf-aligned test @@ -34,7 +34,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -44,10 +44,10 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password } diff --git a/avm/res/sql/server/tests/e2e/max/main.test.bicep b/avm/res/sql/server/tests/e2e/max/main.test.bicep index 2b7d23f477..32fe6d15cb 100644 --- a/avm/res/sql/server/tests/e2e/max/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sqlsmax' @@ -32,17 +32,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -50,13 +50,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -66,7 +66,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}' lock: { @@ -76,7 +76,7 @@ module testDeployment '../../../main.bicep' = { primaryUserAssignedIdentityId: nestedDependencies.outputs.managedIdentityResourceId administratorLogin: 'adminUserName' administratorLoginPassword: password - location: location + location: resourceLocation roleAssignments: [ { roleDefinitionIdOrName: 'Owner' @@ -111,7 +111,7 @@ module testDeployment '../../../main.bicep' = { skuTier: 'GeneralPurpose' skuCapacity: 10 // Pre-existing 'public' configuration - maintenanceConfigurationId: '${subscription().id}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_${location}_DB_1' + maintenanceConfigurationId: '${subscription().id}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_${resourceLocation}_DB_1' } ] databases: [ diff --git a/avm/res/sql/server/tests/e2e/pe/main.test.bicep b/avm/res/sql/server/tests/e2e/pe/main.test.bicep index c407701e97..f842f3c416 100644 --- a/avm/res/sql/server/tests/e2e/pe/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/pe/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with Private Endpoints. param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sqlspe' @@ -32,15 +32,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -50,10 +50,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password privateEndpoints: [ diff --git a/avm/res/sql/server/tests/e2e/secondary/main.test.bicep b/avm/res/sql/server/tests/e2e/secondary/main.test.bicep index b453f4a054..b04b858a3b 100644 --- a/avm/res/sql/server/tests/e2e/secondary/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/secondary/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a secondary databa param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sqlsec' @@ -32,15 +32,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { serverName: 'dep-${namePrefix}-${serviceShort}-pri' - location: location + location: resourceLocation } } @@ -50,10 +50,10 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}-sec' - location: location + location: resourceLocation administratorLogin: 'adminUserName' administratorLoginPassword: password databases: [ diff --git a/avm/res/sql/server/tests/e2e/vulnAssm/main.test.bicep b/avm/res/sql/server/tests/e2e/vulnAssm/main.test.bicep index 2483b7dab6..367a939783 100644 --- a/avm/res/sql/server/tests/e2e/vulnAssm/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/vulnAssm/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a vulnerability as param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sqlsvln' @@ -32,16 +32,16 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' storageAccountName: 'dep${namePrefix}cdnstore${serviceShort}' - location: location + location: resourceLocation } } @@ -51,13 +51,13 @@ module nestedDependencies 'dependencies.bicep' = { module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}' primaryUserAssignedIdentityId: nestedDependencies.outputs.managedIdentityResourceId administratorLogin: 'adminUserName' administratorLoginPassword: password - location: location + location: resourceLocation vulnerabilityAssessmentsObj: { emailSubscriptionAdmins: true name: 'default' diff --git a/avm/res/sql/server/tests/e2e/waf-aligned/main.test.bicep b/avm/res/sql/server/tests/e2e/waf-aligned/main.test.bicep index 1b0524da20..e8cfdc3d1e 100644 --- a/avm/res/sql/server/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/sql/server/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-sql.servers-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'sqlswaf' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { keyVaultName: 'dep-${namePrefix}-kv-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' - location: location + location: resourceLocation } } @@ -46,13 +46,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,7 +62,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t module testDeployment '../../../main.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}' params: { name: '${namePrefix}-${serviceShort}' primaryUserAssignedIdentityId: nestedDependencies.outputs.managedIdentityResourceId @@ -73,7 +73,7 @@ module testDeployment '../../../main.bicep' = { principalType: 'Application' tenantId: tenant().tenantId } - location: location + location: resourceLocation vulnerabilityAssessmentsObj: { name: 'default' emailSubscriptionAdmins: true @@ -91,7 +91,7 @@ module testDeployment '../../../main.bicep' = { skuTier: 'GeneralPurpose' skuCapacity: 10 // Pre-existing 'public' configuration - maintenanceConfigurationId: '${subscription().id}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_${location}_DB_1' + maintenanceConfigurationId: '${subscription().id}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_${resourceLocation}_DB_1' } ] databases: [ diff --git a/avm/res/storage/storage-account/README.md b/avm/res/storage/storage-account/README.md index 0dc902f9e0..a74e09a500 100644 --- a/avm/res/storage/storage-account/README.md +++ b/avm/res/storage/storage-account/README.md @@ -61,7 +61,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssamin' params: { // Required parameters name: 'ssamin001' @@ -109,7 +109,7 @@ This instance deploys the module with most of its features enabled. ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssamax' params: { // Required parameters name: 'ssamax001' @@ -879,7 +879,7 @@ This instance deploys the module with a NFS File Share. ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssanfs' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssanfs' params: { // Required parameters name: 'ssanfs001' @@ -953,7 +953,7 @@ This instance deploys the module using Customer-Managed-Keys using a System-Assi ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssasacr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssasacr' params: { // Required parameters name: '' @@ -1057,7 +1057,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssauacr' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssauacr' params: { // Required parameters name: 'ssauacr001' @@ -1167,7 +1167,7 @@ This instance deploys the module as Storage Account version 1. ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssav1' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssav1' params: { // Required parameters name: 'ssav1001' @@ -1219,7 +1219,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module storageAccount 'br/public:avm/res/storage/storage-account:' = { - name: '${uniqueString(deployment().name, location)}-test-ssawaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-ssawaf' params: { // Required parameters name: 'ssawaf001' diff --git a/avm/res/storage/storage-account/tests/e2e/defaults/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/defaults/main.test.bicep index d839605318..db5eb11bf1 100644 --- a/avm/res/storage/storage-account/tests/e2e/defaults/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssamin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' allowBlobPublicAccess: false diff --git a/avm/res/storage/storage-account/tests/e2e/max/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/max/main.test.bicep index 5b9943826d..9690de9fbc 100644 --- a/avm/res/storage/storage-account/tests/e2e/max/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssamax' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,9 +62,9 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' skuName: 'Standard_LRS' allowBlobPublicAccess: false diff --git a/avm/res/storage/storage-account/tests/e2e/nfs/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/nfs/main.test.bicep index 65d6110488..1459da48b5 100644 --- a/avm/res/storage/storage-account/tests/e2e/nfs/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/nfs/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a NFS File Share.' param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssanfs' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' skuName: 'Premium_LRS' kind: 'FileStorage' diff --git a/avm/res/storage/storage-account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep index a481164853..936455ba72 100644 --- a/avm/res/storage/storage-account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/system-assigned-cmk-encryption/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssasacr' @@ -31,14 +31,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation storageAccountName: '${namePrefix}${serviceShort}001' // 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)}' @@ -53,9 +53,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: nestedDependencies.outputs.storageAccountName privateEndpoints: [ { diff --git a/avm/res/storage/storage-account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep index 47c99543c1..54c7fa45ac 100644 --- a/avm/res/storage/storage-account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/user-assigned-cmk-encryption/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module using Customer-Managed- param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssauacr' @@ -31,14 +31,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation // 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)}' virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' @@ -53,9 +53,9 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' privateEndpoints: [ { diff --git a/avm/res/storage/storage-account/tests/e2e/v1/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/v1/main.test.bicep index fa1bc58b96..88b3b67e80 100644 --- a/avm/res/storage/storage-account/tests/e2e/v1/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/v1/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module as Storage Account vers param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssav1' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' kind: 'Storage' } diff --git a/avm/res/storage/storage-account/tests/e2e/waf-aligned/main.test.bicep b/avm/res/storage/storage-account/tests/e2e/waf-aligned/main.test.bicep index 18d98d9d4c..8d3c2cb47c 100644 --- a/avm/res/storage/storage-account/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/storage/storage-account/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-storage.storageaccounts-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'ssawaf' @@ -28,14 +28,14 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { - location: location + location: resourceLocation virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' } @@ -45,13 +45,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -62,9 +62,9 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { - location: location + location: resourceLocation name: '${namePrefix}${serviceShort}001' skuName: 'Standard_LRS' allowBlobPublicAccess: false diff --git a/avm/res/web/serverfarm/README.md b/avm/res/web/serverfarm/README.md index 1e64961acd..915308ab71 100644 --- a/avm/res/web/serverfarm/README.md +++ b/avm/res/web/serverfarm/README.md @@ -43,7 +43,7 @@ This instance deploys the module with a base set of parameters. Note it does inc ```bicep module serverfarm 'br/public:avm/res/web/serverfarm:' = { - name: '${uniqueString(deployment().name, location)}-test-wsfmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wsfmin' params: { // Required parameters name: 'wsfmin001' @@ -107,7 +107,7 @@ This instance deploys the module with most of its features enabled. ```bicep module serverfarm 'br/public:avm/res/web/serverfarm:' = { - name: '${uniqueString(deployment().name, location)}-test-wsfmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wsfmax' params: { // Required parameters name: 'wsfmax001' @@ -271,7 +271,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module serverfarm 'br/public:avm/res/web/serverfarm:' = { - name: '${uniqueString(deployment().name, location)}-test-wsfwaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wsfwaf' params: { // Required parameters name: 'wsfwaf001' diff --git a/avm/res/web/serverfarm/tests/e2e/defaults/main.test.bicep b/avm/res/web/serverfarm/tests/e2e/defaults/main.test.bicep index e490dc6015..f90bb77b7e 100644 --- a/avm/res/web/serverfarm/tests/e2e/defaults/main.test.bicep +++ b/avm/res/web/serverfarm/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with a base set of para param resourceGroupName string = 'dep-${namePrefix}-web.serverfarms-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wsfmin' @@ -38,7 +38,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'eastus' diff --git a/avm/res/web/serverfarm/tests/e2e/max/main.test.bicep b/avm/res/web/serverfarm/tests/e2e/max/main.test.bicep index b88a6052dc..a62ca244b1 100644 --- a/avm/res/web/serverfarm/tests/e2e/max/main.test.bicep +++ b/avm/res/web/serverfarm/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-web.serverfarms-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wsfmax' @@ -33,7 +33,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' location: 'eastus' @@ -42,7 +42,7 @@ module nestedDependencies 'dependencies.bicep' = { module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -59,7 +59,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'eastus' diff --git a/avm/res/web/serverfarm/tests/e2e/waf-aligned/main.test.bicep b/avm/res/web/serverfarm/tests/e2e/waf-aligned/main.test.bicep index 40c072e8b4..f6d3bf423a 100644 --- a/avm/res/web/serverfarm/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/web/serverfarm/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-web.serverfarms-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wsfwaf' @@ -33,7 +33,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-diagnosticDependencies' params: { storageAccountName: 'dep${namePrefix}diasa${serviceShort}01' logAnalyticsWorkspaceName: 'dep-${namePrefix}-law-${serviceShort}' @@ -50,7 +50,7 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' location: 'eastus' diff --git a/avm/res/web/site/README.md b/avm/res/web/site/README.md index 814fb0eac4..b348f7f45b 100644 --- a/avm/res/web/site/README.md +++ b/avm/res/web/site/README.md @@ -55,7 +55,7 @@ This instance deploys the module as Function App with the minimum set of require ```bicep module site 'br/public:avm/res/web/site:' = { - name: '${uniqueString(deployment().name, location)}-test-wsfamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wsfamin' params: { // Required parameters kind: 'functionapp' @@ -119,7 +119,7 @@ This instance deploys the module as Function App with most of its features enabl ```bicep module site 'br/public:avm/res/web/site:' = { - name: '${uniqueString(deployment().name, location)}-test-wsfamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wsfamax' params: { // Required parameters kind: 'functionapp' @@ -495,7 +495,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module site 'br/public:avm/res/web/site:' = { - name: '${uniqueString(deployment().name, location)}-test-wswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wswaf' params: { // Required parameters kind: 'app' @@ -635,7 +635,7 @@ This instance deploys the module as Web App with the minimum set of required par ```bicep module site 'br/public:avm/res/web/site:' = { - name: '${uniqueString(deployment().name, location)}-test-wswamin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wswamin' params: { // Required parameters kind: 'app' @@ -691,7 +691,7 @@ This instance deploys the module as Web App with most of its features enabled. ```bicep module site 'br/public:avm/res/web/site:' = { - name: '${uniqueString(deployment().name, location)}-test-wswamax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wswamax' params: { // Required parameters kind: 'app' diff --git a/avm/res/web/site/tests/e2e/functionApp.defaults/main.test.bicep b/avm/res/web/site/tests/e2e/functionApp.defaults/main.test.bicep index f302318690..802c4c8ca4 100644 --- a/avm/res/web/site/tests/e2e/functionApp.defaults/main.test.bicep +++ b/avm/res/web/site/tests/e2e/functionApp.defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module as Function App with th param resourceGroupName string = 'dep-${namePrefix}-web.sites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wsfamin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { serverFarmName: 'dep-${namePrefix}-sf-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation kind: 'functionapp' serverFarmResourceId: nestedDependencies.outputs.serverFarmResourceId siteConfig: { diff --git a/avm/res/web/site/tests/e2e/functionApp.max/main.test.bicep b/avm/res/web/site/tests/e2e/functionApp.max/main.test.bicep index 5f9e47c877..6ce8a38d92 100644 --- a/avm/res/web/site/tests/e2e/functionApp.max/main.test.bicep +++ b/avm/res/web/site/tests/e2e/functionApp.max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module as Function App with mo param resourceGroupName string = 'dep-${namePrefix}-web.sites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wsfamax' @@ -28,12 +28,12 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' @@ -42,7 +42,7 @@ module nestedDependencies 'dependencies.bicep' = { applicationInsightsName: 'dep-${namePrefix}-appi-${serviceShort}' relayNamespaceName: 'dep-${namePrefix}-ns-${serviceShort}' hybridConnectionName: 'dep-${namePrefix}-hc-${serviceShort}' - location: location + location: resourceLocation } } @@ -50,13 +50,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -67,10 +67,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation kind: 'functionapp' serverFarmResourceId: nestedDependencies.outputs.serverFarmResourceId appInsightResourceId: nestedDependencies.outputs.applicationInsightsResourceId diff --git a/avm/res/web/site/tests/e2e/waf-aligned/main.test.bicep b/avm/res/web/site/tests/e2e/waf-aligned/main.test.bicep index 37f39d7d9e..df56fc271f 100644 --- a/avm/res/web/site/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/web/site/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-web.sites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wswaf' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { serverFarmName: 'dep-${namePrefix}-sf-${serviceShort}' - location: location + location: resourceLocation } } @@ -44,13 +44,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -60,10 +60,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation kind: 'app' serverFarmResourceId: nestedDependencies.outputs.serverFarmResourceId diagnosticSettings: [ diff --git a/avm/res/web/site/tests/e2e/webApp.defaults/main.test.bicep b/avm/res/web/site/tests/e2e/webApp.defaults/main.test.bicep index 54313a9d66..afa3b51e11 100644 --- a/avm/res/web/site/tests/e2e/webApp.defaults/main.test.bicep +++ b/avm/res/web/site/tests/e2e/webApp.defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module as Web App with the min param resourceGroupName string = 'dep-${namePrefix}-web.sites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wswamin' @@ -28,15 +28,15 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { serverFarmName: 'dep-${namePrefix}-sf-${serviceShort}' - location: location + location: resourceLocation } } @@ -47,10 +47,10 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation kind: 'app' serverFarmResourceId: nestedDependencies.outputs.serverFarmResourceId } diff --git a/avm/res/web/site/tests/e2e/webApp.max/main.test.bicep b/avm/res/web/site/tests/e2e/webApp.max/main.test.bicep index bad6d8b4f0..cab7d7b186 100644 --- a/avm/res/web/site/tests/e2e/webApp.max/main.test.bicep +++ b/avm/res/web/site/tests/e2e/webApp.max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module as Web App with most of param resourceGroupName string = 'dep-${namePrefix}-web.sites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wswamax' @@ -28,19 +28,19 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' serverFarmName: 'dep-${namePrefix}-sf-${serviceShort}' relayNamespaceName: 'dep-${namePrefix}-ns-${serviceShort}' hybridConnectionName: 'dep-${namePrefix}-hc-${serviceShort}' - location: location + location: resourceLocation } } @@ -48,13 +48,13 @@ module nestedDependencies 'dependencies.bicep' = { // =========== module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/templates/diagnostic.dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-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 + location: resourceLocation } } @@ -64,10 +64,10 @@ module diagnosticDependencies '../../../../../../utilities/e2e-template-assets/t @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation kind: 'app' serverFarmResourceId: nestedDependencies.outputs.serverFarmResourceId diagnosticSettings: [ diff --git a/avm/res/web/static-site/README.md b/avm/res/web/static-site/README.md index 60963cece1..46de728a72 100644 --- a/avm/res/web/static-site/README.md +++ b/avm/res/web/static-site/README.md @@ -47,7 +47,7 @@ This instance deploys the module with the minimum set of required parameters. ```bicep module staticSite 'br/public:avm/res/web/static-site:' = { - name: '${uniqueString(deployment().name, location)}-test-wssmin' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wssmin' params: { // Required parameters name: 'wssmin001' @@ -95,7 +95,7 @@ This instance deploys the module with most of its features enabled. ```bicep module staticSite 'br/public:avm/res/web/static-site:' = { - name: '${uniqueString(deployment().name, location)}-test-wssmax' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wssmax' params: { // Required parameters name: 'wssmax001' @@ -287,7 +287,7 @@ This instance deploys the module in alignment with the best-practices of the Azu ```bicep module staticSite 'br/public:avm/res/web/static-site:' = { - name: '${uniqueString(deployment().name, location)}-test-wsswaf' + name: '${uniqueString(deployment().name, resourceLocation)}-test-wsswaf' params: { // Required parameters name: 'wsswaf001' diff --git a/avm/res/web/static-site/main.bicep b/avm/res/web/static-site/main.bicep index bfb7aabc9d..3cbc8d702b 100644 --- a/avm/res/web/static-site/main.bicep +++ b/avm/res/web/static-site/main.bicep @@ -242,7 +242,7 @@ output resourceId string = staticSite.id output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') -output systemAssignedMIPrincipalId string = (managedIdentities.?systemAssigned ?? false) && contains(staticSite.identity, 'principalId') ? staticSite.identity.principalId : '' +output systemAssignedMIPrincipalId string = staticSite.?identity.?principalId ?? '' @description('The location the resource was deployed into.') output location string = staticSite.location diff --git a/avm/res/web/static-site/main.json b/avm/res/web/static-site/main.json index e4b0bf3513..ec5c11d3ea 100644 --- a/avm/res/web/static-site/main.json +++ b/avm/res/web/static-site/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.24.24.22086", - "templateHash": "13880536558340319383" + "templateHash": "12022767093866974773" }, "name": "Static Web Apps", "description": "This module deploys a Static Web App.", @@ -1644,7 +1644,7 @@ "metadata": { "description": "The principal ID of the system assigned identity." }, - "value": "[if(and(coalesce(tryGet(parameters('managedIdentities'), 'systemAssigned'), false()), contains(reference('staticSite', '2021-03-01', 'full').identity, 'principalId')), reference('staticSite', '2021-03-01', 'full').identity.principalId, '')]" + "value": "[coalesce(tryGet(tryGet(reference('staticSite', '2021-03-01', 'full'), 'identity'), 'principalId'), '')]" }, "location": { "type": "string", diff --git a/avm/res/web/static-site/tests/e2e/defaults/main.test.bicep b/avm/res/web/static-site/tests/e2e/defaults/main.test.bicep index 91f09b1142..750c86d508 100644 --- a/avm/res/web/static-site/tests/e2e/defaults/main.test.bicep +++ b/avm/res/web/static-site/tests/e2e/defaults/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with the minimum set of param resourceGroupName string = 'dep-${namePrefix}-web.staticsites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wssmin' @@ -28,7 +28,7 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } // ============== // @@ -38,9 +38,9 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' - location: location + location: resourceLocation } }] diff --git a/avm/res/web/static-site/tests/e2e/max/main.test.bicep b/avm/res/web/static-site/tests/e2e/max/main.test.bicep index 6cfea6e8e3..36bea24219 100644 --- a/avm/res/web/static-site/tests/e2e/max/main.test.bicep +++ b/avm/res/web/static-site/tests/e2e/max/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module with most of its featur param resourceGroupName string = 'dep-${namePrefix}-web.staticsites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wssmax' @@ -28,18 +28,18 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' managedIdentityName: 'dep-${namePrefix}-msi-${serviceShort}' siteName: 'dep-${namePrefix}-fa-${serviceShort}' serverFarmName: 'dep-${namePrefix}-sf-${serviceShort}' - location: location + location: resourceLocation } } @@ -50,12 +50,12 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' allowConfigFileUpdates: true enterpriseGradeCdnStatus: 'Disabled' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/res/web/static-site/tests/e2e/waf-aligned/main.test.bicep b/avm/res/web/static-site/tests/e2e/waf-aligned/main.test.bicep index 6abca487cc..98025ccbc8 100644 --- a/avm/res/web/static-site/tests/e2e/waf-aligned/main.test.bicep +++ b/avm/res/web/static-site/tests/e2e/waf-aligned/main.test.bicep @@ -12,7 +12,7 @@ metadata description = 'This instance deploys the module in alignment with the b param resourceGroupName string = 'dep-${namePrefix}-web.staticsites-${serviceShort}-rg' @description('Optional. The location to deploy resources to.') -param location string = deployment().location +param resourceLocation 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 = 'wsswaf' @@ -28,17 +28,17 @@ param namePrefix string = '#_namePrefix_#' // ================= resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: resourceGroupName - location: location + location: resourceLocation } module nestedDependencies 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, resourceLocation)}-nestedDependencies' params: { virtualNetworkName: 'dep-${namePrefix}-vnet-${serviceShort}' siteName: 'dep-${namePrefix}-fa-${serviceShort}' serverFarmName: 'dep-${namePrefix}-sf-${serviceShort}' - location: location + location: resourceLocation } } @@ -49,12 +49,12 @@ module nestedDependencies 'dependencies.bicep' = { @batchSize(1) module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}' + name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' params: { name: '${namePrefix}${serviceShort}001' allowConfigFileUpdates: true enterpriseGradeCdnStatus: 'Disabled' - location: location + location: resourceLocation lock: { kind: 'CanNotDelete' name: 'myCustomLockName' diff --git a/avm/utilities/pipelines/e2eValidation/regionSelector/Get-AzAvailableResourceLocation.ps1 b/avm/utilities/pipelines/e2eValidation/regionSelector/Get-AzAvailableResourceLocation.ps1 new file mode 100644 index 0000000000..9996aca396 --- /dev/null +++ b/avm/utilities/pipelines/e2eValidation/regionSelector/Get-AzAvailableResourceLocation.ps1 @@ -0,0 +1,98 @@ +<# +.SYNOPSIS +Set the location for the resource deployment. + +.DESCRIPTION +This script is used to set the location for the resource deployment. + +.PARAMETER ExcludedRegions +Optional. The list of regions to be excluded from the selection. + +.PARAMETER moduleRoot +Required. The root path of the module. + +.PARAMETER repoRoot +Optional. The root path of the repository. + +.PARAMETER GlobalResourceGroupLocation +Required. The location of the resource group where the global resources will be deployed. + +.EXAMPLE +Get-AzAvailableResourceLocation -ModuleRoot ".\avm\res\resources\resource-group" -repoRoot .\ + +Get the recommended paired regions available for the service. +#> + +function Get-AzAvailableResourceLocation { + param ( + + [Parameter(Mandatory = $false)] + [string] $RepoRoot = (Get-Item -Path $PSScriptRoot).parent.parent.parent.parent.parent.FullName, + + [Parameter(Mandatory = $true)] + [string] $ModuleRoot, + + [Parameter(Mandatory = $false)] + [string] $GlobalResourceGroupLocation, + + [Parameter(Mandatory = $false)] + [array] $ExcludedRegions = @( + "asiasoutheast", + "brazilsouth", + "eastus2", + "japaneast", + "koreacentral", + "qatercentral", + "southcentralus", + "switzerlandnorth", + "uaenorth", + "westeurope", + "westus2", + "westus2" + ) + ) + + # Load used functions + . (Join-Path $RepoRoot 'avm' 'utilities' 'pipelines' 'sharedScripts' 'helper' 'Get-SpecsAlignedResourceName.ps1') + + # Configure Resource Type + $fullModuleIdentifier = ($ModuleRoot -split '[\/|\\]{0,1}avm[\/|\\]{1}(res|ptn)[\/|\\]{1}')[2] -replace '\\', '/' + Write-Verbose "Full module identifier: $fullModuleIdentifier" + $formattedResourceType = Get-SpecsAlignedResourceName -ResourceIdentifier $fullModuleIdentifier -Verbose + Write-Verbose "Formatted resource type: $formattedResourceType" + + # Get the resource provider and resource name + $formattedResourceProvider = ($formattedResourceType -split '[\/|\\]{1}')[0] + Write-Verbose "Resource type: $formattedResourceProvider" + $formattedServiceName = ($formattedResourceType -split '[\/|\\]{1}')[1] + Write-Verbose "Resource: $formattedServiceName" + + $resourceRegionList = @() + $ResourceRegionList = (Get-AzResourceProvider | Where-Object { $_.ProviderNamespace -eq $formattedResourceProvider }).ResourceTypes | Where-Object { $_.ResourceTypeName -eq $formattedServiceName } | Select-Object -ExpandProperty Locations + Write-Verbose "Region list: $($resourceRegionList | ConvertTo-Json)" + + if ($resourceRegionList -eq "global") { + Write-Verbose "Resource is global, default region [$GlobalResourceGroupLocation] will be used for resource group creation" + $location = $GlobalResourceGroupLocation # Set Location to resource group location. Globabl resources should have hardocded location in `main.bicep` + } + else { + + $locations = Get-AzLocation | Where-Object { + $_.DisplayName -in $ResourceRegionList -and + $_.Location -notin $ExcludedRegions -and + $_.PairedRegion -ne "{}" -and + $_.RegionCategory -eq "Recommended" + } | Select-Object -ExpandProperty Location + Write-Verbose "Available Locations: $($locations | ConvertTo-Json)" + + + $index = Get-Random -Maximum ($locations.Count) + Write-Verbose "Generated random index [$index]" + + $location = $locations[$index] + + } + Write-Verbose "Selected location [$location]" -Verbose + + return $location +} diff --git a/avm/utilities/pipelines/e2eValidation/regionSelector/Get-AzDeploymentRegion.ps1 b/avm/utilities/pipelines/e2eValidation/regionSelector/Get-AzDeploymentRegion.ps1 deleted file mode 100644 index e77d1d82b8..0000000000 --- a/avm/utilities/pipelines/e2eValidation/regionSelector/Get-AzDeploymentRegion.ps1 +++ /dev/null @@ -1,105 +0,0 @@ -<# -.SYNOPSIS -Set the deployment region for the module deployment - -.DESCRIPTION -This script is used to set the deployment region for the module deployment. - -.PARAMETER excludedRegions -Optional. The regions to exclude from the recommended regions list. - -.PARAMETER usePairedRegionsOnly -Optional. If set, only paired regions will be returned. - -.PARAMETER useKnownRegionsOnly -Optional. If set, only known regions will be returned. - -.PARAMETER knownRegionList -Optional. The list of known regions to use when useKnownRegionsOnly is set. ARM Deployment are limited to 10 active deployment regions per subscription. - -.EXAMPLE -Get-AzDeploymentRegion -excludedRegions @("West Europe", "Brazil South", "West US 2", "East US 2", "South Central US") -usePairedRegionsOnly -useKnownRegionsOnly - -Get the recommended regions using known regions excluding the regions specified in the excludedRegions parameter and only paired regions. - -.EXAMPLE -Get-AzDeploymentRegion -excludedRegions @("West Europe", "Brazil South", "West US 2", "East US 2", "South Central US") -usePairedRegionsOnly - -Get the recommended regions excluding the regions specified in the excludedRegions parameter and only paired regions. - -.EXAMPLE -Get-AzDeploymentRegion -excludedRegions @("West Europe", "Brazil South", "West US 2", "East US 2", "South Central US") - -Get the recommended regions excluding the regions specified in the excludedRegions parameter. - -.EXAMPLE -Get-AzDeploymentRegion -usePairedRegionsOnly - -Get the recommended paired regions. -#> - -function Get-AzDeploymentRegion { - param ( - [Parameter(Mandatory = $false)] - [array] $excludedRegions = @( - # "westeurope", - "westus2", - "eastus2", - "centralus", - "southcentralus", - "brazilsouth", - "koreacentral", - "qatarcentral" - ), - - [Parameter(Mandatory = $false)] - [cmdletbinding()] - [switch] $usePairedRegionsOnly, - - [Parameter(Mandatory = $false)] - [cmdletbinding()] - [switch] $useKnownRegionsOnly, - - [Parameter(Mandatory = $false)] - [array] $knownRegionList = @( - "westeurope" - ) - ) - - $allRegions = Get-AzLocation -ExtendedLocation $true - - # Filter regions where Location is in the known regions list - if ($useKnownRegionsOnly) { - $regionList = $allRegions | Where-Object { $_.Location -in $knownRegionList } - } - else { - $regionList = $allRegions - } - - - $exclusions = @() - $exclusions = $excludedRegions | Where-Object { $_ -in ($_ -like '* *' ? $regionList.DisplayName : $regionList.Location) } - Write-Verbose ('Excluding regions: {0}' -f ($exclusions | ConvertTo-Json)) -Verbose - - - # Filter regions where RegionCategory is 'Recommended' and not in the excluded list - $recommendedRegions = $regionList | Where-Object { $_.RegionCategory -eq "Recommended" -and $_.Location -notin $exclusions } - Write-Verbose "Recommended regions: $($recommendedRegions.Location | ConvertTo-Json)" - - if ($usePairedRegionsOnly) { - # Filter regions where PairedRegionName is not null - $recommendedRegions = $recommendedRegions | Where-Object { $null -ne $_.PairedRegion } - Write-Verbose "Paired regions only: $($recommendedRegions.Location | ConvertTo-Json)" - } - - # Display indexed regions - Write-Verbose "Recommended regions: $($recommendedRegions.Location | ConvertTo-Json)" -Verbose - - $index = Get-Random -Maximum ($recommendedRegions.Count) - Write-Verbose "Generated random index [$index]" - - $location = $recommendedRegions[$index].Location - Write-Verbose "Selected location [$location]" -Verbose - - return $location -} diff --git a/avm/utilities/pipelines/e2eValidation/resourceDeployment/New-TemplateDeployment.ps1 b/avm/utilities/pipelines/e2eValidation/resourceDeployment/New-TemplateDeployment.ps1 index a5a75d308d..aba9f2ee19 100644 --- a/avm/utilities/pipelines/e2eValidation/resourceDeployment/New-TemplateDeployment.ps1 +++ b/avm/utilities/pipelines/e2eValidation/resourceDeployment/New-TemplateDeployment.ps1 @@ -42,7 +42,7 @@ function Get-ErrorMessageForScope { switch ($deploymentScope) { 'resourcegroup' { - $deployments = Get-AzResourceGroupDeploymentOperation -DeploymentName $deploymentName -ResourceGroupName $resourceGroupName + $deployments = Get-AzResourceGroupDeploymentOperation -DeploymentName $deploymentName -ResourceGroupName $ResourceGroupName break } 'subscription' { @@ -71,51 +71,51 @@ Run a template deployment using a given parameter file Run a template deployment using a given parameter file. Works on a resource group, subscription, managementgroup and tenant level -.PARAMETER templateFilePath +.PARAMETER TemplateFilePath Mandatory. The path to the deployment file -.PARAMETER parameterFilePath +.PARAMETER ParameterFilePath Optional. Path to the parameter file from root. Can be a single file, multiple files, or directory that contains (.json) files. -.PARAMETER location -Mandatory. Location to test in. E.g. WestEurope +.PARAMETER DeploymentMetadataLocation +Mandatory. The location to store the deployment metadata. -.PARAMETER resourceGroupName +.PARAMETER ResourceGroupName Optional. Name of the resource group to deploy into. Mandatory if deploying into a resource group (resource group level) -.PARAMETER subscriptionId +.PARAMETER SubscriptionId Optional. ID of the subscription to deploy into. Mandatory if deploying into a subscription (subscription level) using a Management groups service connection -.PARAMETER managementGroupId +.PARAMETER ManagementGroupId Optional. Name of the management group to deploy into. Mandatory if deploying into a management group (management group level) -.PARAMETER additionalTags +.PARAMETER AdditionalTags Optional. Provde a Key Value Pair (Object) that will be appended to the Parameter file tags. Example: @{myKey = 'myValue',myKey2 = 'myValue2'}. -.PARAMETER additionalParameters +.PARAMETER AdditionalParameters Optional. Additional parameters you can provide with the deployment. E.g. @{ resourceGroupName = 'myResourceGroup' } -.PARAMETER retryLimit +.PARAMETER RetryLimit Optional. Maximum retry limit if the deployment fails. Default is 3. -.PARAMETER doNotThrow +.PARAMETER DoNotThrow Optional. Do not throw an exception if it failed. Still returns the error message though .PARAMETER RepoRoot Mandatory. Path to the root of the repository. .EXAMPLE -New-TemplateDeploymentInner -templateFilePath 'C:/key-vault/vault/main.json' -parameterFilePath 'C:/key-vault/vault/.test/parameters.json' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +New-TemplateDeploymentInner -TemplateFilePath 'C:/key-vault/vault/main.json' -ParameterFilePath 'C:/key-vault/vault/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Deploy the main.json of the KeyVault module with the parameter file 'parameters.json' using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -New-TemplateDeploymentInner -templateFilePath 'C:/key-vault/vault/main.bicep' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +New-TemplateDeploymentInner -TemplateFilePath 'C:/key-vault/vault/main.bicep' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Deploy the main.bicep of the KeyVault module using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -New-TemplateDeploymentInner -templateFilePath 'C:/resources/resource-group/main.json' -location 'WestEurope' +New-TemplateDeploymentInner -TemplateFilePath 'C:/resources/resource-group/main.json' -DeploymentMetadataLocation 'WestEurope' Deploy the main.json of the ResourceGroup module without a parameter file in location 'WestEurope' #> @@ -123,35 +123,35 @@ function New-TemplateDeploymentInner { [CmdletBinding(SupportsShouldProcess = $true)] param ( - [Parameter(Mandatory)] - [string] $templateFilePath, + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, [Parameter(Mandatory = $false)] - [string] $parameterFilePath, + [string] $ParameterFilePath, [Parameter(Mandatory = $false)] - [string] $resourceGroupName = '', + [string] $ResourceGroupName = '', - [Parameter(Mandatory)] - [string] $location, + [Parameter(Mandatory = $true)] + [string] $DeploymentMetadataLocation, [Parameter(Mandatory = $false)] - [string] $subscriptionId, + [string] $SubscriptionId, [Parameter(Mandatory = $false)] - [string] $managementGroupId, + [string] $ManagementGroupId, [Parameter(Mandatory = $false)] - [PSCustomObject] $additionalTags, + [PSCustomObject] $AdditionalTags, [Parameter(Mandatory = $false)] - [Hashtable] $additionalParameters, + [Hashtable] $AdditionalParameters, [Parameter(Mandatory = $false)] - [switch] $doNotThrow, + [switch] $DoNotThrow, [Parameter(Mandatory = $false)] - [int]$retryLimit = 3, + [int] $RetryLimit = 3, [Parameter(Mandatory = $false)] [string] $RepoRoot @@ -162,13 +162,13 @@ function New-TemplateDeploymentInner { } process { - $deploymentNamePrefix = Split-Path -Path (Split-Path $templateFilePath -Parent) -LeafBase + $deploymentNamePrefix = Split-Path -Path (Split-Path $TemplateFilePath -Parent) -LeafBase if ([String]::IsNullOrEmpty($deploymentNamePrefix)) { - $deploymentNamePrefix = 'templateDeployment-{0}' -f (Split-Path $templateFilePath -LeafBase) + $deploymentNamePrefix = 'templateDeployment-{0}' -f (Split-Path $TemplateFilePath -LeafBase) } # Convert, e.g., [C:\myFork\avm\res\kubernetes-configuration\flux-configuration\tests\e2e\defaults\main.test.bicep] to [a-r-kc-fc-defaults] - $shortPathElems = ((Split-Path $templateFilePath) -replace ('{0}[\\|\/]' -f [regex]::Escape($repoRoot))) -split '[\\|\/]' | Where-Object { $_ -notin @('tests', 'e2e') } + $shortPathElems = ((Split-Path $TemplateFilePath) -replace ('{0}[\\|\/]' -f [regex]::Escape($repoRoot))) -split '[\\|\/]' | Where-Object { $_ -notin @('tests', 'e2e') } # Shorten all elements but the last $reducedElem = $shortPathElems[0 .. ($shortPathElems.Count - 2)] | ForEach-Object { $shortPathElem = $_ @@ -182,43 +182,43 @@ function New-TemplateDeploymentInner { $deploymentNamePrefix = ($reducedElem + @($shortPathElems[-1])) -join '-' $DeploymentInputs = @{ - TemplateFile = $templateFilePath + TemplateFile = $TemplateFilePath Verbose = $true ErrorAction = 'Stop' } # Parameter file provided yes/no - if (-not [String]::IsNullOrEmpty($parameterFilePath)) { - $DeploymentInputs['TemplateParameterFile'] = $parameterFilePath + if (-not [String]::IsNullOrEmpty($ParameterFilePath)) { + $DeploymentInputs['TemplateParameterFile'] = $ParameterFilePath } # Additional parameter object provided yes/no - if ($additionalParameters) { - $DeploymentInputs += $additionalParameters + if ($AdditionalParameters) { + $DeploymentInputs += $AdditionalParameters } # Additional tags provides yes/no # Append tags to parameters if resource supports them (all tags must be in one object) - if ($additionalTags) { + if ($AdditionalTags) { # Parameter tags - if (-not [String]::IsNullOrEmpty($parameterFilePath)) { - $parameterFileTags = (ConvertFrom-Json (Get-Content -Raw -Path $parameterFilePath) -AsHashtable).parameters.tags.value + if (-not [String]::IsNullOrEmpty($ParameterFilePath)) { + $parameterFileTags = (ConvertFrom-Json (Get-Content -Raw -Path $ParameterFilePath) -AsHashtable).parameters.tags.value } if (-not $parameterFileTags) { $parameterFileTags = @{} } # Pipeline tags - if ($additionalTags) { $parameterFileTags += $additionalTags } # If additionalTags object is provided, append tag to the resource + if ($AdditionalTags) { $parameterFileTags += $AdditionalTags } # If additionalTags object is provided, append tag to the resource # Overwrites parameter file tags parameter - Write-Verbose ("additionalTags: $(($additionalTags) ? ($additionalTags | ConvertTo-Json) : '[]')") + Write-Verbose ("additionalTags: $(($AdditionalTags) ? ($AdditionalTags | ConvertTo-Json) : '[]')") $DeploymentInputs += @{Tags = $parameterFileTags } } ####################### ## INVOKE DEPLOYMENT ## ####################### - $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $templateFilePath + $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $TemplateFilePath [bool]$Stoploop = $false [int]$retryCount = 1 $usedDeploymentNames = @() @@ -236,39 +236,40 @@ function New-TemplateDeploymentInner { try { switch ($deploymentScope) { 'resourcegroup' { - if (-not [String]::IsNullOrEmpty($subscriptionId)) { - Write-Verbose ('Setting context to subscription [{0}]' -f $subscriptionId) - $null = Set-AzContext -Subscription $subscriptionId + if (-not [String]::IsNullOrEmpty($SubscriptionId)) { + Write-Verbose ('Setting context to subscription [{0}]' -f $SubscriptionId) + $null = Set-AzContext -Subscription $SubscriptionId } - if (-not (Get-AzResourceGroup -Name $resourceGroupName -ErrorAction 'SilentlyContinue')) { - if ($PSCmdlet.ShouldProcess("Resource group [$resourceGroupName] in location [$location]", 'Create')) { - $null = New-AzResourceGroup -Name $resourceGroupName -Location $location + if (-not (Get-AzResourceGroup -Name $ResourceGroupName -ErrorAction 'SilentlyContinue')) { + $resourceGroupLocation = $AdditionalParameters.resourceLocation ?? $DeploymentMetadataLocation + if ($PSCmdlet.ShouldProcess("Resource group [$ResourceGroupName] in (metadata) location [$resourceGroupLocation]", 'Create')) { + $null = New-AzResourceGroup -Name $ResourceGroupName -Location $resourceGroupLocation } } if ($PSCmdlet.ShouldProcess('Resource group level deployment', 'Create')) { - $res = New-AzResourceGroupDeployment @DeploymentInputs -ResourceGroupName $resourceGroupName + $res = New-AzResourceGroupDeployment @DeploymentInputs -ResourceGroupName $ResourceGroupName } break } 'subscription' { - if (-not [String]::IsNullOrEmpty($subscriptionId)) { - Write-Verbose ('Setting context to subscription [{0}]' -f $subscriptionId) - $null = Set-AzContext -Subscription $subscriptionId + if (-not [String]::IsNullOrEmpty($SubscriptionId)) { + Write-Verbose ('Setting context to subscription [{0}]' -f $SubscriptionId) + $null = Set-AzContext -Subscription $SubscriptionId } if ($PSCmdlet.ShouldProcess('Subscription level deployment', 'Create')) { - $res = New-AzSubscriptionDeployment @DeploymentInputs -Location $location + $res = New-AzSubscriptionDeployment @DeploymentInputs -Location $DeploymentMetadataLocation } break } 'managementgroup' { if ($PSCmdlet.ShouldProcess('Management group level deployment', 'Create')) { - $res = New-AzManagementGroupDeployment @DeploymentInputs -Location $location -ManagementGroupId $managementGroupId + $res = New-AzManagementGroupDeployment @DeploymentInputs -Location $DeploymentMetadataLocation -ManagementGroupId $ManagementGroupId } break } 'tenant' { if ($PSCmdlet.ShouldProcess('Tenant level deployment', 'Create')) { - $res = New-AzTenantDeployment @DeploymentInputs -Location $location + $res = New-AzTenantDeployment @DeploymentInputs -Location $DeploymentMetadataLocation } break } @@ -283,7 +284,7 @@ function New-TemplateDeploymentInner { $errorInputObject = @{ DeploymentScope = $deploymentScope DeploymentName = $deploymentName - ResourceGroupName = $resourceGroupName + ResourceGroupName = $ResourceGroupName } $exceptionMessage = Get-ErrorMessageForScope @errorInputObject @@ -291,15 +292,15 @@ function New-TemplateDeploymentInner { } $Stoploop = $true } catch { - if ($retryCount -ge $retryLimit) { - if ($doNotThrow) { + if ($retryCount -ge $RetryLimit) { + if ($DoNotThrow) { # In case a deployment failes but not throws an exception (i.e. the exception message is empty) we try to fetch it via the deployment name if ([String]::IsNullOrEmpty($PSitem.Exception.Message)) { $errorInputObject = @{ DeploymentScope = $deploymentScope DeploymentName = $deploymentName - ResourceGroupName = $resourceGroupName + ResourceGroupName = $ResourceGroupName } $exceptionMessage = Get-ErrorMessageForScope @errorInputObject } else { @@ -315,14 +316,14 @@ function New-TemplateDeploymentInner { } $Stoploop = $true } else { - Write-Verbose "Resource deployment Failed.. ($retryCount/$retryLimit) Retrying in 5 Seconds.. `n" + Write-Verbose "Resource deployment Failed.. ($retryCount/$RetryLimit) Retrying in 5 Seconds.. `n" Write-Verbose ($PSitem.Exception.Message | Out-String) -Verbose Start-Sleep -Seconds 5 $retryCount++ } } } - until ($Stoploop -eq $true -or $retryCount -gt $retryLimit) + until ($Stoploop -eq $true -or $retryCount -gt $RetryLimit) Write-Verbose 'Result' -Verbose Write-Verbose '------' -Verbose @@ -347,51 +348,51 @@ Run a template deployment using a given parameter file Run a template deployment using a given parameter file. Works on a resource group, subscription, managementgroup and tenant level -.PARAMETER templateFilePath +.PARAMETER TemplateFilePath Mandatory. The path to the deployment file -.PARAMETER parameterFilePath +.PARAMETER ParameterFilePath Optional. Path to the parameter file from root. Can be a single file, multiple files, or directory that contains (.json) files. -.PARAMETER location -Mandatory. Location to test in. E.g. WestEurope +.PARAMETER DeploymentMetadataLocation +Mandatory. The location to store the deployment metadata. -.PARAMETER resourceGroupName +.PARAMETER ResourceGroupName Optional. Name of the resource group to deploy into. Mandatory if deploying into a resource group (resource group level) -.PARAMETER subscriptionId +.PARAMETER SubscriptionId Optional. ID of the subscription to deploy into. Mandatory if deploying into a subscription (subscription level) using a Management groups service connection -.PARAMETER managementGroupId +.PARAMETER ManagementGroupId Optional. Name of the management group to deploy into. Mandatory if deploying into a management group (management group level) -.PARAMETER additionalTags +.PARAMETER AdditionalTags Optional. Provide a Key Value Pair (Object) that will be appended to the Parameter file tags. Example: @{myKey = 'myValue', myKey2 = 'myValue2'}. -.PARAMETER additionalParameters +.PARAMETER AdditionalParameters Optional. Additional parameters you can provide with the deployment. E.g. @{ resourceGroupName = 'myResourceGroup' } -.PARAMETER retryLimit +.PARAMETER RetryLimit Optional. Maximum retry limit if the deployment fails. Default is 3. -.PARAMETER doNotThrow +.PARAMETER DoNotThrow Optional. Do not throw an exception if it failed. Still returns the error message though .PARAMETER RepoRoot Optional. Path to the root of the repository. .EXAMPLE -New-TemplateDeployment -templateFilePath 'C:/key-vault/vault/main.bicep' -parameterFilePath 'C:/key-vault/vault/.test/parameters.json' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +New-TemplateDeployment -TemplateFilePath 'C:/key-vault/vault/main.bicep' -ParameterFilePath 'C:/key-vault/vault/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Deploy the main.bicep of the 'key-vault/vault' module with the parameter file 'parameters.json' using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -New-TemplateDeployment -templateFilePath 'C:/resources/resource-group/main.bicep' -location 'WestEurope' +New-TemplateDeployment -TemplateFilePath 'C:/resources/resource-group/main.bicep' -DeploymentMetadataLocation 'WestEurope' Deploy the main.bicep of the 'resources/resource-group' module in location 'WestEurope' without a parameter file .EXAMPLE -New-TemplateDeployment -templateFilePath 'C:/resources/resource-group/main.json' -parameterFilePath 'C:/resources/resource-group/.test/parameters.json' -location 'WestEurope' +New-TemplateDeployment -TemplateFilePath 'C:/resources/resource-group/main.json' -ParameterFilePath 'C:/resources/resource-group/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' Deploy the main.json of the 'resources/resource-group' module with the parameter file 'parameters.json' in location 'WestEurope' #> @@ -399,35 +400,35 @@ function New-TemplateDeployment { [CmdletBinding(SupportsShouldProcess)] param ( - [Parameter(Mandatory)] - [string] $templateFilePath, + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, - [Parameter(Mandatory = $false)] - [string[]] $parameterFilePath, + [Parameter(Mandatory = $true)] + [string] $DeploymentMetadataLocation, - [Parameter(Mandatory)] - [string] $location, + [Parameter(Mandatory = $false)] + [string[]] $ParameterFilePath, [Parameter(Mandatory = $false)] - [string] $resourceGroupName = '', + [string] $ResourceGroupName = '', [Parameter(Mandatory = $false)] - [string] $subscriptionId, + [string] $SubscriptionId, [Parameter(Mandatory = $false)] - [string] $managementGroupId, + [string] $ManagementGroupId, [Parameter(Mandatory = $false)] - [Hashtable] $additionalParameters, + [Hashtable] $AdditionalParameters, [Parameter(Mandatory = $false)] - [PSCustomObject] $additionalTags, + [PSCustomObject] $AdditionalTags, [Parameter(Mandatory = $false)] - [switch] $doNotThrow, + [switch] $DoNotThrow, [Parameter(Mandatory = $false)] - [int]$retryLimit = 3, + [int] $RetryLimit = 3, [Parameter(Mandatory = $false)] [string] $RepoRoot = (Get-Item -Path $PSScriptRoot).parent.parent.parent.parent.parent.FullName @@ -442,37 +443,37 @@ function New-TemplateDeployment { process { ## Assess Provided Parameter Path - if ((-not [String]::IsNullOrEmpty($parameterFilePath)) -and (Test-Path -Path $parameterFilePath -PathType 'Container') -and $parameterFilePath.Length -eq 1) { + if ((-not [String]::IsNullOrEmpty($ParameterFilePath)) -and (Test-Path -Path $ParameterFilePath -PathType 'Container') -and $ParameterFilePath.Length -eq 1) { ## Transform Path to Files - $parameterFilePath = Get-ChildItem $parameterFilePath -Recurse -Filter *.json | Select-Object -ExpandProperty FullName - Write-Verbose "Detected Parameter File(s)/Directory - Count: `n $($parameterFilePath.Count)" + $ParameterFilePath = Get-ChildItem $ParameterFilePath -Recurse -Filter *.json | Select-Object -ExpandProperty FullName + Write-Verbose "Detected Parameter File(s)/Directory - Count: `n $($ParameterFilePath.Count)" } ## Iterate through each file $deploymentInputObject = @{ - TemplateFilePath = $templateFilePath - AdditionalTags = $additionalTags - AdditionalParameters = $additionalParameters - Location = $location - ResourceGroupName = $resourceGroupName - SubscriptionId = $subscriptionId - ManagementGroupId = $managementGroupId - DoNotThrow = $doNotThrow - RetryLimit = $retryLimit - RepoRoot = $RepoRoot + TemplateFilePath = $TemplateFilePath + AdditionalTags = $AdditionalTags + AdditionalParameters = $AdditionalParameters + DeploymentMetadataLocation = $DeploymentMetadataLocation + ResourceGroupName = $ResourceGroupName + SubscriptionId = $SubscriptionId + ManagementGroupId = $ManagementGroupId + DoNotThrow = $DoNotThrow + RetryLimit = $RetryLimit + RepoRoot = $RepoRoot } - if ($parameterFilePath) { - if ($parameterFilePath -is [array]) { + if ($ParameterFilePath) { + if ($ParameterFilePath -is [array]) { $deploymentResult = [System.Collections.ArrayList]@() - foreach ($path in $parameterFilePath) { - if ($PSCmdlet.ShouldProcess("Deployment for parameter file [$parameterFilePath]", 'Trigger')) { - $deploymentResult += New-TemplateDeploymentInner @deploymentInputObject -parameterFilePath $path + foreach ($path in $ParameterFilePath) { + if ($PSCmdlet.ShouldProcess("Deployment for parameter file [$ParameterFilePath]", 'Trigger')) { + $deploymentResult += New-TemplateDeploymentInner @deploymentInputObject -ParameterFilePath $path } } return $deploymentResult } else { - if ($PSCmdlet.ShouldProcess("Deployment for single parameter file [$parameterFilePath]", 'Trigger')) { - return New-TemplateDeploymentInner @deploymentInputObject -parameterFilePath $parameterFilePath + if ($PSCmdlet.ShouldProcess("Deployment for single parameter file [$ParameterFilePath]", 'Trigger')) { + return New-TemplateDeploymentInner @deploymentInputObject -ParameterFilePath $ParameterFilePath } } } else { diff --git a/avm/utilities/pipelines/e2eValidation/resourceDeployment/Test-TemplateDeployment.ps1 b/avm/utilities/pipelines/e2eValidation/resourceDeployment/Test-TemplateDeployment.ps1 index 240145fbb0..5beeb8c52b 100644 --- a/avm/utilities/pipelines/e2eValidation/resourceDeployment/Test-TemplateDeployment.ps1 +++ b/avm/utilities/pipelines/e2eValidation/resourceDeployment/Test-TemplateDeployment.ps1 @@ -6,45 +6,45 @@ Run a template validation using a given parameter file Run a template validation using a given parameter file Works on a resource group, subscription, managementgroup and tenant level -.PARAMETER parametersBasePath +.PARAMETER ParametersBasePath Mandatory. The path to the root of the parameters folder to test with -.PARAMETER templateFilePath +.PARAMETER TemplateFilePath Mandatory. Path to the template file from root. -.PARAMETER parameterFilePath +.PARAMETER ParameterFilePath Optional. Path to the parameter file from root. -.PARAMETER location -Mandatory. Location to test in. E.g. WestEurope +.PARAMETER DeploymentMetadataLocation +Mandatory. The location to store the deployment metadata. -.PARAMETER resourceGroupName +.PARAMETER ResourceGroupName Optional. Name of the resource group to deploy into. Mandatory if deploying into a resource group (resource group level) -.PARAMETER subscriptionId +.PARAMETER SubscriptionId Optional. ID of the subscription to deploy into. Mandatory if deploying into a subscription (subscription level) using a Management groups service connection -.PARAMETER managementGroupId +.PARAMETER ManagementGroupId Optional. Name of the management group to deploy into. Mandatory if deploying into a management group (management group level) -.PARAMETER additionalParameters +.PARAMETER AdditionalParameters Optional. Additional parameters you can provide with the deployment. E.g. @{ resourceGroupName = 'myResourceGroup' } .PARAMETER RepoRoot Optional. Path to the root of the repository. .EXAMPLE -Test-TemplateDeployment -templateFilePath 'C:/key-vault/vault/main.bicep' -parameterFilePath 'C:/key-vault/vault/.test/parameters.json' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +Test-TemplateDeployment -TemplateFilePath 'C:/key-vault/vault/main.bicep' -ParameterFilePath 'C:/key-vault/vault/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Test the main.bicep of the KeyVault module with the parameter file 'parameters.json' using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -Test-TemplateDeployment -templateFilePath 'C:/key-vault/vault/main.bicep' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +Test-TemplateDeployment -TemplateFilePath 'C:/key-vault/vault/main.bicep' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Test the main.bicep of the KeyVault module using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -Test-TemplateDeployment -templateFilePath 'C:/resources/resource-group/main.json' -parameterFilePath 'C:/resources/resource-group/.test/parameters.json' -location 'WestEurope' +Test-TemplateDeployment -TemplateFilePath 'C:/resources/resource-group/main.json' -ParameterFilePath 'C:/resources/resource-group/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' Test the main.json of the ResourceGroup module with the parameter file 'parameters.json' in location 'WestEurope' #> @@ -52,26 +52,26 @@ function Test-TemplateDeployment { [CmdletBinding(SupportsShouldProcess)] param ( - [Parameter(Mandatory)] - [string] $templateFilePath, + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, - [Parameter(Mandatory)] - [string] $location, + [Parameter(Mandatory = $true)] + [string] $DeploymentMetadataLocation, [Parameter(Mandatory = $false)] - [string] $parameterFilePath, + [string] $ParameterFilePath, [Parameter(Mandatory = $false)] - [string] $resourceGroupName, + [string] $ResourceGroupName, [Parameter(Mandatory = $false)] - [string] $subscriptionId, + [string] $SubscriptionId, [Parameter(Mandatory = $false)] - [string] $managementGroupId, + [string] $ManagementGroupId, [Parameter(Mandatory = $false)] - [Hashtable] $additionalParameters, + [Hashtable] $AdditionalParameters, [Parameter(Mandatory = $false)] [string] $RepoRoot = (Get-Item -Path $PSScriptRoot).parent.parent.parent.parent.parent.FullName @@ -85,13 +85,13 @@ function Test-TemplateDeployment { } process { - $deploymentNamePrefix = Split-Path -Path (Split-Path $templateFilePath -Parent) -LeafBase + $deploymentNamePrefix = Split-Path -Path (Split-Path $TemplateFilePath -Parent) -LeafBase if ([String]::IsNullOrEmpty($deploymentNamePrefix)) { - $deploymentNamePrefix = 'templateDeployment-{0}' -f (Split-Path $templateFilePath -LeafBase) + $deploymentNamePrefix = 'templateDeployment-{0}' -f (Split-Path $TemplateFilePath -LeafBase) } # Convert, e.g., [C:\myFork\avm\res\kubernetes-configuration\flux-configuration\tests\e2e\defaults\main.test.bicep] to [a-r-kc-fc-defaults] - $shortPathElems = ((Split-Path $templateFilePath) -replace ('{0}[\\|\/]' -f [regex]::Escape($repoRoot))) -split '[\\|\/]' | Where-Object { $_ -notin @('tests', 'e2e') } + $shortPathElems = ((Split-Path $TemplateFilePath) -replace ('{0}[\\|\/]' -f [regex]::Escape($repoRoot))) -split '[\\|\/]' | Where-Object { $_ -notin @('tests', 'e2e') } # Shorten all elements but the last $reducedElem = $shortPathElems[0 .. ($shortPathElems.Count - 2)] | ForEach-Object { $shortPathElem = $_ @@ -105,21 +105,21 @@ function Test-TemplateDeployment { $deploymentNamePrefix = ($reducedElem + @($shortPathElems[-1])) -join '-' $DeploymentInputs = @{ - TemplateFile = $templateFilePath + TemplateFile = $TemplateFilePath Verbose = $true OutVariable = 'ValidationErrors' } - if (-not [String]::IsNullOrEmpty($parameterFilePath)) { - $DeploymentInputs['TemplateParameterFile'] = $parameterFilePath + if (-not [String]::IsNullOrEmpty($ParameterFilePath)) { + $DeploymentInputs['TemplateParameterFile'] = $ParameterFilePath } $ValidationErrors = $null # Additional parameter object provided yes/no - if ($additionalParameters) { - $DeploymentInputs += $additionalParameters + if ($AdditionalParameters) { + $DeploymentInputs += $AdditionalParameters } - $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $templateFilePath -Verbose + $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $TemplateFilePath -Verbose # Generate a valid deployment name. Must match ^[-\w\._\(\)]+$ do { @@ -136,40 +136,41 @@ function Test-TemplateDeployment { ################# switch ($deploymentScope) { 'resourceGroup' { - if (-not [String]::IsNullOrEmpty($subscriptionId)) { - Write-Verbose ('Setting context to subscription [{0}]' -f $subscriptionId) - $null = Set-AzContext -Subscription $subscriptionId + if (-not [String]::IsNullOrEmpty($SubscriptionId)) { + Write-Verbose ('Setting context to subscription [{0}]' -f $SubscriptionId) + $null = Set-AzContext -Subscription $SubscriptionId } - if (-not (Get-AzResourceGroup -Name $resourceGroupName -ErrorAction 'SilentlyContinue')) { - if ($PSCmdlet.ShouldProcess("Resource group [$resourceGroupName] in location [$location]", 'Create')) { - $null = New-AzResourceGroup -Name $resourceGroupName -Location $location + if (-not (Get-AzResourceGroup -Name $ResourceGroupName -ErrorAction 'SilentlyContinue')) { + $resourceGroupLocation = $AdditionalParameters.resourceLocation ?? $DeploymentMetadataLocation + if ($PSCmdlet.ShouldProcess("Resource group [$ResourceGroupName] in location [$resourceGroupLocation]", 'Create')) { + $null = New-AzResourceGroup -Name $ResourceGroupName -Location $resourceGroupLocation } } if ($PSCmdlet.ShouldProcess('Resource group level deployment', 'Test')) { - $res = Test-AzResourceGroupDeployment @DeploymentInputs -ResourceGroupName $resourceGroupName + $res = Test-AzResourceGroupDeployment @DeploymentInputs -ResourceGroupName $ResourceGroupName } break } 'subscription' { - if (-not [String]::IsNullOrEmpty($subscriptionId)) { - Write-Verbose ('Setting context to subscription [{0}]' -f $subscriptionId) - $null = Set-AzContext -Subscription $subscriptionId + if (-not [String]::IsNullOrEmpty($SubscriptionId)) { + Write-Verbose ('Setting context to subscription [{0}]' -f $SubscriptionId) + $null = Set-AzContext -Subscription $SubscriptionId } if ($PSCmdlet.ShouldProcess('Subscription level deployment', 'Test')) { - $res = Test-AzSubscriptionDeployment @DeploymentInputs -Location $Location + $res = Test-AzSubscriptionDeployment @DeploymentInputs -Location $DeploymentMetadataLocation } break } 'managementGroup' { if ($PSCmdlet.ShouldProcess('Management group level deployment', 'Test')) { - $res = Test-AzManagementGroupDeployment @DeploymentInputs -Location $Location -ManagementGroupId $ManagementGroupId + $res = Test-AzManagementGroupDeployment @DeploymentInputs -Location $DeploymentMetadataLocation -ManagementGroupId $ManagementGroupId } break } 'tenant' { Write-Verbose 'Handling tenant level validation' if ($PSCmdlet.ShouldProcess('Tenant level deployment', 'Test')) { - $res = Test-AzTenantDeployment @DeploymentInputs -Location $location + $res = Test-AzTenantDeployment @DeploymentInputs -Location $DeploymentMetadataLocation } break } diff --git a/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 b/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 index de4c6a26f1..8001642b2f 100644 --- a/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 +++ b/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 @@ -1096,6 +1096,93 @@ Describe 'Module tests' -Tag 'Module' { } } +Describe 'Governance tests' { + + $governanceTestCases = [System.Collections.ArrayList] @() + foreach ($moduleFolderPath in $moduleFolderPaths) { + + $resourceTypeIdentifier = ($moduleFolderPath -split '[\/|\\]{1}avm[\/|\\]{1}(res|ptn)[\/|\\]{1}')[2] -replace '\\', '/' # avm/res// + $relativeModulePath = Join-Path 'avm' ($moduleFolderPath -split '[\/|\\]{1}avm[\/|\\]{1}')[1] + + $isTopLevelModule = ($resourceTypeIdentifier -split '[\/|\\]').Count -eq 2 + if ($isTopLevelModule) { + + $governanceTestCases += @{ + relativeModulePath = $relativeModulePath + repoRootPath = $repoRootPath + moduleFolderName = $resourceTypeIdentifier + } + } + } + + It '[] Owning team should be specified correctly in CODEWONERS file.' -TestCases $governanceTestCases { + + param( + [string] $relativeModulePath, + [string] $repoRootPath + ) + + $codeownersFilePath = Join-Path $repoRootPath '.github' 'CODEOWNERS' + $codeOwnersContent = Get-Content $codeownersFilePath + + $formattedEntry = $relativeModulePath -replace '\\', '\/' + $moduleLine = $codeOwnersContent | Where-Object { $_ -match "^\s*\/$formattedEntry\/" } + + $expectedEntry = "/{0}/ @Azure/{1}-module-owners-bicep @Azure/avm-core-team-technical-bicep" -f ($relativeModulePath -replace '\\', '/'), ($relativeModulePath -replace '-' -replace '[\\|\/]', '-') + + # Line should exist + $moduleLine | Should -Not -BeNullOrEmpty -Because "the module should be listed in the [CODEOWNERS](https://azure.github.io/Azure-Verified-Modules/specs/shared/#codeowners-file) file as [/$expectedEntry]." + + # Line should be correct + $moduleLine | Should -Be $expectedEntry -Because "the module should match the expected format as documented [here](https://azure.github.io/Azure-Verified-Modules/specs/shared/#codeowners-file)." + } + + + It '[] Module identifier should be listed in issue template in the correct alphabetical position.' -TestCases $governanceTestCases { + + param( + [string] $relativeModulePath, + [string] $repoRootPath + ) + + $issueTemplatePath = Join-Path $repoRootPath '.github' 'ISSUE_TEMPLATE' 'avm_module_issue.yml' + $issueTemplateContent = Get-Content $issueTemplatePath + + # Identify listed modules + $startIndex = 0 + while ($issueTemplateContent[$startIndex] -notmatch '^\s*- "Other, as defined below\.\.\."' -and $startIndex -ne $issueTemplateContent.Length) { + $startIndex++ + } + $startIndex++ # Go one further than dummy value line + + $endIndex = $startIndex + while ($issueTemplateContent[$endIndex] -match '.*- "avm\/.*' -and $endIndex -ne $issueTemplateContent.Length) { + $endIndex++ + } + $endIndex-- # Go one back to last module line + + $listedModules = $issueTemplateContent[$startIndex..$endIndex] | ForEach-Object { $_ -replace '.*- "(avm\/.*)".*', '$1' } + + # Should exist + $listedModules | Should -Contain ($relativeModulePath -replace '\\', '/') -Because 'the module should be listed in the issue template in the correct alphabetical position ([ref](https://azure.github.io/Azure-Verified-Modules/specs/bicep/#id-bcpnfr15---category-contributionsupport---avm-module-issue-template-file)).' + + # Should not be commented + $entry = $issueTemplateContent | Where-Object { $_ -match ('.*- "{0}".*' -f $relativeModulePath -replace '\\', '\/') } + $entry.Trim() | Should -Not -Match '^\s*#.*' -Because 'the module should not be commented out in the issue template.' + + # Should be at correct location + $incorrectLines = @() + foreach ($finding in (Compare-Object $listedModules ($listedModules | Sort-Object) -SyncWindow 0)) { + if ($finding.SideIndicator -eq '<=') { + $incorrectLines += $finding.InputObject + } + } + $incorrectLines = $incorrectLines | Sort-Object -Unique + + $incorrectLines.Count | Should -Be 0 -Because ('the number of modules that are not in the correct alphabetical order in the issue template should be zero ([ref](https://azure.github.io/Azure-Verified-Modules/specs/bicep/#id-bcpnfr15---category-contributionsupport---avm-module-issue-template-file)).
However, the following incorrectly located lines were found:
{0}
' -f ($incorrectLines -join '
')) + } +} + Describe 'Test file tests' -Tag 'TestTemplate' { Context 'General test file' { diff --git a/avm/utilities/tools/Test-ModuleLocally.ps1 b/avm/utilities/tools/Test-ModuleLocally.ps1 index 42adea659b..dac32938e7 100644 --- a/avm/utilities/tools/Test-ModuleLocally.ps1 +++ b/avm/utilities/tools/Test-ModuleLocally.ps1 @@ -232,13 +232,13 @@ function Test-ModuleLocally { # Deployment & Validation Testing # ------------------------------- $functionInput = @{ - location = $ValidateOrDeployParameters.Location - resourceGroupName = $ValidateOrDeployParameters.ResourceGroupName - subscriptionId = $ValidateOrDeployParameters.SubscriptionId - managementGroupId = $ValidateOrDeployParameters.ManagementGroupId - additionalParameters = $additionalParameters - RepoRoot = $repoRootPath - Verbose = $true + DeploymentMetadataLocation = $ValidateOrDeployParameters.Location + resourceGroupName = $ValidateOrDeployParameters.ResourceGroupName + subscriptionId = $ValidateOrDeployParameters.SubscriptionId + managementGroupId = $ValidateOrDeployParameters.ManagementGroupId + additionalParameters = $additionalParameters + RepoRoot = $repoRootPath + Verbose = $true } try { diff --git a/avm/utilities/tools/helper/Get-TemplateDeploymentWhatIf.ps1 b/avm/utilities/tools/helper/Get-TemplateDeploymentWhatIf.ps1 index ff8dc1a960..360d6818fc 100644 --- a/avm/utilities/tools/helper/Get-TemplateDeploymentWhatIf.ps1 +++ b/avm/utilities/tools/helper/Get-TemplateDeploymentWhatIf.ps1 @@ -6,45 +6,45 @@ Get a template What-If deployment result using a given parameter file Get a template What-If deployment resultusing a given parameter file Works on a resource group, subscription, managementgroup and tenant level -.PARAMETER parametersBasePath +.PARAMETER ParametersBasePath Mandatory. The path to the root of the parameters folder to test with -.PARAMETER templateFilePath +.PARAMETER TemplateFilePath Mandatory. Path to the template file from root. -.PARAMETER parameterFilePath +.PARAMETER ParameterFilePath Optional. Path to the parameter file from root. -.PARAMETER location -Mandatory. Location to test in. E.g. WestEurope +.PARAMETER DeploymentMetadataLocation +Mandatory. The location to store the deployment metadata. -.PARAMETER resourceGroupName +.PARAMETER ResourceGroupName Optional. Name of the resource group to deploy into. Mandatory if deploying into a resource group (resource group level) -.PARAMETER subscriptionId +.PARAMETER SubscriptionId Optional. ID of the subscription to deploy into. Mandatory if deploying into a subscription (subscription level) using a Management groups service connection -.PARAMETER managementGroupId +.PARAMETER ManagementGroupId Optional. Name of the management group to deploy into. Mandatory if deploying into a management group (management group level) -.PARAMETER additionalParameters -Optional. Additional parameters you can provide with the deployment. E.g. @{ resourceGroupName = 'myResourceGroup' } +.PARAMETER AdditionalParameters +Optional. Additional parameters you can provide with the deployment. E.g. @{ ResourceGroupName = 'myResourceGroup' } .PARAMETER RepoRoot Optional. The path to the repository's root .EXAMPLE -Get-TemplateDeploymentWhatIf -templateFilePath 'C:/key-vault/vault/main.bicep' -parameterFilePath 'C:/key-vault/vault/.test/parameters.json' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +Get-TemplateDeploymentWhatIf -TemplateFilePath 'C:/key-vault/vault/main.bicep' -ParameterFilePath 'C:/key-vault/vault/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Get What-If deployment result for the main.bicep of the KeyVault module with the parameter file 'parameters.json' using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -Get-TemplateDeploymentWhatIf -templateFilePath 'C:/key-vault/vault/main.bicep' -location 'WestEurope' -resourceGroupName 'aLegendaryRg' +Get-TemplateDeploymentWhatIf -TemplateFilePath 'C:/key-vault/vault/main.bicep' -DeploymentMetadataLocation 'WestEurope' -ResourceGroupName 'aLegendaryRg' Get What-If deployment result for the main.bicep of the KeyVault module using the resource group 'aLegendaryRg' in location 'WestEurope' .EXAMPLE -Get-TemplateDeploymentWhatIf -templateFilePath 'C:/resources/resource-group/main.json' -parameterFilePath 'C:/resources/resource-group/.test/parameters.json' -location 'WestEurope' +Get-TemplateDeploymentWhatIf -TemplateFilePath 'C:/resources/resource-group/main.json' -ParameterFilePath 'C:/resources/resource-group/.test/parameters.json' -DeploymentMetadataLocation 'WestEurope' Get What-If deployment result for the main.json of the ResourceGroup module with the parameter file 'parameters.json' in location 'WestEurope' #> @@ -52,26 +52,26 @@ function Get-TemplateDeploymentWhatIf { [CmdletBinding(SupportsShouldProcess)] param ( - [Parameter(Mandatory)] - [string] $templateFilePath, + [Parameter(Mandatory = $true)] + [string] $TemplateFilePath, - [Parameter(Mandatory)] - [string] $location, + [Parameter(Mandatory = $true)] + [string] $DeploymentMetadataLocation, [Parameter(Mandatory = $false)] - [string] $parameterFilePath, + [string] $ParameterFilePath, [Parameter(Mandatory = $false)] - [string] $resourceGroupName, + [string] $ResourceGroupName, [Parameter(Mandatory = $false)] - [string] $subscriptionId, + [string] $SubscriptionId, [Parameter(Mandatory = $false)] - [string] $managementGroupId, + [string] $ManagementGroupId, [Parameter(Mandatory = $false)] - [Hashtable] $additionalParameters, + [Hashtable] $AdditionalParameters, [Parameter(Mandatory = $false)] [string] $RepoRoot = (Get-Item -Path $PSScriptRoot).parent.parent.parent.parent.FullName @@ -85,13 +85,13 @@ function Get-TemplateDeploymentWhatIf { } process { - $deploymentNamePrefix = Split-Path -Path (Split-Path $templateFilePath -Parent) -LeafBase + $deploymentNamePrefix = Split-Path -Path (Split-Path $TemplateFilePath -Parent) -LeafBase if ([String]::IsNullOrEmpty($deploymentNamePrefix)) { - $deploymentNamePrefix = 'templateDeployment-{0}' -f (Split-Path $templateFilePath -LeafBase) + $deploymentNamePrefix = 'templateDeployment-{0}' -f (Split-Path $TemplateFilePath -LeafBase) } # Convert, e.g., [C:\myFork\avm\res\kubernetes-configuration\flux-configuration\tests\e2e\defaults\main.test.bicep] to [a-r-kc-fc-defaults] - $shortPathElems = ((Split-Path $templateFilePath) -replace ('{0}[\\|\/]' -f [regex]::Escape($repoRoot))) -split '[\\|\/]' | Where-Object { $_ -notin @('tests', 'e2e') } + $shortPathElems = ((Split-Path $TemplateFilePath) -replace ('{0}[\\|\/]' -f [regex]::Escape($repoRoot))) -split '[\\|\/]' | Where-Object { $_ -notin @('tests', 'e2e') } # Shorten all elements but the last $reducedElem = $shortPathElems[0 .. ($shortPathElems.Count - 2)] | ForEach-Object { $shortPathElem = $_ @@ -105,21 +105,21 @@ function Get-TemplateDeploymentWhatIf { $deploymentNamePrefix = ($reducedElem + @($shortPathElems[-1])) -join '-' $DeploymentInputs = @{ - TemplateFile = $templateFilePath + TemplateFile = $TemplateFilePath Verbose = $true OutVariable = 'ValidationErrors' } - if (-not [String]::IsNullOrEmpty($parameterFilePath)) { - $DeploymentInputs['TemplateParameterFile'] = $parameterFilePath + if (-not [String]::IsNullOrEmpty($ParameterFilePath)) { + $DeploymentInputs['TemplateParameterFile'] = $ParameterFilePath } $ValidationErrors = $null # Additional parameter object provided yes/no - if ($additionalParameters) { - $DeploymentInputs += $additionalParameters + if ($AdditionalParameters) { + $DeploymentInputs += $AdditionalParameters } - $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $templateFilePath -Verbose + $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $TemplateFilePath -Verbose # Generate a valid deployment name. Must match ^[-\w\._\(\)]+$ do { @@ -136,13 +136,14 @@ function Get-TemplateDeploymentWhatIf { ################# switch ($deploymentScope) { 'resourceGroup' { - if (-not [String]::IsNullOrEmpty($subscriptionId)) { - Write-Verbose ('Setting context to subscription [{0}]' -f $subscriptionId) - $null = Set-AzContext -Subscription $subscriptionId + if (-not [String]::IsNullOrEmpty($SubscriptionId)) { + Write-Verbose ('Setting context to subscription [{0}]' -f $SubscriptionId) + $null = Set-AzContext -Subscription $SubscriptionId } - if (-not (Get-AzResourceGroup -Name $resourceGroupName -ErrorAction 'SilentlyContinue')) { - if ($PSCmdlet.ShouldProcess("Resource group [$resourceGroupName] in location [$location]", 'Create')) { - $null = New-AzResourceGroup -Name $resourceGroupName -Location $location + if (-not (Get-AzResourceGroup -Name $ResourceGroupName -ErrorAction 'SilentlyContinue')) { + $resourceGroupLocation = $AdditionalParameters.resourceLocation ?? $DeploymentMetadataLocation + if ($PSCmdlet.ShouldProcess("Resource group [$ResourceGroupName] in location [$resourceGroupLocation]", 'Create')) { + $null = New-AzResourceGroup -Name $ResourceGroupName -Location $resourceGroupLocation } } if ($PSCmdlet.ShouldProcess('Resource group level deployment', 'WhatIf')) { @@ -151,25 +152,25 @@ function Get-TemplateDeploymentWhatIf { break } 'subscription' { - if (-not [String]::IsNullOrEmpty($subscriptionId)) { - Write-Verbose ('Setting context to subscription [{0}]' -f $subscriptionId) - $null = Set-AzContext -Subscription $subscriptionId + if (-not [String]::IsNullOrEmpty($SubscriptionId)) { + Write-Verbose ('Setting context to subscription [{0}]' -f $SubscriptionId) + $null = Set-AzContext -Subscription $SubscriptionId } if ($PSCmdlet.ShouldProcess('Subscription level deployment', 'WhatIf')) { - $res = New-AzDeployment @DeploymentInputs -Location $Location -WhatIf + $res = New-AzDeployment @DeploymentInputs -Location $DeploymentMetadataLocation -WhatIf } break } 'managementGroup' { if ($PSCmdlet.ShouldProcess('Management group level deployment', 'WhatIf')) { - $res = New-AzManagementGroupDeployment @DeploymentInputs -Location $Location -ManagementGroupId $ManagementGroupId -WhatIf + $res = New-AzManagementGroupDeployment @DeploymentInputs -Location $DeploymentMetadataLocation -ManagementGroupId $ManagementGroupId -WhatIf } break } 'tenant' { Write-Verbose 'Handling tenant level validation' if ($PSCmdlet.ShouldProcess('Tenant level deployment', 'WhatIf')) { - $res = New-AzTenantDeployment @DeploymentInputs -Location $location -WhatIf + $res = New-AzTenantDeployment @DeploymentInputs -Location $DeploymentMetadataLocation -WhatIf } break }